Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create/Update Service via Asset REST API

Szymon Lyszkowski
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!
April 18, 2024

Hello Atlassian Team,

I'm trying to create a Service via asset rest api.
Unfortunately when I try to do it I got following response:

{"errorMessages":["Sorry, you do not have permission to perform this action. PermissionInsightException: User XXXX didn't have correct permission (create object) for object type: 1"],"errors":{}}
 

 

My API key has full admin rights on atlassian product.

Example request:

curl --request POST \

--url 'https://api.atlassian.com/jsm/assets/workspace/XXXXXX/v1/object/create' \

-u username@domain.com:$ATLASSIAN_API_KEY \

--header 'Accept: application/json' \

--header 'Content-Type: application/json' \

--data '{

"objectTypeId": "1",

"attributes": [

{

"objectTypeAttributeId": "2",

"objectAttributeValues": [

{

"value": "Test"

}

]

},

{

"objectTypeAttributeId": "6",

"objectAttributeValues": [

{

"value": "Tier 2"

}

]

}

]

}'


Is there any way to create/update a Service with values for fields: name, tier, description, service owner, responder via atlassian REST API (can be opsgenie, asset api or any other)? 


P.S Previously I've tried to use opsgenie service api  but it seems to be very limited. It allows only to define:
* Mandatory fields  team_id name, Optional fields are: description, tags. 
*
Mandatory fields id name. Optional fields are: description, tags.

Is there any way using opsgenie service api to define other fields for service? i.e tier, service owners, change approvers, repository, service type? 

0 answers

Suggest an answer

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

Atlassian Community Events