Service Catalog Open API

  • Release version: Xanadu
  • Updated August 1, 2024
  • 17 minutes to read
  • The Service Catalog Open API provides endpoints to create and retrieve service specifications.

    Use this API to manage service catalog information between external systems and the ServiceNow AI Platform. The Service Catalog Open API is a ServiceNow® implementation of the TM Forum Service Catalog API REST specification. This implementation is based on the TMF633 Service Catalog API REST Specification Version 4, October 2020.

    This API is included in the Product Catalog Advanced application, which is available on the ServiceNow Store.

    This API is provided within the sn_prd_pm_adv namespace.

    The calling user must have the sn_prd_pm_adv.catalog_integrator role.

    This API creates and updates data in the following tables.
    • Characteristic [sn_prd_pm_characteristic]
    • Characteristic Option [sn_prd_pm_characteristic_option]
    • Service Specification [sn_prd_pm_service_specification]
    • Specification Relationship [sn_prd_pm_specification_relationship]

    Service Catalog Open - GET /servicespecification

    Retrieves a list of all service specifications.

    URL format

    Default URL: /api/sn_prd_pm_adv/catalogmanagement/servicespecification

    Supported request parameters

    Table 1. Path parameters
    Name Description
    None
    Table 2. Query parameters
    Name Description
    fields List of fields to return in the response. Invalid fields are ignored. If this parameter is not used, all fields are returned.

    Data type: String

    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

    Maximum: 100

    Data type: Number

    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

    state Filter service specifications by state. Only specifications with a state matching the value of this parameter are returned in the response.

    Data type: String

    Table 3. Request body parameters (JSON)
    Name Description
    None

    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.

    Table 4. Request headers
    Header Description
    None
    Table 5. Response headers
    Header Description
    Content-Range Specifies the 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.
    X-Total-Count For paginated queries, this header specifies the total number of records available on the server.

    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.

    Table 6. Status codes
    Status code Description
    200 Request successfully processed. Full resource returned in response (no pagination).
    206 Partial resource returned in response (with pagination).
    400
    Bad request. Possible reasons:
    • Invalid path parameter
    • Invalid URI
    404 Record not found. No records matching the query parameters are found in the table.

    Response body parameters (JSON)

    Name Description
    description Description of the specification.

    Data type: String

    externalId External_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    id Initial_version or external_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalId Initial_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalVersion Version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    lastUpdate Date the specification was last updated.

    Data type: String

    name Name of the specification.

    Data type: String

    resourceSpecification Resource specifications for this service specification.

    Data type: Array

    "resourceSpecification": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "name": "String",
          "version": "String"
       }
    ]
    resourceSpecification.id Initial_version or external_id of the resource specification.

    Data type: String

    resourceSpecification.internalId Initial_version of the resource specification.

    Data type: String

    resourceSpecification.internalVersion External_version of the resource specification.

    Data type: String

    resourceSpecification.name Name of the resource specification.

    Data type: String

    resourceSpecification.version Version of the resource specification.

    Data type: String

    serviceSpecificationRelationship This specification's relationships to other service specifications.

    Data type: Array

    "serviceSpecificationRelationship": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "relationshipType": "String",
          "validFor": {Object},
          "version": "String"
       }
    ]
    serviceSpecificationRelationship.id Initial_version or external_id of the related specification.

    Data type: String

    serviceSpecificationRelationship.internalId Initial_version of the related specification.
    serviceSpecificationRelationship.internalVersion Version of the related specification.

    Data type: String

    serviceSpecificationRelationship.relationshipType Type of relationship.

    Data type: String

    serviceSpecificationRelationship.validFor Date range the relationship is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    serviceSpecificationRelationship.validFor.endDateTime End date of the relationship.

    Data type: String

    serviceSpecificationRelationship.validFor.startDateTime Start date of the relationship.

    Data type: String

    serviceSpecificationRelationship.version External_version of the related specification.

    Data type: String

    specCharacteristic Specification characteristic.

    Data type: Array

    "specCharacteristic": [
       {
          "characteristicValueSpecification": Array,
          "description": "String",
          "name": "String",
          "validFor": Object,
          "valueType": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification Array containing the possible values of the characteristic.

    Data type: Array

    "characteristicValueSpecification": [
       {
          "value": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification.value Value of the characteristic.

    Data type: String

    specCharacteristic.description Description of the characteristic.

    Data type: String

    specCharacteristic.name Name of the characteristic.

    Data type: String

    specCharacteristic.validFor Date range the characteristic is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    specCharacteristic.validFor.endDateTime End date of the characteristic.

    Data type: String

    specCharacteristic.validFor.startDateTime Start date of the characteristic.

    Data type: String

    specCharacteristic.valueType The value type of the characteristic, such as choice or email.

    Data type: String

    validFor Date range the specification is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    validFor.endDateTime End date of the specification.

    Data type: String

    validFor.startDateTime Start date of the specification.

    Data type: String

    version External_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    @type Type of specification.

    Data type: String

    cURL request

    This example retrieves all service specifications.

    curl --location --request GET "https://instance.servicenow.com/api/sn_prd_pm_adv/catalogmanagement/servicespecification" \
    --user 'username':'password'
    
    
    

    Response body.

    [
       {
          "id": "16d79ec3532520103b6bddeeff7b12a6",
          "name": "SD WAN Optimization Service",
          "description": "SD WAN Optimization Service",
          "lastUpdate": "2022-01-23 22:48:55",
          "validFor": {
             "startDateTime": "2022-01-12",
             "endDateTime": "2027-02-11"
          },
          "serviceSpecificationRelationship": [
             {
                "id": "a1f5fe981bb420106ba59acf034bcb4f",
                "name": "Deduplication and Compression",
                "version": "1",
                "type": "rfs",
                "validFor": {
                   "startDateTime": "2021-02-11",
                   "endDateTime": "2027-02-11"
                }
             }
          ],
          "resourceSpecification": [],
          "serviceSpecCharacteristic": [
             {
                "name": "SSL Optimization",
                "description": "SSL Optimization",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-01-14 07:47:57"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "False",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "True",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             },
             {
                "name": "CIFS Optimization",
                "description": "CIFS Optimization Protocol",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-01-14 07:49:09"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "SMB1",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "SMB2",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             }
          ]
       },
       {
          "id": "31c5caff07266010a7955b7e0ad3006b",
          "name": "Firewall Administration",
          "description": "Firewall Administration",
          "lastUpdate": "2022-01-23 11:46:48",
          "validFor": {
             "startDateTime": "2021-11-22",
             "endDateTime": ""
          },
          "serviceSpecificationRelationship": [],
          "resourceSpecification": [
             {
                "id": "3546463307666010a7955b7e0ad3005d",
                "name": "Cisco Firewall Management system",
                "version": "1"
             }
          ],
          "serviceSpecCharacteristic": [
             {
                "name": "Firewall Administration CPE Model",
                "description": "Firewall Administration CPE Model",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-02-20 00:55:37"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "2100 series",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "4100 series",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "7300 series",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "9300 series",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             },
             {
                "name": "Firewall Administration CPE Type",
                "description": "Firewall Administration CPE Type",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-02-20 00:53:45"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "Physical",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "Virtual",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             },
             {
                "name": "Configuration and Policy backup",
                "description": "Configuration and Policy backup",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-01-21 10:46:02"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "Weekly",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "Monthly",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "Daily",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             },
             {
                "name": "Remote CLI troubleshoot support",
                "description": "Remote CLI troubleshoot support",
                "valueType": "choice",
                "validFor": {
                   "startDatetime": "2022-01-21 10:45:38"
                },
                "productSpecCharacteristicValue": [
                   {
                      "value": "Standard support",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "Premium support",
                      "validFor": {
                         "startDateTime": ""
                      }
                   },
                   {
                      "value": "Basic support",
                      "validFor": {
                         "startDateTime": ""
                      }
                   }
                ]
             },
             {
                "name": "Firewall Administration CPE ID",
                "description": "Firewall Administration CPE ID",
                "valueType": "single_line_text",
                "validFor": {
                   "startDatetime": "2022-02-20 00:57:50"
                },
                "productSpecCharacteristicValue": []
             }
          ]
       }
    ]

    Service Catalog Open - GET /servicespecification/{specificationId}

    Retrieves a service specification.

    URL format

    Default URL: /api/sn_prd_pm_adv/catalogmanagement/servicespecification/{specificationId}

    Supported request parameters

    Table 7. Path parameters
    Name Description
    specificationId Sys_id of the service specification to retrieve. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    Table 8. Query parameters
    Name Description
    fields List of fields to return in the response. Invalid fields are ignored. If this parameter is not used, all fields are returned.

    Data type: String

    state Filter service specifications by state. Only specifications with a state matching the value of this parameter are returned in the response.

    Data type: String

    Table 9. Request body parameters (JSON)
    Name Description
    None

    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.

    Table 10. Request headers
    Header Description
    None
    Table 11. Response headers
    Header Description
    Content-Type Data format of the response body. Only supports application/json.

    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.

    Table 12. Status codes
    Status code Description
    200 Request successfully processed.
    400
    Bad Request. Could be any of the following reasons:
    • Invalid path parameter
    • Invalid URI
    404 Record not found. Record associated with the ID is not found in the table.

    Response body parameters (JSON)

    Name Description
    description Description of the specification.

    Data type: String

    externalId External_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    id Initial_version or external_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalId Initial_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalVersion Version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    lastUpdate Date the specification was last updated.

    Data type: String

    name Name of the specification.

    Data type: String

    resourceSpecification Resource specifications for this service specification.

    Data type: Array

    "resourceSpecification": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "name": "String",
          "version": "String"
       }
    ]
    resourceSpecification.id Initial_version or external_id of the resource specification.

    Data type: String

    resourceSpecification.internalId Initial_version of the resource specification.

    Data type: String

    resourceSpecification.internalVersion External_version of the resource specification.

    Data type: String

    resourceSpecification.name Name of the resource specification.

    Data type: String

    resourceSpecification.version Version of the resource specification.

    Data type: String

    serviceSpecificationRelationship This specification's relationships to other service specifications.

    Data type: Array

    "serviceSpecificationRelationship": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "relationshipType": "String",
          "validFor": {Object},
          "version": "String"
       }
    ]
    serviceSpecificationRelationship.id Initial_version or external_id of the related specification.

    Data type: String

    serviceSpecificationRelationship.internalId Initial_version of the related specification.
    serviceSpecificationRelationship.internalVersion Version of the related specification.

    Data type: String

    serviceSpecificationRelationship.relationshipType Type of relationship.

    Data type: String

    serviceSpecificationRelationship.validFor Date range the relationship is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    serviceSpecificationRelationship.validFor.endDateTime End date of the relationship.

    Data type: String

    serviceSpecificationRelationship.validFor.startDateTime Start date of the relationship.

    Data type: String

    serviceSpecificationRelationship.version External_version of the related specification.

    Data type: String

    specCharacteristic Specification characteristic.

    Data type: Array

    "specCharacteristic": [
       {
          "characteristicValueSpecification": Array,
          "description": "String",
          "name": "String",
          "validFor": Object,
          "valueType": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification Array containing the possible values of the characteristic.

    Data type: Array

    "characteristicValueSpecification": [
       {
          "value": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification.value Value of the characteristic.

    Data type: String

    specCharacteristic.description Description of the characteristic.

    Data type: String

    specCharacteristic.name Name of the characteristic.

    Data type: String

    specCharacteristic.validFor Date range the characteristic is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    specCharacteristic.validFor.endDateTime End date of the characteristic.

    Data type: String

    specCharacteristic.validFor.startDateTime Start date of the characteristic.

    Data type: String

    specCharacteristic.valueType The value type of the characteristic, such as choice or email.

    Data type: String

    validFor Date range the specification is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    validFor.endDateTime End date of the specification.

    Data type: String

    validFor.startDateTime Start date of the specification.

    Data type: String

    version External_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    @type Type of specification.

    Data type: String

    cURL request

    This example retrieves a service specification for a firewall service.

    curl --location --request GET "https://instance.servicenow.com/api/sn_prd_pm_adv/catalogmanagement/servicespecification/31c5caff07266010a7955b7e0ad3006b" \
    --user 'username':'password'
    
    
    

    Response body.

    {
       "id": "31c5caff07266010a7955b7e0ad3006b",
       "name": "Firewall Administration",
       "description": "Firewall Administration",
       "lastUpdate": "2022-01-23 11:46:48",
       "validFor": {
          "startDateTime": "2021-11-22",
          "endDateTime": ""
       },
       "serviceSpecificationRelationship": [],
       "resourceSpecification": [
          {
             "id": "3546463307666010a7955b7e0ad3005d",
             "name": "Cisco Firewall Management system",
             "version": "1"
          }
       ],
       "serviceSpecCharacteristic": [
          {
             "name": "Firewall Administration CPE Model",
             "description": "Firewall Administration CPE Model",
             "valueType": "choice",
             "validFor": {
                "startDatetime": "2022-02-20 00:55:37"
             },
             "productSpecCharacteristicValue": [
                {
                   "value": "2100 series",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "4100 series",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "7300 series",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "9300 series",
                   "validFor": {
                      "startDateTime": ""
                   }
                }
             ]
          },
          {
             "name": "Firewall Administration CPE Type",
             "description": "Firewall Administration CPE Type",
             "valueType": "choice",
             "validFor": {
                "startDatetime": "2022-02-20 00:53:45"
             },
             "productSpecCharacteristicValue": [
                {
                   "value": "Physical",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "Virtual",
                   "validFor": {
                      "startDateTime": ""
                   }
                }
             ]
          },
          {
             "name": "Configuration and Policy backup",
             "description": "Configuration and Policy backup",
             "valueType": "choice",
             "validFor": {
                "startDatetime": "2022-01-21 10:46:02"
             },
             "productSpecCharacteristicValue": [
                {
                   "value": "Weekly",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "Monthly",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "Daily",
                   "validFor": {
                      "startDateTime": ""
                   }
                }
             ]
          },
          {
             "name": "Remote CLI troubleshoot support",
             "description": "Remote CLI troubleshoot support",
             "valueType": "choice",
             "validFor": {
                "startDatetime": "2022-01-21 10:45:38"
             },
             "productSpecCharacteristicValue": [
                {
                   "value": "Standard support",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "Premium support",
                   "validFor": {
                      "startDateTime": ""
                   }
                },
                {
                   "value": "Basic support",
                   "validFor": {
                      "startDateTime": ""
                   }
                }
             ]
          },
          {
             "name": "Firewall Administration CPE ID",
             "description": "Firewall Administration CPE ID",
             "valueType": "single_line_text",
             "validFor": {
                "startDatetime": "2022-02-20 00:57:50"
             },
             "productSpecCharacteristicValue": []
          }
       ]
    }

    Service Catalog Open - POST /servicespecification

    Creates a service specification.

    URL format

    Default URL: /api/sn_prd_pm_adv/catalogmanagement/servicespecification

    Supported request parameters

    Table 13. Path parameters
    Name Description
    None
    Table 14. Query parameters
    Name Description
    None
    Table 15. Request body parameters (JSON)
    Name Description
    description Required. Description of the specification.

    Data type: String

    externalId External_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    If both externalId and id are provided, they must refer to the same specification.

    Data type: String

    Default: Blank string

    id Initial_version or external_id of the service specification. If id is not provided, this endpoint creates a new specification with version=1. If id is provided, this endpoint creates a new version of the given specification.

    If both externalId and id are provided, they must refer to the same specification.

    Data type: String

    Default: Blank string

    internalVersion Version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    Default: Blank string

    lastUpdate Date the specification was last updated.

    Data type: String

    Default: Blank string

    name Required. Name of the specification.

    Data type: String

    resourceSpecification Required. Resource specifications for this service specification.

    Data type: Array

    "resourceSpecification": [
       {
          "id": "String",
          "internalVersion": "String",
          "name": "String",
          "version": "String"
       }
    ]
    resourceSpecification.id Required. Initial_version or external_id of the resource specification.

    Data type: String

    resourceSpecification.internalVersion External_version of the resource specification.

    Data type: String

    Default: Blank string

    resourceSpecification.name Name of the resource specification.

    Data type: String

    Default: Blank string

    resourceSpecification.version Version of the resource specification.

    Data type: String

    Default: Blank string

    serviceSpecificationRelationship This specification's relationships to other service specifications.

    Data type: Array

    "serviceSpecificationRelationship": [
       {
          "id": "String",
          "internalVersion": "String",
          "relationshipType": "String",
          "validFor": {Object},
          "version": "String"
       }
    ]
    serviceSpecificationRelationship.id Required if using the serviceSpecificationRelationship parameter. Initial_version or external_id of the related specification.

    Data type: String

    serviceSpecificationRelationship.internalVersion Version of the related specification.

    Data type: String

    Default: Blank string

    serviceSpecificationRelationship.relationshipType Required if using the serviceSpecificationRelationship parameter. Type of relationship.
    Valid values:
    • composed_of
    • bundles

    Data type: String

    serviceSpecificationRelationship.validFor Date range the relationship is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    serviceSpecificationRelationship.validFor.endDateTime End date of the relationship.

    Data type: String

    Default: Blank string

    serviceSpecificationRelationship.validFor.startDateTime Start date of the relationship.

    Data type: String

    Default: Blank string

    serviceSpecificationRelationship.version External_version of the related specification.

    Data type: String

    Default: Blank string

    specCharacteristic Specification characteristic.

    Data type: Array

    "specCharacteristic": [
       {
          "characteristicValueSpecification": Array,
          "description": "String",
          "name": "String",
          "validFor": Object,
          "valueType": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification Required. Array containing the possible values of the characteristic.

    Data type: Array

    "characteristicValueSpecification": [
       {
          "value": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification.value Required. Value of the characteristic.

    Data type: String

    specCharacteristic.description Description of the characteristic.

    Data type: String

    Default: Blank string

    specCharacteristic.name Required. Name of the characteristic.

    Data type: String

    specCharacteristic.validFor Date range the characteristic is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    specCharacteristic.validFor.endDateTime End date of the characteristic.

    Data type: String

    Default: Blank string

    specCharacteristic.validFor.startDateTime Start date of the characteristic.

    Data type: String

    Default: Blank string

    specCharacteristic.valueType Required. The value type of the characteristic, such as choice or email.

    Data type: String

    validFor Required. Date range the specification is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    validFor.endDateTime End date of the specification.

    Data type: String

    Default: Blank string

    validFor.startDateTime Start date of the specification.

    Data type: String

    Default: Blank string

    version External_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Version must be unique for the given version chain.

    Data type: String

    Default: Blank string

    @type Required. Type of specification.
    Valid values:
    • CustomerFacingServiceSpecification
    • ResourceFacingServiceSpecification

    Data type: String

    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.

    Table 16. Request headers
    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 17. Response headers
    Header Description
    Content-Type Data format of the response body. Only supports application/json.

    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.

    Table 18. Status codes
    Status code Description
    201 Request successfully processed.
    400 Bad Request. Could be any of the following reasons:
    • Empty payload.
    • Invalid payload. Mandatory field missing: <field name>

    Response body parameters (JSON)

    Name Description
    description Description of the specification.

    Data type: String

    externalId External_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    id Initial_version or external_id of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalId Initial_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    internalVersion Version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    lastUpdate Date the specification was last updated.

    Data type: String

    name Name of the specification.

    Data type: String

    resourceSpecification Resource specifications for this service specification.

    Data type: Array

    "resourceSpecification": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "name": "String",
          "version": "String"
       }
    ]
    resourceSpecification.id Initial_version or external_id of the resource specification.

    Data type: String

    resourceSpecification.internalId Initial_version of the resource specification.

    Data type: String

    resourceSpecification.internalVersion External_version of the resource specification.

    Data type: String

    resourceSpecification.name Name of the resource specification.

    Data type: String

    resourceSpecification.version Version of the resource specification.

    Data type: String

    serviceSpecificationRelationship This specification's relationships to other service specifications.

    Data type: Array

    "serviceSpecificationRelationship": [
       {
          "id": "String",
          "internalId": "String",
          "internalVersion": "String",
          "relationshipType": "String",
          "validFor": {Object},
          "version": "String"
       }
    ]
    serviceSpecificationRelationship.id Initial_version or external_id of the related specification.

    Data type: String

    serviceSpecificationRelationship.internalId Initial_version of the related specification.
    serviceSpecificationRelationship.internalVersion Version of the related specification.

    Data type: String

    serviceSpecificationRelationship.relationshipType Type of relationship.

    Data type: String

    serviceSpecificationRelationship.validFor Date range the relationship is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    serviceSpecificationRelationship.validFor.endDateTime End date of the relationship.

    Data type: String

    serviceSpecificationRelationship.validFor.startDateTime Start date of the relationship.

    Data type: String

    serviceSpecificationRelationship.version External_version of the related specification.

    Data type: String

    specCharacteristic Specification characteristic.

    Data type: Array

    "specCharacteristic": [
       {
          "characteristicValueSpecification": Array,
          "description": "String",
          "name": "String",
          "validFor": Object,
          "valueType": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification Array containing the possible values of the characteristic.

    Data type: Array

    "characteristicValueSpecification": [
       {
          "value": "String"
       }
    ]
    specCharacteristic.characteristicValueSpecification.value Value of the characteristic.

    Data type: String

    specCharacteristic.description Description of the characteristic.

    Data type: String

    specCharacteristic.name Name of the characteristic.

    Data type: String

    specCharacteristic.validFor Date range the characteristic is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    specCharacteristic.validFor.endDateTime End date of the characteristic.

    Data type: String

    specCharacteristic.validFor.startDateTime Start date of the characteristic.

    Data type: String

    specCharacteristic.valueType The value type of the characteristic, such as choice or email.

    Data type: String

    validFor Date range the specification is valid for.

    Data type: Object

    "validFor": {
       "endDateTime": "String",
       "startDateTime": "String"
    }
    validFor.endDateTime End date of the specification.

    Data type: String

    validFor.startDateTime Start date of the specification.

    Data type: String

    version External_version of the service specification. Located in the Service Specification [sn_prd_pm_service_specification] table.

    Data type: String

    @type Type of specification.

    Data type: String

    cURL request

    This example creates a service specification for a firewall service.

    curl "https://instance.servicenow.com/api/sn_prd_pm_adv/catalogmanagement/servicespecification" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
       "externalId": "7655",
       "name": "Firewall Service",
       "description": "This service specification describes a firewall service that can be deployed in customer-premises equipment.",
       "validFor": {
          "startDateTime": "2017-08-23T00:00",
          "endDateTime": "2021-03-25T00:00"
       },
       "lastUpdate": "2020-08-15T00:00",
       "resourceSpecification": [
          {
             "id": "af66e551c32f10105252716b7d40dd52",
             "name": "Firewall"
          }
       ],
       "specCharacteristic": [
          {
             "name": "Edge",
             "description": "This characteristic describes the operating system run by the service",
             "valueType": "choice",
             "validFor": {
                "startDateTime": "2017-08-12T00:00",
                "endDateTime": "2021-03-07T00:00"
             },
             "characteristicValueSpecification": [
                {
                   "value": "Android KitKat"
                }
             ],
          }
       ],
       "serviceSpecRelationship": [
          {
             "relationshipType": "composed_of",
             "id": "65033023ebdb30107ee5302698522849",
             "validFor": {
                "startDateTime": "2017-08-25T00:00",
                "endDateTime": "2021-03-25T00:00"
             }
          }
       ],
       "@type": "ResourceFacingServiceSpecification"
    }" \
    --user 'username':'password'

    Response body.

    {
       "id": "21a7ee64c32310105253716b8d40dd60",
       "name": "Firewall Service",
       "description": "This service specification describes a firewall service that can be deployed in customer-premises equipment.",
       "validFor": {
          "startDateTime": "2017-08-23T00:00",
          "endDateTime": "2021-03-25T00:00"
       },
       "lastUpdate": "2020-08-15T00:00",
       "resourceSpecification": [
          {
             "id": "af66e551c32f10105252716b7d40dd52",
             "name": "Firewall"
          }
       ],
       "specCharacteristic": [
          {
             "name": "Edge",
             "description": "This characteristic describes the operating system run by the service",
             "valueType": "choice",
             "validFor": {
                "startDateTime": "2017-08-12T00:00",
                "endDateTime": "2021-03-07T00:00"
             },
             "characteristicValueSpecification": [
                {
                   "value": "Android KitKat"
                }
             ],
          }
       ],
       "serviceSpecRelationship": [
          {
             "relationshipType": "composed_of",
             "id": "65033023ebdb30107ee5302698522849",
             "validFor": {
                "startDateTime": "2017-08-25T00:00",
                "endDateTime": "2021-03-25T00:00"
             }
          }
       ],
       "@type": "ResourceFacingServiceSpecification"
    }