{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":551,"path":"api-reference/rest-apis/sg_services-api.md","title":"SG Services API","bundle":null,"doc_type":null,"release":"australia","body":"\n# SG Services API\n\nThe SG Services API provides endpoints to create and manage application services and the upstream relationships between them.\n\n## Request apps on the Store\n\nVisit the [ServiceNow Store](https://store.servicenow.com/sn_appstore_store.do#!/store/home) website to view all the available apps and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the [ServiceNow Store release notes](https://www.servicenow.com/docs/r/store-release-notes/sn-store-release-notes.html).\n\nThis API can only be used when the CMDB Application API and CLI \\(sn\\_service\\_graph\\) plugin is activated. This API is used within the `sn_service_graph` namespace.\n\nUsing this API does not require details regarding source tables or relationship types.\n\nTo script critical operations which support automation across the enterprise, you can leverage APIs or run command line operations that the CMDB Application CLI and API store app provide instead of using the user interface. The CMDB Application CLI and API store app provides a robust framework which consolidates all the APIs that are related to application services and the command lines that let you access the interface to those APIs.\n\nCMDB Application CLI and API commands enable the following tasks:\n\n-   Registering and creating an application service and establishing upstream relationships\n-   Getting details of a given application service and its upstream relationships\n-   Connecting higher level constructs such as business applications and business service offerings\n-   Populating an application service with a given population type\n-   Changing the state of an application service\n\nFor the command line solution, see [CMDB Application CLI and API available commands](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/cmdb-cli-commands.md).\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## SG Services – POST /sg\\_services/app\\_service/convert\n\nConverts a manual or empty type application service to a calculated application service. During conversion, the application service record moves into the \\[cmdb\\_ci\\_service\\_calculated\\] table with the newly assigned class.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/convert`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/convert`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nlevels\n\n</td><td>\n\nNumber of levels to include in the conversion.Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to convert an application service type.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/convert\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n \\\"name\\\": \\\"Test Register\\\",\n \\\"environment\\\": \\\"Test\\\",\n \\\"version\\\": \\\"1.0\\\",\n \\\"levels\\\" : 8\n}\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful conversion to a calculated application service.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/delete\n\nDeletes an application service.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/delete`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/delete`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_e5t_gwt_gqb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_pvd_l5t_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to delete an application service.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/delete\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   \\\"name\\\": \\\"Test Register\\\",\n   \\\"environment\\\": \\\"Test\\\",\n   \\\"version\\\": \\\"1.0\\\"\n}\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful removal of an application service.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/find\n\nFinds the details of a given application service and its upstream relationships.\n\nUsers with the app\\_service\\_user role can use this API, but results are restricted to application services in Operational status. The app\\_service\\_admin role provides unlimited viewing of application services.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/find`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/find`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE fields&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\noperational\\_status\n\n</td><td>\n\nOperational status of the application service. For example, active.Data type: String\n\n</td></tr><tr><td>\n\nrelationships\n\n</td><td>\n\nList of objects defining the application service's upstream relationships.Data type: Array\n\n ```\n\"relationships\": [\n {\n    \"name\": \"String\",\n    \"number\": \"String\",\n    \"sys_id\": \"String\",\n    \"class_name\": \"String\",\n    \"relationship\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelationships.class\\_name\n\n</td><td>\n\nName of the class that contains the application service.Data type: String\n\n</td></tr><tr><td>\n\nrelationships.name\n\n</td><td>\n\nName of the relationship.Data type: String\n\n</td></tr><tr><td>\n\nrelationships.number\n\n</td><td>\n\nUnique number of the relationship.Data type: String\n\n</td></tr><tr><td>\n\nrelationships.relationship\n\n</td><td>\n\nThe relationship rule.Data type: String\n\n</td></tr><tr><td>\n\nrelationships.sys\\_id\n\n</td><td>\n\nSys\\_id of the relationship.Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to find details of an application service.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/find\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n   \\\"name\\\": \\\"Test App Service1\\\"\n }\" \\\n--user 'username':'password'\n```\n\nThe response body includes the application service and relationship information.\n\n```\n{\n  \"result\": {\n    \"aliases\": null,\n    \"asset\": null,\n    \"asset_tag\": null,\n    \"assigned\": \"\",\n    \"assigned_to\": null,\n    \"assignment_group\": null,\n    \"attestation_score\": null,\n    \"attested\": \"0\",\n    \"attested_by\": null,\n    \"attested_date\": \"\",\n    \"attributes\": null,\n    \"bucket\": null,\n    \"business_contact\": null,\n    \"business_need\": null,\n    \"business_relation_manager\": null,\n    \"business_unit\": null,\n    \"busines_criticality\": \"4 - not critical\",\n    \"can_print\": \"0\",\n    \"category\": null,\n    \"change_control\": null,\n    \"checked_in\": \"\",\n    \"checked_out\": \"\",\n    \"checkout\": null,\n    \"comments\": null,\n    \"company\": null,\n    \"compatibility_dependencies\": null,\n    \"consumer_type\": \"internal\",\n    \"correlation_id\": null,\n    \"cost\": null,\n    \"cost_cc\": \"USD\",\n    \"cost_center\": null,\n    \"delivery_date\": \"\",\n    \"delivery_manager\": null,\n    \"department\": null,\n    \"discovery_source\": \"Manual Entry\",\n    \"dns_domain\": null,\n    \"due\": \"\",\n    \"due_in\": null,\n    \"duplicate_of\": null,\n    \"end_date\": \"\",\n    \"environment\": null,\n    \"fault_count\": \"0\",\n    \"first_discovered\": \"2021-07-19 20:09:48\",\n    \"fqdn\": null,\n    \"gl_account\": null,\n    \"hide_from_dashboard\": \"0\",\n    \"install_date\": \"\",\n    \"install_status\": \"1\",\n    \"invoice_number\": null,\n    \"ip_address\": null,\n    \"justification\": null,\n    \"last_discovered\": \"2021-07-19 20:09:48\",\n    \"last_review_date\": \"\",\n    \"layer\": null,\n    \"lease_id\": null,\n    \"life_cycle_stage\": null,\n    \"life_cycle_stage_status\": null,\n    \"location\": null,\n    \"mac_address\": null,\n    \"maintenance_schedule\": null,\n    \"managed_by\": null,\n    \"managed_by_group\": null,\n    \"manufacturer\": null,\n    \"model_id\": null,\n    \"model_number\": null,\n    \"monitor\": \"0\",\n    \"monitoring_requirements\": null,\n    \"name\": \"Test App Service1\",\n    \"number\": \"SNSVC0001014\",\n    \"operational_status\": \"2\",\n    \"order_date\": \"\",\n    \"owned_by\": null,\n    \"parent\": null,\n    \"portfolio_status\": \"pipeline\",\n    \"po_number\": null,\n    \"prerequisites\": null,\n    \"price_model\": \"per_unit\",\n    \"price_unit\": null,\n    \"published_ref\": null,\n    \"purchase_date\": \"\",\n    \"schedule\": null,\n    \"serial_number\": null,\n    \"service_classification\": \"Application Service\",\n    \"service_level_requirement\": null,\n    \"service_owner_delegate\": null,\n    \"service_status\": \"requirements\",\n    \"severity\": null,\n    \"short_description\": null,\n    \"skip_sync\": \"0\",\n    \"sla\": null,\n    \"spm_service_portfolio\": null,\n    \"spm_taxonomy_node\": null,\n    \"stakeholders\": null,\n    \"start_date\": \"\",\n    \"state\": null,\n    \"subcategory\": null,\n    \"supported_by\": null,\n    \"support_group\": null,\n    \"sys_class_name\": \"cmdb_ci_service_auto\",\n    \"sys_class_path\": \"/!!/!7/!(\",\n    \"sys_created_by\": \"admin\",\n    \"sys_created_on\": \"2021-07-19 20:09:48\",\n    \"sys_domain\": \"global\",\n    \"sys_domain_path\": \"/\",\n    \"sys_id\": \"a2f0618040697410f87713b656474255\",\n    \"sys_mod_count\": \"0\",\n    \"sys_updated_by\": \"admin\",\n    \"sys_updated_on\": \"2021-07-19 20:09:48\",\n    \"unit_description\": null,\n    \"unverified\": \"0\",\n    \"used_for\": \"Production\",\n    \"user_group\": null,\n    \"vendor\": null,\n    \"version\": null,\n    \"view_service\": \"61e1cb757f23220002d31ccebefa9120\",\n    \"warranty_expiration\": \"\",\n    \"relationships\": [\n      {\n        \"name\": \"Test Biz App1\",\n        \"sys_id\": \"0250a94040697410f87713b656474250\",\n        \"number\": \"APM0001001\",\n        \"class_name\": \"cmdb_ci_business_app\",\n        \"relationship\": \"Consumes::Consumed by\"\n      },\n      {\n        \"name\": \"Tech Service Offering1\",\n        \"sys_id\": \"98d0ed4040697410f87713b6564742ef\",\n        \"number\": \"BSN0001005\",\n        \"class_name\": \"service_offering\",\n        \"relationship\": \"Contains::Contained by\"\n      }\n    ]\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/populate\n\nPopulates an application service with a service population method.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/populate`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/populate`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\npopulation\\_method\n\n</td><td>\n\nRequired. Identifies the population method and its accompanying property to identify the content for population.Only one accompanying object is valid per type.\n\n Data type: Object\n\n</td></tr><tr><td>\n\npopulation\\_method.group\\_id\n\n</td><td>\n\nGroup ID of the CMDB group configured with the cmdb\\_group population type.Data type: \"String\"\n\n ```\n\"population_method\": {\n  \"group_id\": \"String\",\n  \"type\": \"cmdb_group\"\n}\n```\n\n Associated population type: cmdb\\_group\n\n</td></tr><tr><td>\n\npopulation\\_method.levels\n\n</td><td>\n\nNumber of levels to use in building the service. If the level value is not provided, the system checks the sys\\_property for the value. If svc.manual.convert.levels.default\\_value is not populated, a default value of 3 is used.Data type: Number\n\n ```\n\"population_method\": {\n  \"levels\": Number,\n  \"type\": \"dynamic_service\"\n}\n```\n\n Associated population type: dynamic\\_service\n\n Default: 3 if no level value is set for the sys\\_property\n\n</td></tr><tr><td>\n\npopulation\\_method.service\\_candidate\n\n</td><td>\n\nUnique identifier of the service candidate.\n\n Data type: String\n\n ```\n\"population_method\": {\n  \"service_candidate\": \"String\",\n  \"type\": \"tag_based_service_family\"\n}\n```\n\n Associated population type: tag\\_based\\_service\\_family\n\n</td></tr><tr><td>\n\npopulation\\_method.service\\_relations\n\n</td><td>\n\nList of objects containing hierarchy data for the CIs within the application service. All CIs form pairs with a parent and child CI. The top-level CI, referred to as the entry point of an application service, does not have a parent CI.Data type: Array\n\n ```\n\"population_method\": {\n\n  \"service_relations\":[\n     {\n      \"child\": \"String\",\n      \"parent\": \"String\"\n     }\n  ],\n\n  \"type\": \"service_hierarchy\"   \n}\n```\n\n Associated population type: service\\_hierarchy\n\n</td></tr><tr><td>\n\npopulation\\_method.service\\_relations.child\n\n</td><td>\n\nName of a child CI related to the CI.Data type: String\n\n</td></tr><tr><td>\n\npopulation\\_method.service\\_relations.parent\n\n</td><td>\n\nName of a parent CI related to the CI.Data type: String\n\n</td></tr><tr><td>\n\npopulation\\_method.tags\n\n</td><td>\n\nList of objects containing tags to associate with the CI. This information is located in the Key Values \\[cmdb\\_key\\_value\\] table.Data type: Array\n\n ```\n\"population_method\": {\n\n  \"tags\": [\n     {\n      \"tag\": \"String\",\n      \"value\": \"String\"\n     }\n  ],\n\n  \"type\": \"tag_list\"  \n}\n```\n\n Associated population type: tag\\_list\n\n</td></tr><tr><td>\n\npopulation\\_method.tags.tag\n\n</td><td>\n\nTag name.Data type: String\n\n</td></tr><tr><td>\n\npopulation\\_method.tags.value\n\n</td><td>\n\nTag value.Data type: String\n\n</td></tr><tr><td>\n\npopulation\\_method.type\n\n</td><td>\n\nRequired. Population type to add to the application service.Data type: Object\n\n Valid values:\n\n-   cmdb\\_group\n-   service\\_hierarchy\n-   dynamic\\_service\n-   tag\\_list\n-   tag\\_based\\_service\\_family\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to populate an application service with a dynamic\\_service type.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/populate\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"name\\\": \\\"Test Register\\\",\n  \\\"environment\\\": \\\"Test\\\",\n  \\\"version\\\": \\\"1.0\\\",\n\n \\\"population_method\\\": {\n   \\\"type\\\": \\\"dynamic_service\\\",\n   \\\"levels\\\" : 8\n  }\n}\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful population of an application service.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/register\n\nCreates an application service, tags and constructs upstream relationships such as business applications, business service offerings, and other application services.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/register`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/register`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nrelationships\n\n</td><td>\n\nUpstream relationships categorized by type.Data type: Object\n\n ```\n\"relationships\": {\n \"business_app\": [Array],\n \"business_service_offering\": [Array],\n \"parent_app_service\": [Array],\n \"technical_service_offering\": [Array]\n}\n```\n\n Maximum number of relationships is 25.\n\n</td></tr><tr><td>\n\nrelationships.business\\_app\n\n</td><td>\n\nList of objects representing Business Application relationship types. These values can be defined using one of the following items as key-value pairs.\n\n-   &lt;IRE field name&gt;\n-   number\n-   sys\\_id\n\n Data type: Array\n\n</td></tr><tr><td>\n\nrelationships.business\\_service\\_offering\n\n</td><td>\n\nList of objects representing Business Service Offering relationship types. These values can be defined using the following items as key-value pairs.\n\n-   &lt;IRE field name&gt;\n-   number\n-   sys\\_id\n\n Data type: Array\n\n</td></tr><tr><td>\n\nrelationships.parent\\_app\\_service\n\n</td><td>\n\nList of objects representing Application Service relationship types. These values can be defined using the following items as key-value pairs.\n\n-   &lt;IRE field name&gt;\n-   number\n-   sys\\_id\n\n Data type: Array\n\n</td></tr><tr><td>\n\nrelationships.technical\\_service\\_offering\n\n</td><td>\n\nList of objects representing technology management offering \\(formerly technical service offering\\)relationship types. These values can be defined using the following items as key-value pairs.\n\n-   &lt;IRE field name&gt;\n-   number\n-   sys\\_id\n\n Data type: Array\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr><tr><td>\n\ntags\n\n</td><td>\n\nList of objects containing tag definitions as key-value pairs.```\n\"tags\": [\n {\n  \"key\": \"String\",\n  \"value\": \"String\"\n }]\n```\n\n Data type: Array\n\n</td></tr><tr><td>\n\ntags.key\n\n</td><td>\n\nTag category name.Data type: String\n\n</td></tr><tr><td>\n\ntags.value\n\n</td><td>\n\nTag value.Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|cHeader|Description|\n|-------|-----------|\n|none| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\ncHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napp\\_service\n\n</td><td>\n\nApplication service details.Data type: Object\n\n ```\n\"app_service\": {\n  \"name\": \"String\",\n  \"number\": \"String\",\n  \"sys_id\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\napp\\_service.name\n\n</td><td>\n\nName of the application service.Data type: String\n\n</td></tr><tr><td>\n\napp\\_service.number\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\napp\\_service.sys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr><tr><td>\n\nmessage\n\n</td><td>\n\nMessage describing the status.Possible values:\n\n-   Service already exists\n-   Service registered successfully\n\n Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nStatus indicating whether the service has been registered.Possible values:\n\n-   Insert: The application service was successfully created.\n-   No action: The application service already exists. No action taken.\n\n Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to register an application service.\n\n```\ncurl \"instance.service-now.com/api/sn_service_graph/sg_services/app_service/register\" \\--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"name\\\": \\\"Test Register\\\",\n  \\\"environment\\\": \\\"Test\\\",\n  \\\"version\\\": \\\"1.0\\\",\n  \\\"number\\\": \\\" SNSVC0001014\\\",\n  \\\"relationships\\\": {\n    \\\"business_application\\\": [\n      {\n        \\\"sys_id\\\": \\\"0250a94040697410f87713b656474250\\\"\n      },\n      {\n        \\\"number\\\": \\\"APM0001002\\\"\n      },\n      {\n        \\\"name\\\": \\\"Test Biz App1\\\"\n      }\n    ],\n    \\\"business_service_offering\\\": [\n      {\n        \\\"sys_id\\\": \\\"ed32e98040697410f87713b656474259\\\"\n      }\n    ],\n    \\\"technical_service_offering\\\": [\n      {\n        \\\"sys_id\\\": \\\"80e12d8040697410f87713b65647421c\\\"\n      },\n      {\n        \\\"number\\\": \\\"BSN0001005\\\"\n      },\n      {\n        \\\"name\\\": \\\"Tech Service Offering2\\\"\n      }\n    ],\n    \\\"parent_app_service\\\": [\n      {\n        \\\"sys_id\\\": \\\"a2f0618040697410f87713b656474255\\\"\n      }\n    ]\n  },\n  \\\"tags\\\": [\n    {\n      \\\"key\\\": \\\"key1\\\",\n      \\\"value\\\": \\\"value1\\\"\n    },\n    {\n      \\\"key\\\": \\\"key2\\\",\n      \\\"value\\\": \\\"value2\\\"\n    }\n  ]\n}\" \\\n--user 'username':'password'\n```\n\nThe response body includes ID and status information.\n\n```\n{\n  \"result\": {\n    \"app_service\": {\n      \"sys_id\": \"5780cb604061f410f87713b656474271\",\n      \"name\": \"Test Register\",\n      \"number\": \" SNSVC0001014\"\n    },\n    \"message\": \"Service registered successfully\",\n    \"status\": \"INSERT\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/relationship/create\n\nConstructs upstream relations such as business applications, business service offerings, and other application services.\n\nThis API creates a relationship, taking input with a single parent and a corresponding child object.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/relationship/create`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/relationship/create`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchild\n\n</td><td>\n\nInformation identifying the child application service with which to create a relationship.A dynamic CI group can be added as a child but cannot be parent.\n\nData type: Object\n\n```\n\"child\": {\n  \"<service_app_identifier>\": \"String\"\n}\n```\n\nTable: Service Instance \\[cmdb\\_ci\\_service\\_auto\\]\n\n</td></tr><tr><td>\n\nchild.&lt;service\\_app\\_identifier&gt;\n\n</td><td>\n\nDetails identifying the child application service with which to create a relationship.Only one option is required. Each option is listed by processing precedence:\n\n-   sys\\_id: Sys\\_id of the child application service.\n-   number: Unique number that identifies the child application service.\n-   &lt;IRE field name&gt;: IRE fields identifying the application service. For example, name or version.\n\nData type: String\n\n</td></tr><tr><td>\n\nparent\n\n</td><td>\n\nDetails identifying the parent application service with which to create a relationship.Data type: Object\n\n```\n\"parent\": {\n  \"<service_app_identifier>\": \"String\",\n  \"class_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nparent.&lt;service\\_app\\_identifier&gt;\n\n</td><td>\n\nInformation identifying the application service.Only one option is required. Each option is listed by processing precedence:\n\n-   sys\\_id: Sys\\_id the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\].\n-   number: Unique number that identifies the application service.\n-   &lt;IRE field name&gt;: One or more IRE fields identifying the application service. For example, name or version.\n\nData type: String\n\n</td></tr><tr><td>\n\nparent.class\\_name\n\n</td><td>\n\nName of the class that contains the application service.The parent class name should be from one of the following tables:\n\n-   cmdb\\_ci\\_business\\_app\n-   cmdb\\_ci\\_service\\_auto\n-   cmdb\\_ci\\_service\\_by\\_tags\n-   cmdb\\_ci\\_service\\_calculated\n-   cmdb\\_ci\\_service\\_discovered\n-   service\\_offering\n\nDefault: cmdb\\_ci\\_service\\_auto\n\nData type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how create a relationship from an application service.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/relationship/create\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"child\\\": {\n   \\\"name\\\": \\\"wdfsdf\\\",\n   \\\"environment\\\": \\\"Test\\\",\n   \\\"version\\\": \\\"1.0\\\"\n   },\n  \\\"parent\\\": {\n   \\\"sys_id\\\": \\\"abcdefg\\\",\n   \\\"name\\\": \\\"business App1\\\",\n   \\\"class_name\\\": \\\"service_offering\\\"\n  }\n}\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful creation of an application service relationship.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/relationship/delete\n\nDeletes an application service upstream relationship.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/relationship/delete`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/relationship/delete`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchild\n\n</td><td>\n\nInformation describing the child relationship to be deleted from the service application.Data type: Object\n\n ```\n\"child\": {\n  \"<IRE field name>\": \"String\",\n  \"number\": \"String\",\n  \"sys_id\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchild.&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the child application service. For example, name or version.Data type: String\n\n</td></tr><tr><td>\n\nchild.number\n\n</td><td>\n\nUnique number that identifies the child application service.Data type: String\n\n</td></tr><tr><td>\n\nchild.sys\\_id\n\n</td><td>\n\nSys\\_id of the child application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\].Data type: String\n\n</td></tr><tr><td>\n\nparent\n\n</td><td>\n\nDetails identifying the parent application service from which to remove a relationship.Data type: Object\n\n ```\n\"parent\": {\n  \"<IRE field name>\": \"String\",\n  \"number\": \"String\",\n  \"sys_id\": \"String\",\n  \"class_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nparent.&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nparent.number\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nparent.sys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr><tr><td>\n\nparent.class\\_name\n\n</td><td>\n\nName of the class that contains the application service.The parent class name should be from one of the following tables:\n\n-   cmdb\\_ci\\_service\\_auto\n-   cmdb\\_ci\\_service\\_discovered\n-   cmdb\\_ci\\_service\\_by\\_tags\n-   cmdb\\_ci\\_service\\_calculated\n-   service\\_offering\n-   cmdb\\_ci\\_business\\_app\n\n Default: cmdb\\_ci\\_service\\_auto\n\n Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to remove a relationship from an application service.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/relationship/delete\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"child\\\": {\n  \\\"name\\\": \\\"Test Register\\\",\n  \\\"environment\\\": \\\"Test\\\",\n  \\\"version\\\": \\\"1.0\\\"\n\n  },\n  \\\"parent\\\": {\n   \\\"sys_id\\\": \\\"abcdefg\\\",\n   \\\"name\\\": \\\"business App1\\\",\n   \\\"class_name\\\": \\\"service_offering\\\"\n     }\n }\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful removal of an application service relationship.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/state\n\nChanges the application service lifecycle state to activate, deactivate, or retire.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/state`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/state`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"table_h3q_lsx_gqb\" class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nstate\n\n</td><td>\n\nRequired. Lifecycle state of the application service. Valid values:\n\n-   ACTIVATE – Life cycle is operational and in use.\n    -   life\\_cycle\\_stage=Operational\n    -   life\\_cycle\\_stage\\_status=In Use\n    -   operational\\_status=Operational\n-   DEACTIVATE – Life cycle is not operational and is in the design stage.\n    -   life\\_cycle\\_stage=Design\n    -   life\\_cycle\\_stage\\_status=Build\n    -   operational\\_status=Non-Operational\n-   RETIRE – End of life.\n    -   life\\_cycle\\_stage=End Of Life\n    -   life\\_cycle\\_stage\\_status=Retired\n    -   operational\\_status=Retired\n\nData type: String\n\nStored in: Service Instance \\[cmdb\\_ci\\_service\\_auto\\]\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstatus\n\n</td><td>\n\nIndicates success or failure.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to change an application service lifecycle state to activate.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/state\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  {\n  \\\"name\\\": \\\"Test Register\\\",\n  \\\"environment\\\": \\\"Test\\\",\n  \\\"version\\\": \\\"1.0\\\",\n  \\\"state\\\": \\\"activate\\\"\n  }\n}\" \\\n--user 'username':'password'\n```\n\nResults indicating a successful operation.\n\n```\n{\n  \"result\": {\n  \"status\": \"success\"\n  }\n}\n```\n\n## SG Services – POST /sg\\_services/app\\_service/update\n\nUpdates an existing application service provided and creates tags for the given application service.\n\nThe following properties for identifying a CI take precedence as follows:\n\n1.  sys\\_id – If sys\\_id, the system only uses the sys\\_id and ignores any additional values.\n2.  number – If provided without the sys\\_id, the system only uses the number and ignores any additional values.\n3.  &lt;IRE field name&gt; – The system only uses these values if the sys\\_id or number are not provided.\n\n### URL format\n\nVersioned URL: `/api/sn_service_graph/{api_version}/sg_services/app_service/update`\n\nDefault URL: `/api/sn_service_graph/sg_services/app_service/update`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table><table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;fields or tags to update&gt;\n\n</td><td>\n\nUse key-value pairs to identify each field or tag to be updated.Only basic information can be updated, no upstream relationships can be updated.\n\n Data type: String\n\n</td></tr><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. You can send the sys\\_id, number or IRE to identify an application service; however, none of these fields can be updated when used as an identifier. To update the IRE fields, input should include the sys\\_id or number as an identifier.\n\n Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or the user does not have the app\\_service\\_admin role.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table id=\"table_iyx_jnx_gqb\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;IRE field name&gt;\n\n</td><td>\n\nOne or more IRE fields identifying the application service. For example, name or version. Data type: String\n\n</td></tr><tr><td>\n\nnumber\n\n</td><td>\n\nUnique number that identifies the application service. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the application service listed in the Service Instance \\[cmdb\\_ci\\_service\\_auto\\] table. Data type: String\n\n</td></tr><tr><td>\n\n&lt;updated fields&gt;\n\n</td><td>\n\nIf the update is successful, each modified field sent in the payload is listed in the response body.\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to update an application service, using name as an IRE field.\n\n```\ncurl \"https://instance.service-now.com/api/sn_service_graph/sg_services/app_service/update\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  {\n   \\\"name\\\": \\\"Test Register\\\",\n   \\\"environment\\\": \\\"Test\\\",\n   \\\"version\\\": \\\"1.0\\\"\n  }\n}\" \\\n--user 'username':'password'\n```\n\nResponse includes application service identification information and updated fields.\n\n```\n{\n  \"result\": {\n  \"sys_id\": \"123456\",\n  \"number\": \"SVCKji0w9e\",\n  \"name\": \"Test Register\",\n  \"environment\": \"Test\",\n  \"version\": \"1.0\"\n  }\n}\n```\n\n"}}