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"}%

0 answers

Suggest an answer

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

Atlassian Community Events