The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

I would like to create asset using rest API but, getting unauth error

Sivakumar Ramaswamy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2024

I am able to read the assets but, it is failing whilst writing and I can create asset from GUI.

```

curl --request POST \
--url 'https://api.atlassian.com/jsm/assets/workspace/dsafasdfsadfasdf/v1/object/create' \
--header 'Authorization: Bearer sdfasdfertrethdgfghdsfgdfsgsdfgdsfgdfg' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"objectTypeId":"9","attributes":[{"objectTypeAttributeId":"45","objectAttributeValues":[{"value":"test"}]},{"objectTypeAttributeId":"82","objectAttributeValues":[{"value":"guidd"}]},{"objectTypeAttributeId":"83","objectAttributeValues":[{"value":""}]}],"hasAvatar":false,"avatarUUID":""}'

 

```

Response:

 

{"code":401,"message":"Unauthorized"}%

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Zamorano Salvatierra Nelson Ivan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2024

were you able to solve this problem? I get the same message in my environment for https://api.atlassian.com/jsm/assets/workspace

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events