---
sourceDocument: Yokohama API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/api-reference

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Application Service API

# Application Service API {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 16 minutes to read

The Application Service API provides endpoints that enable you to
create, modify, and update application services.

This API requires that the user have the Application Service administrator \[app_service_admin\]
role.  
Important:  
Starting with the Rome release, the Application Service API is no longer enhanced or supported. For details, see the [Deprecation Process \[KB0867184\]](https://support.servicenow.com/kb_view.do?sysparm_article=KB0867184) article in the Now Support Knowledge Base.

## Application Service - GET /now/cmdb/app_service/{sys_id}/getContent {#ariaid-title2}

Retrieves a list of configuration items (CI) in a mapped application service and the
relationships between them. Only retrieves content for services that were manually
created.

### URL format {#appservice-GET-getContent__section_lwf_psn_wlb}

Default URL:
/api/now/cmdb/app_service/{sys_id}/getContent

### Supported request parameters

{#appservice-GET-getContent__entry__2}

| Name | Description |
|-|-|
| sys_id | Sys_id of the mapped application service. Data type: String Table: Mapped Application Service \[cmdb_ci_service_discovered\] |
[Table 1. Path parameters]

{#appservice-GET-getContent__entry__6}

| Name | Description |
|-|-|
| Mode | Amount of relationship data to return. Valid values: * Full: Return CI attributes and lookup information in addition to the data returned in shallow mode. * Shallow: Return parent and child relationships between CIs within a service. {#appservice-GET-getContent__ul_mcl_cl4_ndb} The values are not case-sensitive. Data type: String |
[Table 2. Query parameters]

{#appservice-GET-getContent__entry__10}

| Name | Description |
|-|-|
| None |   |
[Table 3. Request body parameters (XML or JSON)]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-GET-getContent__entry__14}{#appservice-GET-getContent__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 4. Request headers]

{#appservice-GET-getContent__entry__18}

| Header | Description |
|-|-|
| None |   |
[Table 5. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-GET-getContent__entry__22}{#appservice-GET-getContent__entry-200-status-code}{#appservice-GET-getContent__entry-400-status-code}{#appservice-GET-getContent__entry-401-appservice}{#appservice-GET-getContent__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or they do not have the app_service_admin role. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 6. Status codes]

### Response body parameters (JSON or XML)

{#appservice-GET-getContent__table_nyj_nl4_wlb__entry__2}

| Name | Description |
|-|-|
| cmdb | List of objects that describe the CIs associated with the specified application service. Data type: Object "cmdb": [ { "items": {Object}, "relations": [Array] } ] |
| cmdb.items | CIs within the application service. If the full query parameter was passed in the request, this section includes attributes and lookup information for each CI. Data type: Array "items": [ { "className": "String", "values": {Object} } ] |
| cmdb.items.className | Name of the class that contains the CI. Data type: String |
| cmdb.items.values | Information to use to locate an associated CI. Data type: Object "values": { "name": "String", "sys_id": "String" } |
| cmdb.items.values.name | Name of the CI. Data type: String |
| cmdb.items.values.sys_id | Sys_id of the CI. Data type: String |
| cmdb.relations | Relationship data for associated CIs, such as hosts and their children. Data type: Array |
| service | List of services related to the identified service. Data type: Array of Objects "service": [ { "name": "String", "service_relations": [Array], "url": "String" } ] |
| service.name | Name of the application service. Data type: String |
| service.service_relations | 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 of Objects "service_relations": [ { "child": "String", "parent": "String" } ] |
| service.service_relations.child | Name of a child CI related to the CI. Data type: String |
| service.service_relations.parent | Name of a parent CI related to the CI. Data type: String |
| service.url | Relative path to the application service. Data type: String |
[ ]

{#appservice-GET-getContent__table_nyj_nl4_wlb}  

### Sample cURL request

    curl "https://instance.servicenow.com/api/now/cmdb/app_service/2fce42d80a0a0bb4004af34d7e3984c8/getContent?mode=shallow" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

    {
      "service": {
        "name": "PeopleSoft Portals",
        "url": "/api/now/table/cmdb_ci_service_discovered/2fce42d80a0a0bb4004af34d7e3984c8",
        "service_relations": [
          {
            "parent": "",
            "child": "3a2810c20a0a0bb400268337d6e942ca"
          },
          {
            "parent": "3a27f1520a0a0bb400ecd6ff7afcf036",
            "child": "3a5dd3dbc0a8ce0100655f1ec66ed42c"
          },
          {
            "parent": "3a290cc60a0a0bb400000bdb386af1cf",
            "child": "3a307c930a0a0bb400353965d0b8861f"
          },
          {
            "parent": "3a172e820a0a0bb40034228e9f65f1be",
            "child": "3a27d4370a0a0bb4006316812bf45439"
          },
          {
            "parent": "",
            "child": "3a172e820a0a0bb40034228e9f65f1be"
          },
          {
            "parent": "",
            "child": "3a27f1520a0a0bb400ecd6ff7afcf036"
          },
          {
            "parent": "3a2810c20a0a0bb400268337d6e942ca",
            "child": "3a290cc60a0a0bb400000bdb386af1cf"
          }
        ]
      },
      "cmdb": {
        "relations": [],
        "items": [
          {
            "values": {
              "sys_id": "3a172e820a0a0bb40034228e9f65f1be",
              "name": "PS LoadBal01"
            },
            "className": "cmdb_ci_win_server"
          },
          {
            "values": {
              "sys_id": "3a2810c20a0a0bb400268337d6e942ca",
              "name": "PS Apache03"
            },
            "className": "cmdb_ci_web_server"
          },
          {
            "values": {
              "sys_id": "55b35562c0a8010e01cff22378e0aea9",
              "name": "ny8500-nbxs08"
            },
            "className": "cmdb_ci_netgear"
          },
          {
            "values": {
              "sys_id": "3a27f1520a0a0bb400ecd6ff7afcf036",
              "name": "PS Apache02"
            },
            "className": "cmdb_ci_web_server"
          },
          {
            "values": {
              "sys_id": "3a307c930a0a0bb400353965d0b8861f",
              "name": "PS ORA01"
            },
            "className": "cmdb_ci_database"
          }
        ]
      }
    }

## Application Service - GET /now/cmdb/csdm/app_service/find_service {#ariaid-title3}

Returns basic information about a specified application service and its associated
business context.
Note:  
This endpoint has been deprecated, use [SG Services -- POST /sg_services/app_service/find](https://www.servicenow.com/docs/eU7TgOamBK46d4bQUO_ZAw#sg_svcs-POST-find "Finds the details of a given application service and its upstream relationships.") instead.

### URL format

Default URL:
/api/now/cmdb/csdm/app_service/find_service

### Supported request parameters

{#appservice-GET-find_service__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 7. Path parameters]

{#appservice-GET-find_service__entry__6}

| Name | Description |
|-|-|
| name | Required, if number is not passed in. Name of the service for which to return information. Data type: String Table: Service Instance \[cmdb_ci_service_auto\] |
| number | Required, if name is not passed in. Unique number that identifies the application service for which to return information. Data type: String Table: Service Instance \[cmdb_ci_service_auto\] |
[Table 8. Query parameters]

{#appservice-GET-find_service__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 9. Request body parameters (XML or JSON)]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-GET-find_service__entry__16}{#appservice-GET-find_service__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 10. Request headers]

{#appservice-GET-find_service__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 11. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-GET-find_service__table_wwn_rhd_ct__entry__2}{#appservice-GET-find_service__entry-200-status-code}{#appservice-GET-find_service__entry-400-status-code}{#appservice-GET-find_service__entry-401-appservice}{#appservice-GET-find_service__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or they do not have the app_service_admin role. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 12. Status codes]

{#appservice-GET-find_service__table_wwn_rhd_ct}

### Response body parameters (JSON or XML)

{#appservice-GET-find_service__entry__34}{#appservice-GET-find_service__entry-error-appservice}{#appservice-GET-find_service__entry-error-details-appservice}{#appservice-GET-find_service__entry-error-message-appservice}

| Name | Description |
|-|-|
| error | Describes an encountered error. Data type: Object "error": { "details": "String", "message": "String" } |
| error.details | Additional information about the error. Data type: String |
| error.message | Message describing the error. Data type: String |
| services | Array of objects, each object containing details of services associated with the specified application service. Data type: Array "services": [ { "environment": "String", "name": "String", "number": "String", "relationships": {Object}, "sys_id": "String", "version": "String" } ] |
| services.environment | Environment in which the application service is deployed, such as "Production" or "Test Lab 2." This can be any value that makes sense to the implementer. Data type: String Maximum length: 40 Default: null |
| services.name | Required. Name of the application service. Must be a unique name from all other application services. Data type: String Maximum length: 255 |
| services.number | Unique number that identifies the application service. This value is initially generated by the endpoint. Data type: String |
| services.relationships | Service types associated with the application service. Data type: Object "relationships": { "business_app": [Array], "business_service_offering": [Array], "technical_service_offering": [Array] } |
| services.relationships.business_app | List of sys_ids of the business applications related to the application service. Data type: Array |
| services.relationships.technical_service_offering | List of sys_ids of the technology management offerings (formerly technical service offerings) related to the application service. Data type: Array |
| services.relationships.business_service_offering | List of sys_ids of the business service offerings related to the application service. Data type: Array |
| services.sys_id | Sys_id of the application service. Data type: String |
| services.version | Application service version number. Data type: String Maximum length: 40 Format: User definable Default: null |
[ ]

### Sample cURL request

    curl -X GET \
      https://instance.servicenow.com/api/now/cmdb/csdm/app_service/find_service?name=Email_East&number=SNSVC0001018 \
      -H 'Accept: application/json' \
      -u 'username':'password'

    {
    "result": {
      "services": [
        {
          "name": "Email_East",
          "number": "SNSVC0001018",
          "sys_id": "f809cb60db94101037740f95ca96190f",
          "environment": "Production",
          "version": "1.1.1",
          "relationships": {
            "business_app": [
              "658c7620db54101037740f95ca9619f2"
            ],
            "technical_service_offering": [],
            "business_service_offering": [
              "069c7e20db54101037740f95ca9619bf"
            ]
          }
        }
      ]
     }
    }

## Application Service - POST /now/cmdb/app_service/create {#ariaid-title4}

Creates an application service or update an existing application service.

### URL format

Default URL:
/api/now/cmdb/app_service/create

### Supported request parameters

{#createService-POST-api-now-cmdb-app__entry__2}

| Parameter | Description |
|-|-|
| None |   |
[Table 13. Parameters]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#createService-POST-api-now-cmdb-app__entry__6}{#createService-POST-api-now-cmdb-app__accept-RESTAPI}{#createService-POST-api-now-cmdb-app__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 14. Request headers]

{#createService-POST-api-now-cmdb-app__entry__12}

| Header | Description |
|-|-|
| None |   |
[Table 15. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#createService-POST-api-now-cmdb-app__table_wwn_rhd_ct__entry__2}{#createService-POST-api-now-cmdb-app__entry-200-status-code}{#createService-POST-api-now-cmdb-app__entry-400-status-code}{#createService-POST-api-now-cmdb-app__entry-401-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
[Table 16. Status codes]

{#createService-POST-api-now-cmdb-app__table_wwn_rhd_ct}

### Request body

The API accepts these JSON elements in the request body. In addition, you can add any field
from the Mapped Application Service \[cmdb_ci_service_discovered\] table to pass data to the
application service record. For example, to add content to the Comments field, add
`"comments": "Passing data to the Comments field"` to the JSON request.
{#createService-POST-api-now-cmdb-app__table_rm1_yjd_kv__entry__2}

| Element | Description |
|-|-|
| name | Name of the application service you wish to create or update. |
| service_relations | Information about CIs and the hierarchy they form. All CIs form pairs with a parent CI and a child CI. The top-level CI, referred to as the entry point of an application service, does not have a parent CI. |
| parent | Sys_ id of the CI whose outgoing connection joins this CI with the CI at the lower level in the map hierarchy. |
| child | Sys_ id of the CI whose incoming connection joins this CI with the CI located of the higher level in the map hierarchy. |
[Table 17. Elements accepted in the request body]

{#createService-POST-api-now-cmdb-app__table_rm1_yjd_kv}

### Response body

The API returns these JSON elements in the response body.
{#createService-POST-api-now-cmdb-app__table_mc1_pr1_tx__entry__2}

| Element | Description |
|-|-|
| URL | URL of the standard table REST API for showing the sys_id of an application service record. This element appears only if the endpoint is successful. Data type: String |
| getContentUrl | REST API path for getting the application service content. This element appears only if the endpoint is successful. Data type: String |
| info | Number of CIs added to the application service. This element appears only if the endpoint is successful. Data type: String |
| error | Error message details. This element appears only if the endpoint fails. Data type: Object |
| message | Error message describing the nature of the failure. This element appears only if the endpoint fails. Data type: String |
| status | States "failure" if the REST API fails. This element appears only if the endpoint fails. Data type: String |
[Table 18. Elements returned in the response body]

{#createService-POST-api-now-cmdb-app__table_mc1_pr1_tx}  

### Sample cURL request

    curl "http://<instance.servicenow.com>/api/now/cmdb/app_service/create" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
    \"name\": \"myTestAppService\",
    \"comments\": \"Passing data to the Comments field\",
    \"service_relations\": [
    { \"parent\": \"\",
    \"child\": \"3a70f789c0a8ce010091b0ea635b982a\"
    },{ \"parent\": \"3a70f789c0a8ce010091b0ea635b982a\",
    \"child\": \"b4fd7c8437201000deeabfc8bcbe5dc1\"
    },{ \"parent\": \"b4fd7c8437201000deeabfc8bcbe5dc1\",
    \"child\": \"53fdbc8437201000deeabfc8bcbe5d10\"
    }
    ]
    }" \
    --user 'admin':'admin'

    {
      "result": {
        "url": "/api/now/table/cmdb_ci_service_discovered/b1cff89fc9e19300964fcbb1ac3059a5",
        "getContentUrl": "/api/now/cmdb/app_service/b1cff89fc9e19300964fcbb1ac3059a5/getContent",
        "info": "3 CIs added to service"
      }
    }

## Application Service - POST /now/cmdb/csdm/app_service/register_service {#ariaid-title5}

Creates an application service record stub in the Service Instance \[cmdb_ci_service_auto\] table and populates it with the passed in information.
Before storing the record, it validates the passed parameters and the uniqueness of the application service name. It also creates upstream relationships which provide business context to the service by associating the specified business applications, business service offerings, and technology management offerings (formerly technical service offerings) to the service application. It does not create downstream relationships to infrastructure. To define downstream relationships you must call the Application Service - PUT /now/cmdb/csdm/app_service/{service_sys_id}/populate_service endpoint.  
Note:  
This endpoint has been deprecated, use [SG Services -- POST /sg_services/app_service/register](https://www.servicenow.com/docs/eU7TgOamBK46d4bQUO_ZAw#sg_svcs-POST-register "Creates an application service, tags and constructs upstream relationships such as business applications, business service offerings, and other application services.") instead.

### URL format

Default URL:
/api/now/cmdb/csdm/app_service/register_service

### Supported request parameters

{#appservice-POST-register_service__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 19. Path parameters]

{#appservice-POST-register_service__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 20. Query parameters]

{#appservice-POST-register_service__entry__10}{#appservice-POST-register_service__entry-basic_details-environment-appservice}{#appservice-POST-register_service__entry-basic_details-name-appservice}{#appservice-POST-register_service__entry-basic_details-version-appservice}{#appservice-POST-register_service__entry-relationships-bus_app-appservice}{#appservice-POST-register_service__entry-relationships-bus_srv_off-appservice}{#appservice-POST-register_service__entry-relationships-tech_srv_off-appservice}

| Name | Description |
|-|-|
| basic_details | Required. Details of the service associated with the specified application service. Data type: Object "basic_details": { "environment": "String", "name": "String", "version": "String" } |
| basic_details.environment | Environment in which the application service is deployed, such as "Production" or "Test Lab 2." This can be any value that makes sense to the implementer. Data type: String Maximum length: 40 Default: null |
| basic_details.name | Required. Name of the application service. Must be a unique name from all other application services. Data type: String Maximum length: 255 |
| basic_details.version | Application service version number. Data type: String Maximum length: 40 Format: User definable Default: null |
| relationships | Upstream (parent) service types to associate with the application service. Data type: Object "relationships": { "business_app": [Array], "business_service_offering": [Array], "technical_service_offering": [Array] } Table: CI Relationships \[cmdb_rel_ci\] |
| relationships.business_app | List of sys_ids of the business applications to relate to the application service. Data type: Array |
| relationships.business_service_offering | List of sys_ids of the business service offerings to relate to the application service. Data type: Array |
| relationships.technical_service_offering | List of sys_ids of the technical service offerings to relate to the application service. Data type: Array |
[Table 21. Request body parameters]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-POST-register_service__table_hxm_cks_mlb__entry__2}{#appservice-POST-register_service__accept-JSON-only-entry-RESTAPI}{#appservice-POST-register_service__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 22. Request headers]

{#appservice-POST-register_service__table_hxm_cks_mlb} {#appservice-POST-register_service__entry__34}

| Header | Description |
|-|-|
| None |   |
[Table 23. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-POST-register_service__table_wwn_rhd_ct__entry__2}{#appservice-POST-register_service__entry-400-status-code}{#appservice-POST-register_service__entry-401-appservice}{#appservice-POST-register_service__entry-500-status-code}

| Status code | Description |
|-|-|
| 201 | Successful. The application service was successfully registered. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or they do not have the app_service_admin role. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 24. Status codes]

{#appservice-POST-register_service__table_wwn_rhd_ct}

### Response body parameters (JSON or XML)

{#appservice-POST-register_service__entry__48}{#appservice-POST-register_service__entry-error-appservice}{#appservice-POST-register_service__entry-error-details-appservice}{#appservice-POST-register_service__entry-error-message-appservice}

| Name | Description |
|-|-|
| error | Describes an encountered error. Data type: Object "error": { "details": "String", "message": "String" } |
| error.details | Additional information about the error. Data type: String |
| error.message | Message describing the error. Data type: String |
| number | Unique number that identifies the application service. This number is generated by the endpoint. Data type: String |
| service_sys_id | Sys_id of the registered application service. Data type: String |
[ ]

### Sample cURL request

    curl -X POST \
      https://instance.servicenow.com/api/now/cmdb/csdm/app_service/register_service \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -u 'username':'password'
      -d '{
      "basic_details": {
        "environment": "Test Lab 2",
        "name": "Test Lab 2",
        "version": "1.1.1"
      },
      "relationships": {
        "business_app":["f07c7620db54101037740f95ca96199a"],
        "business_service_offering":["069c7e20db54101037740f95ca9619bf"]
      }
    }'

    {
      "result": {
        "service_sys_id": "80f21bbadbd410103d3a93c3e296199a",
        "number": "SNSVC0001018"    
      }
    }

## Application Service - PUT
/now/cmdb/csdm/app_service/{service_sys_id}/populate_service {#ariaid-title6}

Populates the specified application service with a specified set of downstream
configuration items (CI).
Before calling this endpoint, you must call the [POST
/now/cmdb/csdm/app_service/register_service](https://www.servicenow.com/docs/zUkHl0vYBvS4E1DjCVlJLA#appservice-POST-register_service "Creates an application service record stub in the Service Instance [cmdb_ci_service_auto] table and populates it with the passed in information.") endpoint to create the application service.  
Note:  
This endpoint has been deprecated, use [SG Services -- POST /sg_services/app_service/populate](https://www.servicenow.com/docs/eU7TgOamBK46d4bQUO_ZAw#sg_svcs-POST-populate "Populates an application service with a service population method.") instead.

### URL format

Default URL:
/api/now/cmdb/csdm/app_service/{service_sys_id}/populate_service

### Supported request parameters

{#appservice-PUT-populate_service__entry__2}

| Name | Description |
|-|-|
| service_sys_id | Sys_id of the application service to populate with the specified CIs. Data type: String Table: Service Instance \[cmdb_ci_service_auto\] |
[Table 25. Path parameters]

{#appservice-PUT-populate_service__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 26. Query parameters]

{#appservice-PUT-populate_service__entry__10}

| Name | Description |
|-|-|
| population_method | CIs to associate with the specified application service. The elements in the population_method object depend on the type of information being populated, which is defined by the type parameter. Data type: Object For type = cmdb_group_based "population_method": { "group_id": "String", "type": "String" } For type = discovery Note: To use this type you must activate the Service Mapping (com.snc.service-mapping) plugin. "population_method": { "attributes": [Array], "entry_point_id": "String", "type": "String" } For type = tag_list Note: To use this type you must activate the Service Mapping (com.snc.service-mapping) plugin. "population_method": { "tags": [Array], "type": "String" } |
| population_method.attributes | List of attributes to associate with the CI, such as host, port, name, and URL. Note: You must pass all required attributes. Data type: Array "attributes": { "name":"String", "value":"String" } |
| population_method.attributes.name | Name of the attribute, such as host, port, name, and URL. Data type: String |
| population_method.attributes.value | Attribute value. Data type: String |
| population_method.entry_point | Required if population_method.type = discovery. Entry point into the application service. For additional information on entry points, see [Entry point attributes](https://www.servicenow.com/docs/access?context=r_EntryPointsforBizSvcDef&version=yokohama&pubname=yokohama-it-operations-management&ft:locale=en-US) and [Create entry point types for Service Mapping](https://www.servicenow.com/docs/access?context=t_CreateEntryPoint&version=yokohama&pubname=yokohama-it-operations-management&ft:locale=en-US). Data type: String |
| population_method.group_id | Required if population_method.type = cmdb_group_based. Sys_id of the group to associate with the CI. Data type: String Title: CMDB Group \[cmdb_group\] |
| population_method.tags | List of tags to associate with the CI. Data type: Array of Objects [ "tags": { "tag": "String", "value": "String" } ] Title: Key Values \[cmdb_key_value\] |
| population_method.tags.tag | Name of the tag. Data type: String |
| population_method.tags.value | Tag value. Data type: String |
| population_method.type | Required. Type of CI to populate. Valid values: * cmdb_group_based * discovery * tag_list {#appservice-PUT-populate_service__ul_j42_5jm_tlb} Data type: String |
[Table 27. Request body parameters (XML or JSON)]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-PUT-populate_service__table_h3m_gh2_mlb__entry__2}{#appservice-PUT-populate_service__accept-JSON-only-entry-RESTAPI}{#appservice-PUT-populate_service__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 28. Request headers]

{#appservice-PUT-populate_service__table_h3m_gh2_mlb} {#appservice-PUT-populate_service__entry__38}

| Header | Description |
|-|-|
| None |   |
[Table 29. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-PUT-populate_service__entry__42}{#appservice-PUT-populate_service__entry-200-status-code}{#appservice-PUT-populate_service__entry-401-appservice}{#appservice-PUT-populate_service__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 401 | Unauthorized. The user credentials are incorrect or they do not have the app_service_admin role. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
[Table 30. Status codes]

### Response body parameters (JSON or XML)

{#appservice-PUT-populate_service__entry__50}{#appservice-PUT-populate_service__entry-error-appservice}{#appservice-PUT-populate_service__entry-error-details-appservice}{#appservice-PUT-populate_service__entry-error-message-appservice}

| Name | Description |
|-|-|
| error | Describes an encountered error. Data type: Object "error": { "details": "String", "message": "String" } |
| error.details | Additional information about the error. Data type: String |
| error.message | Message describing the error. Data type: String |
[ ]

### Sample cURL request

The following code example shows how to populate an application service when the CI type is
cmdb_group_based.

    curl -X PUT \
      https://instance.servicenow.com/api/now/cmdb/csdm/app_service/f809cb60db94101037740f95ca96190f/populate_service \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -u 'username':'password' \
      -d '{
      "population_method": {
        "type":"cmdb_group_based",
        "group_id": "e809cf60db94101037640f95ca961932"
      }
    }'

    {
        "result": {}
    }

The following code example shows how to populate a discovery application service.

    curl -X PUT \
      https://instance.servicenow.com/api/now/cmdb/csdm/app_service/f809cb60db94101037740f95ca96190f/populate_service \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -u 'username':'password' \
      -d '{
      "population_method": {
        "type":"discovery",
        "entry_point_id":"cmdb_ci_endpoint_ad_forest",
        "attributes": [
          {
            "name":"host",
            "value":"test1.com"
          },
          {
            "name":"port",
            "value":"500"
          },
          {
            "name":"protocol",
            "value":"ssh"
          }
        ]
      }
    }'

    {
        "result": {}
    }

## Application Service - PUT
/now/cmdb/csdm/app_service/{service_sys_id}/service_details {#ariaid-title7}

Updates the specified application service with the passed in basic information.
It also validates the uniqueness of the application service by checking the passed in information against the Identification and Reconciliation engine (IRE) rules defined on the application service class.  
Note:  
This endpoint has been deprecated, use [SG Services -- POST /sg_services/app_service/update](https://www.servicenow.com/docs/eU7TgOamBK46d4bQUO_ZAw#sg_svcs-POST-update "Updates an existing application service provided and creates tags for the given application service.") instead.

### URL format

Default URL:
/api/now/cmdb/csdm/app_service/{service_sys_id}/service_details

### Supported request parameters

{#appservice-PUT-service_details__entry__2}

| Name | Description |
|-|-|
| service_sys_id | Sys_id of the application service to updated. Data type: String Table: Service Instance \[cmdb_ci_service_auto\] |
[Table 31. Path parameters]

{#appservice-PUT-service_details__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 32. Query parameters]

{#appservice-PUT-service_details__entry__10}{#appservice-PUT-service_details__entry-basic_details-appservice}{#appservice-PUT-service_details__entry-basic_details-environment-appservice}{#appservice-PUT-service_details__entry-basic_details-name-appservice}{#appservice-PUT-service_details__entry-relationships-appservice}{#appservice-PUT-service_details__entry-relationships-bus_app-appservice}{#appservice-PUT-service_details__entry-relationships-bus_srv_off-appservice}{#appservice-PUT-service_details__entry-relationships-tech_srv_off-appservice}

| Name | Description |
|-|-|
| basic_details | Details of the service associated with the specified application service. Data type: Object "basic_details": { "environment": "String", "name": "String" } |
| basic_details.environment | Environment in which the application service is deployed, such as "Production" or "Test Lab 2." This can be any value that makes sense to the implementer. Data type: String Maximum length: 40 Default: null |
| basic_details.name | Required. Name of the application service. Must be a unique name from all other application services. Data type: String Maximum length: 255 |
| relationships | Service types to associate with the application service. Located in the CI Relationships \[cmdb_rel_ci\] table. Data type: Object "relationships": { "business_app": [Array], "business_service_offering": [Array], "technical_service_offering": [Array] } |
| relationships.business_app | List of sys_ids of the business applications to relate to the application service. Data type: Array |
| relationships.business_service_offering | List of sys_ids of the business service offerings to relate to the application service. Data type: Array |
| relationships.technical_service_offering | List of sys_ids of the technical service offerings to relate to the application service. Data type: Array |
[Table 33. Request body parameters (XML or JSON)]

### Headers

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-PUT-service_details__entry__26}{#appservice-PUT-service_details__accept-JSON-only-entry-RESTAPI}{#appservice-PUT-service_details__content_type-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Type | Data format of the request body. Only supports application/json. |
[Table 34. Request headers]

{#appservice-PUT-service_details__entry__32}

| Header | Description |
|-|-|
| None |   |
[Table 35. Response headers]

### Status codes

The 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://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#appservice-PUT-service_details__entry__36}{#appservice-PUT-service_details__entry-200-status-code}{#appservice-PUT-service_details__entry-401-appservice}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 401 | Unauthorized. The user credentials are incorrect or they do not have the app_service_admin role. |
[Table 36. Status codes]

### Response body parameters (JSON or XML)

{#appservice-PUT-service_details__entry__42}{#appservice-PUT-service_details__entry-error-appservice}{#appservice-PUT-service_details__entry-error-details-appservice}{#appservice-PUT-service_details__entry-error-message-appservice}

| Name | Description |
|-|-|
| error | Describes an encountered error. Data type: Object "error": { "details": "String", "message": "String" } |
| error.details | Additional information about the error. Data type: String |
| error.message | Message describing the error. Data type: String |
[ ]

### Sample cURL request

    curl -X PUT \
      https://instance.servicenow.com/api/now/cmdb/csdm/app_service/f809cb60db94101037740f95ca96190f/service_details \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -u 'username':'password' \
      -d '{
      "basic_details": {
        "environment": "Test Lab 2"
      },  "relationships": {
        "business_app" :["f07c7620db54101037740f95ca96199a"]
      }
    }'

    {
        "result": {}
    }


