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
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
@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
You have to use POST, not PUT with the endpoint, here is the documentation for that endpoint.
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..
It looks like you're new here. Sign in or register to get started.