---
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


---

# Resource Inventory Open API

# Resource Inventory Open API {#ariaid-title1}

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

The Resource Inventory Open API provides endpoints to create,
retrieve, and delete resources.
Use this API to manage resources in the following tables.

* Cable \[cmdb_ci_cable\]
* Equipment Holder \[cmdb_ci_equipment_holder\]
* Interface Card \[cmdb_ci_interface_card\]
* IP Address \[cmdb_ci_ip_address\]
* Logical Connection \[cmdb_ci_ni_logical_path\]
* Network Interface \[cmdb_ci_ni_interface\]
* Network Site \[cmdb_ci_ni_site\]
* Physical Connection \[cmdb_ci_ni_physical_link\]
* Strand \[cmdb_ci_strand\]
* Topology \[cmdb_ci_topology\]
* Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables.
* Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\].
* Child tables that extend any of the following tables:
  * Cable \[cmdb_ci_cable\]
  * Equipment Holder \[cmdb_ci_equipment_holder\]
  * Strand \[cmdb_ci_strand\]
  {#resource-inventory-api__ul_umw_gvn_bcc}
{#resource-inventory-api__ul_utd_jmd_wxb}

This API is included in the Network Inventory Core application, which is available on the ServiceNow Store.

This API is provided within the `sn_ni_core` namespace.

The calling user must have the sn_ni_core.inventory_integrator role.

This API can be extended to make customizations around required parameters, request body validation, and field mappings. For more information, see the [Resource Inventory Open API Developer Guide](https://www.servicenow.com/docs/j2Fh5hiz6w~iA9iAQmwKsw#resource-inventory-dev-guide "Use the Resource Inventory Open API to create, retrieve, update, and delete resources such as interface cards, logical and physical connections, network sites, and more.").

The Resource Inventory Open API is a ServiceNow®
implementation of the TM Forum Resource Inventory API REST specification. This implementation is
based on the [TMF639 Resource Inventory API User Guide v4.0.1](https://www.tmforum.org/resources/standard/tmf639-resource-inventory-api-user-guide-v4-0/), July
2020.

## Resource Inventory Open API - DELETE /sn_ni_core/resource/{id} {#ariaid-title2}

Deletes a specified resource record.

### URL format

Default URL:
/api/sn_ni_core/resource/{id}

### Supported request parameters

{#resource-inv-DELETE__table_tjw_q3s_g5b__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-DELETE__res-inv-tables} Note: Resources in the IP Address \[cmdb_ci_ip_address\] table can't be deleted using this API. Data type: String |
[Table 1. Path parameters]

{#resource-inv-DELETE__table_tjw_q3s_g5b} {#resource-inv-DELETE__table_cnn_cht_g5b__entry__2}

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

{#resource-inv-DELETE__table_cnn_cht_g5b} {#resource-inv-DELETE__table_fdn_t3t_g5b__entry__2}

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

{#resource-inv-DELETE__table_fdn_t3t_g5b}

### 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.").
{#resource-inv-DELETE__table_e4k_vhs_g5b__entry__2}{#resource-inv-DELETE__accept-JSON-only-entry-RESTAPI}

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

{#resource-inv-DELETE__table_e4k_vhs_g5b} {#resource-inv-DELETE__table_gfy_npw_f5b__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 5. Response headers]

{#resource-inv-DELETE__table_gfy_npw_f5b}

### 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.").
{#resource-inv-DELETE__table_b4x_lrs_g5b__entry__2}{#resource-inv-DELETE__entry-400-status-code}{#resource-inv-DELETE__entry-401-status-code}{#resource-inv-DELETE__entry-404-status-code}

| Status code | Description |
|-|-|
| 215 | Request successfully received for processing. The request will be completed asynchronously. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 403 | Forbidden. Resource deletion failed. The resource might be required by its related resources. |
| 404 | Not found. The requested item wasn't found. |
[Table 6. Status codes]

{#resource-inv-DELETE__table_b4x_lrs_g5b}

### Response body parameters (JSON)

{#resource-inv-DELETE__entry__34}

| Name | Description |
|-|-|
| None |   |
[ ]

### cURL request

This example deletes a resource.

    curl "https://instance.service-now.com/api/sn_ni_core/resource/54ada05e875c15109a9c0f65dabb3586" \
    --request DELETE \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    ""

## Resource Inventory Open API - GET /sn_ni_core/resource {#ariaid-title3}

Retrieves a list of all resource records.

### URL format

Default URL:
/api/sn_ni_core/resource

### Supported request parameters

{#resource-inv-GET-resource__entry__2}

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

{#resource-inv-GET-resource__entry__6}{#resource-inv-GET-resource__tmf-offset}

| Name | Description |
|-|-|
| @type | Required. Table name of the type of resource to retrieve. You can only retrieve one type of resource per API call. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-GET-resource__ul_wmt_vfz_d5b} Data type: String |
| description | Description to use to filter resources. Only resources with the specified description are returned in the response. Data type: String |
| fields | List of fields to return in the response. Invalid fields are ignored. Valid values: * description * href * id * name * note * place * relatedParty * resourceCharacteristic * resourceRelationship * resourceSpecification * startOperatingDate {#resource-inv-GET-resource__ul_pzn_4gz_d5b} Data type: String Default: Returns all fields. |
| limit | Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval. Default: 20 Data type: Number |
| name | Name to use to filter resources. Only resources with the specified name are returned in the response. Data type: String |
| offset | Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. Default: 0 Data type: Number |
| resourceSpecification.id | Resource specification sys_id to use to filter resources. The sys_id must be from a model in one of the following tables. * Equipment Holder Models \[sn_ni_core_equipment_holder_product_model\] * Equipment Models \[sn_ni_core_equipment_product_model\] * Interface Card Models \[sn_ni_core_interface_card_product_model\] * Logical Connection Models \[sn_ni_core_logical_connection_product_model\] * Network Interface Models \[sn_ni_core_network_interface_product_model\] * Physical Connection Models \[sn_ni_core_physical_connection_product_model\] {#resource-inv-GET-resource__ul_a3t_1lz_d5b}Only resources with a model matching the specified sys_id are returned in the response. Data type: String |
[Table 8. Query parameters]

{#resource-inv-GET-resource__entry__22}

| Name | Description |
|-|-|
| None |   |
[Table 9. Request body parameters (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.").
{#resource-inv-GET-resource__entry__26}{#resource-inv-GET-resource__accept-JSON-only-entry-RESTAPI}

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

{#resource-inv-GET-resource__table_lpj_dh1_vxb__entry__2}

| Header | Description |
|-|-|
| Content-Range | Range of content returned in a paginated call. For example, if `offset=2` and `limit=3`, the value of the Content-Range header is `items 3-5`. |
| Content-Type | Data format of the response body. Only supports application/json. |
| Link | Contains the following links to navigate through query results. * first * last * next * previous {#resource-inv-GET-resource__ul_zzk_sdm_lsb} |
| X-Total-Count | For paginated queries, this header specifies the total number of records available on the server. Note: If the total number of records is more than 100,000 this header always returns 100,000. |
[Table 11. Response headers]

{#resource-inv-GET-resource__table_lpj_dh1_vxb}

### 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.").
{#resource-inv-GET-resource__entry__40}{#resource-inv-GET-resource__entry-200-status-code}{#resource-inv-GET-resource__entry-400-status-code}{#resource-inv-GET-resource__entry-401-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 206 | Partial content. The request was successfully processed and returned a partial range of content specified by a paginated call. |
| 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 12. Status codes]

### Response body parameters (JSON) {#resource-inv-GET-resource__section_nkb_1rw_f5b}

{#resource-inv-GET-resource__table_okb_1rw_f5b__entry__2}{#resource-inv-GET-resource__type-descr-entry}{#resource-inv-GET-resource__related-party-parm}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-GET-resource__d3130e145} Data type: String |
| description | Description of the resource. Data type: String |
| href | Relative link to the resource record. Data type: String |
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-GET-resource__ul_umw_gvn_bcc} {#resource-inv-GET-resource__res-inv-tables} Data type: String |
| name | Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | The note text. Data type: String |
| place | Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| relatedParty.role | Role of the related party. Data type: String Table: In the Group type field of the Teams \[cmdb_rel_team\] table. |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-GET-resource__ul_wsv_p2m_g5b} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-GET-resource__ul_bk1_rw2_g5b} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-GET-resource__ul_rlv_3dm_g5b} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-GET-resource__ul_wmt_vtx_d5y} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-GET-resource__ul_vr1_4gf_g5b} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-GET-resource__d3130e770} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[ ]

{#resource-inv-GET-resource__table_okb_1rw_f5b}  

### cURL request

This example retrieves the name, id, and href fields for the first five Network Site resource records.

    curl "https://instance.service-now.com/api/sn_ni_core/resource?@type=cmdb_ci_ni_site&fields=name%2Cid%2Chref&limit=5" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    [
       {
          "name": "DALLAS TX CO/HUB",
          "id": "c23683c54051c910f8772175cacd725c",
          "href": "/api/sn_ni_core/resource/c23683c54051c910f8772175cacd725c"
       },
       {
          "name": "PFP LOC F-800",
          "id": "0ac19bc54051c910f8772175cacd724b",
          "href": "/api/sn_ni_core/resource/0ac19bc54051c910f8772175cacd724b"
       },
       {
          "name": "FIBER SERVICE TERMINAL 003",
          "id": "d0541fcd4051c910f8772175cacd72c8",
          "href": "/api/sn_ni_core/resource/d0541fcd4051c910f8772175cacd72c8"
       },
       {
          "name": "270 RUMWOOD MAIN",
          "id": "e6f6df8d4051c910f8772175cacd72b2",
          "href": "/api/sn_ni_core/resource/e6f6df8d4051c910f8772175cacd72b2"
       },
       {
          "name": "3620 CHESTER ROMI48073",
          "id": "917dd8f6870e851079c40f2d0ebb353d",
          "href": "/api/sn_ni_core/resource/917dd8f6870e851079c40f2d0ebb353d"
       }
    ]

## Resource Inventory Open API - GET /sn_ni_core/resource/{id} {#ariaid-title4}

Retrieves a specified resource record.

### URL format

Default URL:
/api/sn_ni_core/resource/{id}

### Supported request parameters

{#resource-inv-GET-resource-id__table_tjw_q3s_g5b__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-GET-resource-id__ul_umw_gvn_bcc} {#resource-inv-GET-resource-id__res-inv-tables} Data type: String |
[Table 13. Path parameters]

{#resource-inv-GET-resource-id__table_tjw_q3s_g5b} {#resource-inv-GET-resource-id__entry__6}

| Name | Description |
|-|-|
| fields | List of fields to return in the response. Invalid fields are ignored. Valid values: * description * href * id * name * note * place * relatedParty * resourceCharacteristic * resourceRelationship * resourceSpecification * startOperatingDate {#resource-inv-GET-resource-id__ul_pzn_4gz_d5b} Data type: String Default: Returns all fields. |
[Table 14. Query parameters]

{#resource-inv-GET-resource-id__table_yh2_zhs_g5b__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 15. Request body parameters (JSON)]

{#resource-inv-GET-resource-id__table_yh2_zhs_g5b}

### 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.").
{#resource-inv-GET-resource-id__table_e4k_vhs_g5b__entry__2}{#resource-inv-GET-resource-id__accept-JSON-only-entry-RESTAPI}

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

{#resource-inv-GET-resource-id__table_e4k_vhs_g5b} {#resource-inv-GET-resource-id__table_gfy_npw_f5b__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[Table 17. Response headers]

{#resource-inv-GET-resource-id__table_gfy_npw_f5b}

### 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.").
{#resource-inv-GET-resource-id__table_yn5_ths_g5b__entry__2}{#resource-inv-GET-resource-id__entry-200-status-code}{#resource-inv-GET-resource-id__entry-400-status-code}{#resource-inv-GET-resource-id__entry-401-status-code}{#resource-inv-GET-resource-id__entry-404-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. |
| 404 | Not found. The requested item wasn't found. |
[Table 18. Status codes]

{#resource-inv-GET-resource-id__table_yn5_ths_g5b}

### Response body parameters (JSON) {#resource-inv-GET-resource-id__section_nkb_1rw_f5b}

{#resource-inv-GET-resource-id__table_okb_1rw_f5b__entry__2}{#resource-inv-GET-resource-id__type-descr-entry}{#resource-inv-GET-resource-id__related-party-parm}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-GET-resource-id__ul_wmt_vfz_d5b} Data type: String |
| description | Description of the resource. Data type: String |
| href | Relative link to the resource record. Data type: String |
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-GET-resource-id__d3130e280} {#resource-inv-GET-resource-id__d3130e235} Data type: String |
| name | Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | The note text. Data type: String |
| place | Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-GET-resource-id__ul_wsv_p2m_g5b} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-GET-resource-id__ul_bk1_rw2_g5b} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-GET-resource-id__ul_rlv_3dm_g5b} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-GET-resource-id__ul_wmt_vtx_d5y} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-GET-resource-id__ul_vr1_4gf_g5b} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-GET-resource-id__ul_a3t_1lz_d5b} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[ ]

{#resource-inv-GET-resource-id__table_okb_1rw_f5b}  

### cURL request

This example retrieves a specified resource record.

    curl "https://instance.service-now.com/api/sn_ni_core/resource/915da8e140ddc910f8772175cacd72de" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
       "href": "/api/sn_ni_core/resource/915da8e140ddc910f8772175cacd72de",
       "id": "915da8e140ddc910f8772175cacd72de",
       "name": "DLLSTXMR/ESS7450/IOM-01/MDA-01/NI-01",
       "place": {
          "id": "c23683c54051c910f8772175cacd725c",
          "href": "/api/now/table/cmdb_ci_ni_site/c23683c54051c910f8772175cacd725c",
          "@referredType": "GeographicAddress"
       },
       "resourceCharacteristic": [
          {
             "name": "attested",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "availability",
             "valueType": "string",
             "value": "used"
          },
          {
             "name": "cabled",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "can_print",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "connector_type",
             "valueType": "string",
             "value": "sc"
          },
          {
             "name": "cost_cc",
             "valueType": "string",
             "value": "USD"
          },
          {
             "name": "equipment_clli",
             "valueType": "string",
             "value": "DLLSTXESS01"
          },
          {
             "name": "fault_count",
             "valueType": "integer",
             "value": "0"
          },
          {
             "name": "install_status",
             "valueType": "integer",
             "value": "1"
          },
          {
             "name": "life_cycle_stage",
             "valueType": "reference",
             "value": "Operational"
          },
          {
             "name": "life_cycle_stage_status",
             "valueType": "reference",
             "value": "In Use"
          },
          {
             "name": "manufacturer",
             "valueType": "reference",
             "value": "a2f6a4914055c910f8772175cacd723a"
          },
          {
             "name": "monitor",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "network_domain",
             "valueType": "string",
             "value": "core"
          },
          {
             "name": "ni_type",
             "valueType": "reference",
             "value": "646cf25fe42e0510f877e70ec9bcaca8"
          },
          {
             "name": "port_bandwidth",
             "valueType": "reference",
             "value": "ff39ae92eb900110700ca73bc152286d"
          },
          {
             "name": "replaceable",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "skip_sync",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "telco_equipment",
             "valueType": "reference",
             "value": "583e7b95405dc910f8772175cacd7292"
          },
          {
             "name": "unverified",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "virtual",
             "valueType": "boolean",
             "value": "false"
          }
       ],
       "resourceRelationship": [
          {
             "relationshipType": "Contained by::Contains",
             "resource": {
                "id": "81baac6140ddc910f8772175cacd728e",
                "href": "/api/sn_ni_core/resource/81baac6140ddc910f8772175cacd728e"
             }
          },
          {
             "relationshipType": "Contained by::Contains",
             "resource": {
                "id": "bf624bc640194d10f8772175cacd7225",
                "href": "/api/sn_ni_core/resource/bf624bc640194d10f8772175cacd7225"
             }
          }
       ],
       "resourceSpecification": {
          "id": "980416b0874e8110d28eb259dabb356b",
          "href": "/api/now/table/sn_ni_core_network_inventory_product_model/980416b0874e8110d28eb259dabb356b",
          "@referredType": "NetworkInterfaceModel"
       },
       "@type": "cmdb_ci_ni_interface"
    }

## Resource Inventory Open API - PATCH /sn_ni_core/resource/{id} {#ariaid-title5}

Updates a specified resource record.

### URL format

Default URL: /api/sn_ni_core/resource/{id}

### Supported request parameters

{#resource-inv-PATCH-resource-id__entry__2}

| Name | Description |
|-|-|
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-PATCH-resource-id__ul_umw_gvn_bcc} {#resource-inv-PATCH-resource-id__res-inv-tables} Data type: String |
[Table 19. Path parameters]

{#resource-inv-PATCH-resource-id__entry__6}

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

{#resource-inv-PATCH-resource-id__entry__10}{#resource-inv-PATCH-resource-id__type-descr-entry}{#resource-inv-PATCH-resource-id__note-text-entry}{#resource-inv-PATCH-resource-id__place-id-entry}{#resource-inv-PATCH-resource-id__rel-party-id-parm}{#resource-inv-PATCH-resource-id__res-char-name-parm}{#resource-inv-PATCH-resource-id__res-char-value-parm}{#resource-inv-PATCH-resource-id__rel-type-parm}{#resource-inv-PATCH-resource-id__rel-resource-parm}{#resource-inv-PATCH-resource-id__rel-resource-id-parm}{#resource-inv-PATCH-resource-id__res-spec-id-parm}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-PATCH-resource-id__ul_wmt_vfz_d5b} Data type: String |
| description | Description of the resource. Data type: String |
| href | Relative link to the resource record. Data type: String |
| name | Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | Required if the note parameter is used. The note text. Data type: String |
| place | Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Required if the place parameter is used. Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] Note: Removing relatedParty records from a resource is not supported by this endpoint. Records can be manually deleted from the Teams \[cmdb_rel_team\] table. |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Required if the relatedParty parameter is used. Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| relatedParty.role | Role of the related party. Data type: String Table: In the Group type field of the Teams \[cmdb_rel_team\] table. |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-PATCH-resource-id__ul_wsv_p2m_g5b} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Required if the resourceCharacteristic parameter is used. Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | Required if the resourceCharacteristic parameter is used. The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-PATCH-resource-id__ul_bk1_rw2_g5b} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-PATCH-resource-id__ul_rlv_3dm_g5b} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Required if the resourceRelationship parameter is used. Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Required if the resourceRelationship parameter is used. Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-PATCH-resource-id__ul_wmt_vtx_d5y} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Required if the resourceRelationship parameter is used. Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-PATCH-resource-id__ul_vr1_4gf_g5b} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Required if the resourceSpecification parameter is used. Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-PATCH-resource-id__ul_a3t_1lz_d5b} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[Table 21. 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.").
{#resource-inv-PATCH-resource-id__entry__66}{#resource-inv-PATCH-resource-id__accept-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/merge-patch+json. |
[Table 22. Request headers]

{#resource-inv-PATCH-resource-id__entry__72}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
[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.").
{#resource-inv-PATCH-resource-id__entry__76}{#resource-inv-PATCH-resource-id__entry-200-status-code}{#resource-inv-PATCH-resource-id__entry-400-status-code}{#resource-inv-PATCH-resource-id__entry-401-status-code}{#resource-inv-PATCH-resource-id__entry-404-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. |
| 404 | Not found. The requested item wasn't found. |
| 415 | The request body is in an unsupported format or the Content-Type request header is set incorrectly. |
[Table 24. Status codes]

### Response body parameters (JSON or XML)

{#resource-inv-PATCH-resource-id__entry__88}{#resource-inv-PATCH-resource-id__d3130e141}{#resource-inv-PATCH-resource-id__related-party-parm}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-PATCH-resource-id__d3130e145} Data type: String |
| description | Description of the resource. Data type: String |
| href | Relative link to the resource record. Data type: String |
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-PATCH-resource-id__d3130e280} {#resource-inv-PATCH-resource-id__d3130e235} Data type: String |
| name | Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | The note text. Data type: String |
| place | Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| relatedParty.role | Role of the related party. Data type: String Table: In the Group type field of the Teams \[cmdb_rel_team\] table. |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-PATCH-resource-id__d3130e482} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-PATCH-resource-id__d3130e556} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-PATCH-resource-id__d3130e591} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-PATCH-resource-id__d3130e650} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-PATCH-resource-id__d3130e703} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-PATCH-resource-id__d3130e770} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[ ]

### cURL request

This example updates the name of a resource.

    curl "http://instance.servicenow.com/api/sn_ni_core/resource/583e7b95405dc910f8772175cacd7292" \
    --request PATCH \
    --header "Accept:application/json" \
    --header "Content-Type: application/merge-patch+json" \
    --user 'username':'password' \
    --data '{"name": "new name"}'

Response body.

    {
      "href": "/api/sn_ni_core/resource/583e7b95405dc910f8772175cacd7292",
      "id": "583e7b95405dc910f8772175cacd7292",
      "name": "new name",
      "note": [
        {
          "text": "TECHNICIAN SCHECULED TO BE ONSITE THE WEEK OF APRIL 4, 2022."
        }
      ],
      "place": {
        "id": "c23683c54051c910f8772175cacd725c",
        "href": "/api/now/table/cmdb_ci_ni_site/c23683c54051c910f8772175cacd725c",
        "@referredType": "GeographicAddress"
      },
      "resourceCharacteristic": [
        {
          "name": "alarmable",
          "valueType": "boolean",
          "value": "true"
        },
        {
          "name": "attested",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "can_hub",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "can_partitionvlans",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "can_print",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "can_route",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "can_switch",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "comments",
          "valueType": "string",
          "value": "ETHERNET SWITCH"
        },
        {
          "name": "cost_cc",
          "valueType": "string",
          "value": "USD"
        },
        {
          "name": "cpu_count",
          "valueType": "integer",
          "value": "1"
        },
        {
          "name": "equipment_clli",
          "valueType": "string",
          "value": "DLLSTXESS01"
        },
        {
          "name": "fault_count",
          "valueType": "integer",
          "value": "0"
        },
        {
          "name": "firmware_manufacturer",
          "valueType": "reference",
          "value": "0c441abbc6112275000025157c651c89"
        },
        {
          "name": "firmware_version",
          "valueType": "string",
          "value": "A09DX887"
        },
        {
          "name": "hardware_status",
          "valueType": "string",
          "value": "installed"
        },
        {
          "name": "install_status",
          "valueType": "integer",
          "value": "1"
        },
        {
          "name": "internet_facing",
          "valueType": "boolean",
          "value": "true"
        },
        {
          "name": "inventory_category",
          "valueType": "string",
          "value": "equipment"
        },
        {
          "name": "last_service_date",
          "valueType": "datetime",
          "value": "2022-02-18T16:36:54.000Z"
        },
        {
          "name": "life_cycle_stage",
          "valueType": "reference",
          "value": "Deploy"
        },
        {
          "name": "life_cycle_stage_status",
          "valueType": "reference",
          "value": "Reserved"
        },
        {
          "name": "managed_by",
          "valueType": "reference",
          "value": "46c9e158a9fe198101d44d0d22cb640d"
        },
        {
          "name": "manufacturer",
          "valueType": "reference",
          "value": "b7e831bdc0a80169015ae101f3c4d6cd"
        },
        {
          "name": "model_number",
          "valueType": "string",
          "value": "7450ESS-1"
        },
        {
          "name": "monitor",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "network_domain",
          "valueType": "string",
          "value": "core"
        },
        {
          "name": "ni_function",
          "valueType": "reference",
          "value": "2d22153940990d10f8772175cacd728b"
        },
        {
          "name": "ni_role",
          "valueType": "reference",
          "value": "c68e3f15405dc910f8772175cacd72f1"
        },
        {
          "name": "ni_type",
          "valueType": "reference",
          "value": "3772e8d54015c910f8772175cacd721c"
        },
        {
          "name": "ram",
          "valueType": "integer",
          "value": "3000"
        },
        {
          "name": "replaceable",
          "valueType": "boolean",
          "value": "true"
        },
        {
          "name": "serial_number",
          "valueType": "string",
          "value": "7894564568225"
        },
        {
          "name": "skip_sync",
          "valueType": "boolean",
          "value": "false"
        },
        {
          "name": "spare",
          "valueType": "boolean",
          "value": "true"
        },
        {
          "name": "template_id",
          "valueType": "reference",
          "value": "49433535e5d28110f877657a33339131"
        },
        {
          "name": "unit_position",
          "valueType": "integer",
          "value": "2"
        },
        {
          "name": "unverified",
          "valueType": "boolean",
          "value": "false"
        }
      ],
      "resourceRelationship": [
        {
          "relationshipType": "Contains::Contained by",
          "resource": {
            "id": "f5d1c429405dc910f8772175cacd723f",
            "href": "/api/sn_ni_core/resource/f5d1c429405dc910f8772175cacd723f"
          }
        },
        {
          "relationshipType": "Contains::Contained by",
          "resource": {
            "id": "d6e100e5405dc910f8772175cacd72e9",
            "href": "/api/sn_ni_core/resource/d6e100e5405dc910f8772175cacd72e9"
          }
        },
        {
          "relationshipType": "Contained by::Contains",
          "resource": {
            "id": "5b10e8154015c910f8772175cacd724d",
            "href": "/api/sn_ni_core/resource/5b10e8154015c910f8772175cacd724d"
          }
        }
      ],
      "resourceSpecification": {
        "id": "0ae34df1e5528110f877657a33339119",
        "href": "/api/now/table/cmdb_model/0ae34df1e5528110f877657a33339119",
        "@referredType": "EquipmentModel"
      },
      "@type": "cmdb_ci_ni_telco_equipment"
    }

## Resource Inventory Open API - POST /sn_ni_core/resource {#ariaid-title6}

Creates a resource record.

### URL format

Default URL:
/api/sn_ni_core/resource

### Supported request parameters

{#resource-inv-POST-resource__table_vzn_xns_g5b__entry__2}

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

{#resource-inv-POST-resource__table_vzn_xns_g5b} {#resource-inv-POST-resource__entry__6}

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

{#resource-inv-POST-resource__entry__10}{#resource-inv-POST-resource__type-descr-entry}{#resource-inv-POST-resource__name-entry}{#resource-inv-POST-resource__note-text-entry}{#resource-inv-POST-resource__place-entry}{#resource-inv-POST-resource__place-id-entry}{#resource-inv-POST-resource__related-party-parm}{#resource-inv-POST-resource__rel-party-id-parm}{#resource-inv-POST-resource__res-char-name-parm}{#resource-inv-POST-resource__res-char-value-parm}{#resource-inv-POST-resource__rel-type-parm}{#resource-inv-POST-resource__rel-resource-parm}{#resource-inv-POST-resource__rel-resource-id-parm}{#resource-inv-POST-resource__res-spec-id-parm}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-POST-resource__ul_wmt_vfz_d5b} Data type: String |
| description | Description of the resource. Data type: String |
| name | Required. Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | Required if the note parameter is used. The note text. Data type: String |
| place | Required for Equipment Holder resources where Container Type is Cage, Bay, Cabinet, Rack, Line Up, or Inventory Model Bundle. Required for all Equipment resources. Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Required if the place parameter is used. Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Required if the relatedParty parameter is used. Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-POST-resource__ul_wsv_p2m_g5b} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Required if the resourceCharacteristic parameter is used. Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | Required if the resourceCharacteristic parameter is used. The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-POST-resource__ul_bk1_rw2_g5b} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-POST-resource__ul_rlv_3dm_g5b} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Required if the resourceRelationship parameter is used. Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Required if the resourceRelationship parameter is used. Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-POST-resource__ul_wmt_vtx_d5y} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Required if the resourceRelationship parameter is used. Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-POST-resource__ul_vr1_4gf_g5b} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Required if the resourceSpecification parameter is used. Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-POST-resource__ul_a3t_1lz_d5b} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[Table 27. Request body parameters (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.").
{#resource-inv-POST-resource__entry__62}{#resource-inv-POST-resource__accept-JSON-only-entry-RESTAPI}{#resource-inv-POST-resource__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]

{#resource-inv-POST-resource__entry__68}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
| Location | URL of the created resource. |
[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.").
{#resource-inv-POST-resource__table_b4x_lrs_g5b__entry__2}{#resource-inv-POST-resource__entry-400-status-code}{#resource-inv-POST-resource__entry-401-status-code}

| Status code | Description |
|-|-|
| 215 | Request successfully received for processing. The request will be completed asynchronously. |
| 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 30. Status codes]

{#resource-inv-POST-resource__table_b4x_lrs_g5b}

### Response body parameters (JSON) {#resource-inv-POST-resource__section_nkb_1rw_f5b}

{#resource-inv-POST-resource__table_okb_1rw_f5b__entry__2}{#resource-inv-POST-resource__d3130e141}{#resource-inv-POST-resource__d3130e405}

| Name | Description |
|-|-|
| @type | Type of resource. Valid values: * `cmdb_ci_cable` (Cable) * `cmdb_ci_interface_card` (Interface Card) * `cmdb_ci_ip_address` (IP Address) * `cmdb_ci_ni_logical_path` (Logical Connection) * `cmdb_ci_ni_interface` (Network Interface) * `cmdb_ci_ni_site` (Network Site) * `cmdb_ci_ni_physical_link` (Physical Connection) * `cmdb_ci_strand` (Strand) * `cmdb_ci_topology` (Topology) * Name of a table specified by the sn_ni_core.equipment_tables sys_property, or name of a table that extends the specified tables. * Name of a table that extends Equipment Holder \[cmdb_ci_equipment_holder\]. {#resource-inv-POST-resource__d3130e145} Data type: String |
| description | Description of the resource. Data type: String |
| href | Relative link to the resource record. Data type: String |
| id | Sys_id of the resource. Located in one of the following tables depending on the type of resource. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-POST-resource__ul_umw_gvn_bcc} {#resource-inv-POST-resource__res-inv-tables} Data type: String |
| name | Name of the resource. Data type: String |
| note | List of notes about the resource. Data type: Array of Objects "note": [ { "text": "String" } ] |
| note.text | The note text. Data type: String |
| place | Network site for the resource. This parameter is not supported for Network Site, Physical Connection, or Logical Connection resources. Data type: Object "place": { "@referredType": "String", "href": "String", "id": "String" } |
| place.@referredType | Type of place. This value is always `GeographicAddress`. Data type: String |
| place.href | Relative link to the place record. Data type: String |
| place.id | Sys_id of the place record. Data type: String Table: Network Site \[cmdb_ci_ni_site\] |
| relatedParty | Details about contacts for the resource. Data type: Array of Objects "relatedParty": [ { "@referredType": "String", "href": "String", "id": "String", "role": "String" } ] |
| relatedParty.@referredType | Type of related party. Located in the in the Type field. Data type: String Table: In the type field of Group \[sys_user_group\] table. |
| relatedParty.href | Relative link to the related party record. Data type: String |
| relatedParty.id | Sys_id of the related party record. Data type: String Table: Group \[sys_user_group\] |
| resourceCharacteristic | List of characteristics of the resource. The following resource types require specific resource characteristics. * For Physical Connection and Logical Connection resources, a `Port A` or `Port Z` characteristic is required. If the Lifecycle Stage Status of the resource is In Use, both `Port A` and `Port Z` are required. * For Equipment Holder resources, a `Container Type` characteristic is required. {#resource-inv-POST-resource__d3130e482} Data type: Array of Objects "resourceCharacteristic": [ { "name": "String", "value": "String", "valueType": "String" } ] |
| resourceCharacteristic.name | Field name from the resource table specified by the @type parameter. You can't use the fields model_id, name, network_site, operation_notes, operational_status, short_description, start_date, or any sys_ prefixed fields such as sys_id. Data type: String |
| resourceCharacteristic.value | The value of the characteristic. Data type: String |
| resourceCharacteristic.valueType | Type of value. Valid values: * boolean * datetime * float * integer * ph_number * reference * string {#resource-inv-POST-resource__d3130e556} Data type: String |
| resourceRelationship | List of related resources. The following resource types require specific related resources. * For Interface Card resources, a relationship to an Equipment Holder resource where Container Type is Slot or Sub Slot is required. * For Network Interface resources, a relationship to an Equipment or Interface Card resource is required. * For Equipment Holder resources where Container Type is Slot or Sub Slot, a relationship to an Equipment or Interface Card resource is required. {#resource-inv-POST-resource__d3130e591} Data type: Array "resourceRelationship": [ { "relationshipType": "String", "resource": {Object} } ] |
| resourceRelationship.relationshipType | Type of relationship between the two resources in the format `[this resource descriptor]::[related resource descriptor]`. For example, `Contains::Contained by` indicates that the related resource is the child of this resource. Valid values for the descriptors are located in the CI Relationship Type \[cmdb_rel_type\] table in the Parent descriptor and Child descriptor columns. Data type: String |
| resourceRelationship.resource | Details about the related resource. The related resource must be one of the following resource types. * Cable * Equipment * Equipment Holder * Interface Card * Logical Connection * Network Interface * Network Site * Physical Connection * Strand * Topology {#resource-inv-POST-resource__d3130e650} Data type: Object "resource": { "id": "String", "href": "String" } |
| resourceRelationship.resource.id | Sys_id of the related resource. Located in one of the following tables depending on the type of related resource. * Interface Card \[cmdb_ci_interface_card\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\] {#resource-inv-POST-resource__d3130e703} Data type: String |
| resourceRelationship.resource.href | Relative link to the related resource record. Data type: String |
| resourceSpecification | Resource specification. Data type: Object "resourceSpecification": { "id": "String" } |
| resourceSpecification.id | Sys_id of the associated model for the resource. Located in one of the following tables depending on the type of model. * Cable Models \[sn_ent_cable_model\] * Equipment Holder Models \[sn_ent_nw_holder_model\] * Equipment Models \[sn_ent_nw_equipment_model\] * Interface Card Models \[sn_ent_nw_interface_model\] * Logical Connection Models \[sn_ent_logical_nw_connection_model\] * Network Interface Models \[sn_ent_nw_interface_model\] * Physical Connection Models \[sn_ent_physical_nw_connection_model\] * Strand Models \[sn_ent_strand_model\] * Topology Models \[sn_ent_network_topology_model\] {#resource-inv-POST-resource__d3130e770} Data type: String |
| startOperatingDate | Date and time that the resource first started operating. Data type: String |
[ ]

{#resource-inv-POST-resource__table_okb_1rw_f5b}  

### cURL request

This example creates a network site in Denver, Colorado.

    curl "https://instance.service-now.com/api/sn_ni_core/resource" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
      \"name\": \"DENVER CO CO/HUB\",
      \"note\": [
        {
          \"text\": \"Cisco maintenance team onsite June 22, 2022.\"
        }
      ],
      \"resourceCharacteristic\": [
        {
          \"name\": \"attested\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        },
        {
          \"name\": \"can_print\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        },
        {
          \"name\": \"clli_code\",
          \"valueType\": \"string\",
          \"value\": \"DNVRCOMR02T\"
        },
        {
          \"name\": \"comments\",
          \"valueType\": \"string\",
          \"value\": \"Site is scheduled for diesel generator test July 13, 2022 at 9am CST.\"
        },
        {
          \"name\": \"cost_cc\",
          \"valueType\": \"string\",
          \"value\": \"USD\"
        },
        {
          \"name\": \"county\",
          \"valueType\": \"string\",
          \"value\": \"DENVER\"
        },
        {
          \"name\": \"data_center_code\",
          \"valueType\": \"string\",
          \"value\": \"DNVR00564\"
        },
        {
          \"name\": \"fault_count\",
          \"valueType\": \"integer\",
          \"value\": \"0\"
        },
        {
          \"name\": \"install_status\",
          \"valueType\": \"integer\",
          \"value\": \"1\"
        },
        {
          \"name\": \"life_cycle_stage\",
          \"valueType\": \"reference\",
          \"value\": \"Operational\"
        },
        {
          \"name\": \"life_cycle_stage_status\",
          \"valueType\": \"reference\",
          \"value\": \"In Use\"
        },
        {
          \"name\": \"location\",
          \"valueType\": \"reference\",
          \"value\": \"25ab8f300a0a0bb300d99f69c3ac24cd\"
        },
        {
          \"name\": \"managed_by\",
          \"valueType\": \"reference\",
          \"value\": \"b0f31e5673500010c2e7660c4cf6a711\"
        },
        {
          \"name\": \"monitor\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        },
        {
          \"name\": \"network_domain\",
          \"valueType\": \"string\",
          \"value\": \"core\"
        },
        {
          \"name\": \"ni_type\",
          \"valueType\": \"reference\",
          \"value\": \"8e8f3770404d0110f8772175cacd7204\"
        },
        {
          \"name\": \"pots_number\",
          \"valueType\": \"ph_number\",
          \"value\": \"(214) 555-1234\"
        },
        {
          \"name\": \"skip_sync\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        },
        {
          \"name\": \"third_party_ownership\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        },
        {
          \"name\": \"unverified\",
          \"valueType\": \"boolean\",
          \"value\": \"false\"
        }
      ],
      \"resourceRelationship\": [
        {
          \"relationshipType\": \"Connects to::Connected by\",
          \"resource\": {
            \"id\": \"e6f6df8d4051c910f8772175cacd72b2\",
            \"href\": \"/api/sn_ni_core/resource/e6f6df8d4051c910f8772175cacd72b2\"
          }
        },
        {
          \"relationshipType\": \"Connects to::Connected by\",
          \"resource\": {
            \"id\": \"0ac19bc54051c910f8772175cacd724b\",
            \"href\": \"/api/sn_ni_core/resource/0ac19bc54051c910f8772175cacd724b\"
          }
        },
        {
          \"relationshipType\": \"Connects to::Connected by\",
          \"resource\": {
            \"id\": \"997e5c11875851109a9c0f65dabb35ac\",
            \"href\": \"/api/sn_ni_core/resource/997e5c11875851109a9c0f65dabb35ac\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"5b10e8154015c910f8772175cacd724d\",
            \"href\": \"/api/sn_ni_core/resource/5b10e8154015c910f8772175cacd724d\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"57e73b51405dc910f8772175cacd726e\",
            \"href\": \"/api/sn_ni_core/resource/57e73b51405dc910f8772175cacd726e\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"bf58f751405dc910f8772175cacd72e8\",
            \"href\": \"/api/sn_ni_core/resource/bf58f751405dc910f8772175cacd72e8\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"b5711e31405d0d10f8772175cacd7232\",
            \"href\": \"/api/sn_ni_core/resource/b5711e31405d0d10f8772175cacd7232\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"ed811e31405d0d10f8772175cacd72d3\",
            \"href\": \"/api/sn_ni_core/resource/ed811e31405d0d10f8772175cacd72d3\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"d74937d1405dc910f8772175cacd7288\",
            \"href\": \"/api/sn_ni_core/resource/d74937d1405dc910f8772175cacd7288\"
          }
        },
        {
          \"relationshipType\": \"Contains::Contained by\",
          \"resource\": {
            \"id\": \"da0df2e3e4e64510f877e70ec9bcacc6\",
            \"href\": \"/api/sn_ni_core/resource/da0df2e3e4e64510f877e70ec9bcacc6\"
          }
        }
      ],
      \"@type\": \"cmdb_ci_ni_site\"
    }" \
    --user 'username':'password'

Response body.

    {
       "href": "/api/sn_ni_core/resource/00399f0aed349150f877305f29f832b2",
       "id": "00399f0aed349150f877305f29f832b2",
       "name": "DENVER CO CO/HUB",
       "note": [
          {
             "text": "Cisco maintenance team onsite June 22, 2022."
          }
       ],
       "resourceCharacteristic": [
          {
             "name": "altitude_units",
             "valueType": "string",
             "value": "feet"
          },
          {
             "name": "attestation_status",
             "valueType": "string",
             "value": "Not Yet Reviewed"
          },
          {
             "name": "attested",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "can_print",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "clli_code",
             "valueType": "string",
             "value": "DNVRCOMR02T"
          },
          {
             "name": "comments",
             "valueType": "string",
             "value": "Site is scheduled for diesel generator test July 13, 2022 at 9am CST."
          },
          {
             "name": "cost_cc",
             "valueType": "string",
             "value": "USD"
          },
          {
             "name": "county",
             "valueType": "string",
             "value": "DENVER"
          },
          {
             "name": "data_center_code",
             "valueType": "string",
             "value": "DNVR00564"
          },
          {
             "name": "discovery_source",
             "valueType": "string",
             "value": "Resource Inventory Open API"
          },
          {
             "name": "fault_count",
             "valueType": "integer",
             "value": "0"
          },
          {
             "name": "first_discovered",
             "valueType": "datetime",
             "value": "2022-07-21T19:38:04.000Z"
          },
          {
             "name": "install_status",
             "valueType": "integer",
             "value": "1"
          },
          {
             "name": "last_discovered",
             "valueType": "datetime",
             "value": "2022-07-21T19:38:04.000Z"
          },
          {
             "name": "life_cycle_stage",
             "valueType": "reference",
             "value": "Operational"
          },
          {
             "name": "life_cycle_stage_status",
             "valueType": "reference",
             "value": "In Use"
          },
          {
             "name": "location",
             "valueType": "reference",
             "value": "25ab8f300a0a0bb300d99f69c3ac24cd"
          },
          {
             "name": "managed_by",
             "valueType": "reference",
             "value": "b0f31e5673500010c2e7660c4cf6a711"
          },
          {
             "name": "monitor",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "network_domain",
             "valueType": "string",
             "value": "core"
          },
          {
             "name": "ni_type",
             "valueType": "reference",
             "value": "8e8f3770404d0110f8772175cacd7204"
          },
          {
             "name": "pots_number",
             "valueType": "ph_number",
             "value": "(214) 555-1234"
          },
          {
             "name": "skip_sync",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "third_party_ownership",
             "valueType": "boolean",
             "value": "false"
          },
          {
             "name": "unverified",
             "valueType": "boolean",
             "value": "false"
          }
       ],
       "resourceRelationship": [
          {
             "relationshipType": "Connects to::Connected by",
             "resource": {
                "id": "e6f6df8d4051c910f8772175cacd72b2",
                "href": "/api/sn_ni_core/resource/e6f6df8d4051c910f8772175cacd72b2"
             }
          },
          {
             "relationshipType": "Connects to::Connected by",
             "resource": {
                "id": "0ac19bc54051c910f8772175cacd724b",
                "href": "/api/sn_ni_core/resource/0ac19bc54051c910f8772175cacd724b"
             }
          },
          {
             "relationshipType": "Connects to::Connected by",
             "resource": {
                "id": "997e5c11875851109a9c0f65dabb35ac",
                "href": "/api/sn_ni_core/resource/997e5c11875851109a9c0f65dabb35ac"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "5b10e8154015c910f8772175cacd724d",
                "href": "/api/sn_ni_core/resource/5b10e8154015c910f8772175cacd724d"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "57e73b51405dc910f8772175cacd726e",
                "href": "/api/sn_ni_core/resource/57e73b51405dc910f8772175cacd726e"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "bf58f751405dc910f8772175cacd72e8",
                "href": "/api/sn_ni_core/resource/bf58f751405dc910f8772175cacd72e8"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "b5711e31405d0d10f8772175cacd7232",
                "href": "/api/sn_ni_core/resource/b5711e31405d0d10f8772175cacd7232"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "ed811e31405d0d10f8772175cacd72d3",
                "href": "/api/sn_ni_core/resource/ed811e31405d0d10f8772175cacd72d3"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "d74937d1405dc910f8772175cacd7288",
                "href": "/api/sn_ni_core/resource/d74937d1405dc910f8772175cacd7288"
             }
          },
          {
             "relationshipType": "Contains::Contained by",
             "resource": {
                "id": "da0df2e3e4e64510f877e70ec9bcacc6",
                "href": "/api/sn_ni_core/resource/da0df2e3e4e64510f877e70ec9bcacc6"
             }
          }
       ],
       "@type": "cmdb_ci_ni_site"
    }

## Resource Inventory Open API - POST /sn_ni_core/resourceinventoryviatemplate {#ariaid-title7}

Creates a resource configuration item (CI) and related CI hierarchy based on a
template.
Before calling this endpoint, you must create an inventory template in the Inventory
Template \[sn_ni_core_inventory_template\] table. You can define the entire hierarchy of
related CIs in an inventory template. You can then create all of the CIs and relationships
via a single API request.

### URL format

Default URL:
/api/sn_ni_core/resourceinventoryviatemplate

### Supported request parameters

{#resource-inv-POST-template__entry__2}

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

{#resource-inv-POST-template__entry__6}

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

{#resource-inv-POST-template__entry__10}

| Name | Description |
|-|-|
| overrides | List of columns to override and the values to use. Data type: Object "overrides": { "column_name": "String" } |
| overrides.column_name | Required if the overrides parameter is used. Column name and value. Data type: String |
| parentId | Required. Sys_id of the parent CI. Located in one of the following tables depending on the type of parent CI. * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Interface Card \[cmdb_ci_interface_card\] * IP Address \[cmdb_ci_ip_address\] * Logical Connection \[cmdb_ci_ni_logical_path\] * Network Interface \[cmdb_ci_ni_interface\] * Network Site \[cmdb_ci_ni_site\] * Physical Connection \[cmdb_ci_ni_physical_link\] * Strand \[cmdb_ci_strand\] * Topology \[cmdb_ci_topology\] * Tables specified by the sn_ni_core.equipment_tables sys_property, and any tables that extend the specified tables. * Tables that extend Equipment Holder \[cmdb_ci_equipment_holder\]. * Child tables that extend any of the following tables: * Cable \[cmdb_ci_cable\] * Equipment Holder \[cmdb_ci_equipment_holder\] * Strand \[cmdb_ci_strand\] {#resource-inv-POST-template__ul_umw_gvn_bcc} {#resource-inv-POST-template__ul_ihw_mmd_wxb} Data type: String |
| templateId | Required. Sys_id of the template. Data type: String Table: Inventory Template \[sn_ni_core_inventory_template\] |
| templateOverrides | List of template overrides. Data type: Array of Objects "templateOverrides": [ { "overrideTemplateId": "String", "templateId": "String" } ] |
| templateOverrides.overrideTemplateId | Required if the templateOverrides parameter is used. Available template sys_id. Data type: String |
| templateOverrides.templateId | Required if the templateOverrides parameter is used. Related template sys_id. Data type: String |
[Table 33. Request body parameters (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.").
{#resource-inv-POST-template__table_ss4_qtt_g5b__entry__2}{#resource-inv-POST-template__accept-JSON-only-entry-RESTAPI}{#resource-inv-POST-template__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]

{#resource-inv-POST-template__table_ss4_qtt_g5b} {#resource-inv-POST-template__table_b21_rtt_g5b__entry__2}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Only supports application/json. |
| Location | URL of the created CI at the top of the hierarchy. |
[Table 35. Response headers]

{#resource-inv-POST-template__table_b21_rtt_g5b}

### 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.").
{#resource-inv-POST-template__table_b4x_lrs_g5b__entry__2}{#resource-inv-POST-template__entry-400-status-code}{#resource-inv-POST-template__entry-401-status-code}

| Status code | Description |
|-|-|
| 201 | Resource created. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Error. An error occurred with the request. For example, the request failed validation checks. |
[Table 36. Status codes]

{#resource-inv-POST-template__table_b4x_lrs_g5b}

### Response body parameters (JSON)

{#resource-inv-POST-template__entry__48}

| Name | Description |
|-|-|
| result | Result object with information about the created CIs. Data type: Object "result": { "sys_id": "String" } |
| result.sys_id | Sys_id of the created CI at the top of the hierarchy. Data type: String |
[ ]

### cURL request

This example creates a CI hierarchy using a template.

    curl "https://instance.service-now.com/api/sn_ni_core/resourceinventoryviatemplate" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "templateId": "90475711ed6ec110f877d2f57b8accda",
       "parentId": "917dd8f6870e851079c40f2d0ebb353d",
       "overrides": {
          "equipment_clli": "test"
       },
       "templateOverrides": [
          {
             "templateId": "ac3b679ded6ec110f877d2f57b8acc29",
             "overrideTemplateId": "f9604efb54e18110f87749bbc4ad38d8"
          },
          {
             "templateId": "171c23dded6ec110f877d2f57b8acc33",
             "overrideTemplateId": "0f38e59187424110e14f64e73cbb35b4"
          }
       ]
    }" \
    --user 'username':'password'

Response body.

    "result": {
       "sys_id": "00598f0aed346259f388105f29f892c4"
    }


