Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

404 error when create an asset object using API post

Wendy Wei June 3, 2024

Hello,

I am using below url to create a asset user object using API post but got 404 not found error.  Any idea how to fix this?

https://api.atlassian.com/jsm/assets/workspace/xxxxxx....xxx/1v1/object/create

 

Any suggestions and ideas are highly appreciated.

 

Thanks,
Wendy

 

 

1 answer

0 votes
Mikael Sandberg
Community Champion
June 3, 2024

Hi @Wendy Wei,

Welcome to Atlassian Community!

Your URL contains an extra 1 in the version, try this one instead and see if that works:

https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/create 

Wendy Wei June 4, 2024

@Mikael Sandberg ,

thanks for feedback. 

I am getting 500 internal server error now after removed extra 1 with Post method, but still get 404 not found error when using PUT.   I am using Postman withe basic auth (username and password) . What header parameter I should be using?  do I need API token?

BTW, I was able to update an asset object using same basic auth via API Put.

Wendy

Mikael Sandberg
Community Champion
June 4, 2024

You have to use POST, not PUT with the endpoint, here is the documentation for that endpoint. 

Wendy Wei June 4, 2024

I tried to follow this documentation before as well:

--url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/create' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'

 

still get error, it is 401 unauthorized errir when using Bearer Token under Authorization tab on Postman, 

but 500 error if switch to basic Auth.

I believe my json payload is good, but something is off on header or authrization..

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events