When I created the
IT service Management Project from the existing templates that Atlassian provides, there was a field name
Affected Services. Initially, the field had no values. So I went to Projects > Services and added a few services to it.
On the customer portal, these services are getting displayed.
But when I hit the API endpoint for
Get request type fields, the response is as follows:
"name": "Affected services",
validValues is an empty array. On the API documentation, I couldn’t find an endpoint to get these values. So I wanted to know, is it possible to get these services using the Servicedesk API?
Similar to your labels question, I don’t know what constraints make you want to stick to the JSM/JSD API. In this case, assets have their own API: the Assets Platform APIs allow clients to search assets using
I appologise for following up so late on this issue but I am a bit confused. I am talking about the services that can be added into a service project created from the IT service management template. Here’s the image of it:
So in the image you can see that I have added 2 services:
MsTeams. These 2 values are displayed on the
Affected Services field on the customer portal.
What are assets, and will it return the service I just talked about?
I tried out the
GET /rest/assetapi/asset/search endpoint but it returned an empty array.
On an open issue page, I found this undocumented API endpoint, which is used by the Affected Services field to suggest services:
It did return the response I was looking for. Here’s the image for the API call:
I had to specify the ?query= in the API call to get all the values. Without that it was returning nothing.)
Is this the correct method to get services? Is there any other method that is documented and that Atlassian suggests to use?
Thanks for explaining in more detail. You haven’t missed anything. The ability to query affected services seems to be a feature request:
Please watch, vote, and comment.