Retiring a service


I’m trying to solve the following problem:

  1. I order a service using the service catalogs / service templates.

  2. The response provides service_requests endpoint to status the order until completion.

  3. A service is created under My Services

  4. Let’s say 3 weeks later I want to retire this service via the api:

How do I determine what the services id is via the api? It isn’t provided in the initial response or the order call or the status call to the service_requests endpoint. I’m trying to capture information on the order that I can then use later to retire and I’m not sure how to do that. Any insight would be great! Thanks!


@gtanzillo can you review this question from @tobmat and forward to another SME if necessary.


One way is if you know the name of the new service that will be created when ordering it via the service_templates, then you can find it via:

GET /api/services?expand=resources&filter[]=name='<name_of_service>'

The other way is to find the service by service request id, when you order the service via:

POST /api/service_catalogs/<service_catalog_id>/service_templates/<service_template_id>

You get the service_request back which would have an id.

Assuming the service order is approved and goes through and the service is created, then you can search for that service via the service_request id as follows:

GET /api/services?expand=resources&filter[]<service_request_id>

which you can then retire as per

Hope this helps,