In the schemas i can see there is by default a Services schema, you add manually services to this or you can add services through service desk manually and they are pulled into this schema
what i cant do is to create a service via an api call, if i use the asset api i get a forbidden 403 and the Services schema is locked and readonly.
Is there a way to create a service via an api call.
Yes, its possible with GraphQL.
https://developer.atlassian.com/platform/atlassian-graphql-api/graphql/
Here a sample:
mutation CreateService ($input:CreateDevOpsServiceInput!) {
createDevOpsService(input: $input) {
success
}
}
Variable:
{
"input": {
"cloudId": "yourCloudId-a457-4b6e-ac0b-....",
"name": "Name of Service",
"description": "Description",
"properties": [
{
"key": "stakeholders",
"value": {}
}
],
"serviceTier": {
"level": 3
},
"serviceType": {
"key": "BUSINESS_SERVICES"
}
}
}
Hi @Oliver Wood
This should be able to help you
shows step by step asset creation via REST api.
Any other questions please call out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for that, however i know i can create objects via api to schemas i have created, but the Services(SVC) comes out of the box and when i try to create an object in that schema error i get a 403 forbidden error.
So my question was is it possible to create services in that schema via api or is it the fact that its locked down means it not possible to do so?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm running into the same problem. 403 with this type of error response
{"errorMessages":["Sorry, you do not have permission to perform this action. PermissionInsightException: User REDACTED didn't have correct permission (create object) for object type: NUMBER"],"errors":{}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on some web request captures, I do see that it is possible to use the graph API ( operationName":"gqlJiraJsmServicesCreateDevOpsServiceMutation") to POST and create the service object, however I cannot find any documentation that shows this as a supported approach.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Oliver Wood / @Keith Croxford
It may be possible to post Services via Opsgenie Service API.
Haven't tried that before.
Please note: "Create service request is used to add new services for teams and it is a write request. If the integration of the API key configured as read-only, the request will not be accepted."
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.