The Trouble Ticket Open API provides endpoints to create, update, and retrieve data from the Case [sn_customerservice_case] and Incident [incident] tables.

Use this API to manage ticket information between external ticketing systems and the Now Platform.

This API is included in the Telecommunications Assurance Workflows application, which is available on the ServiceNow Store. The Customer Service (com.sn_customerservice) and Customer Service Install Base Management (com.snc.install_base) applications are required to use this API with the Case [sn_customerservice_case] table.

This API is provided within the sn_ind_tsm_sdwan namespace.

The calling user must have the ticket_integrator role.

This API can be extended to make customizations around required parameters, request body validation, additional REST operations, and field mappings. For more information, see the Trouble Ticket Open API Developer Guide.

The Trouble Ticket Open API is a ServiceNow® implementation of the TM Forum Trouble Ticket Management API REST specification. This implementation is based on the TMF621 Trouble Ticket Management API REST Specification Release 19, June 2019. The Trouble Ticket Open API is conformance certified by TM Forum.

TMF conformance logo

Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket 

Retrieves a list of all trouble ticket records from the Case [sn_customerservice_case] and Incident [incident] tables.

URL format

Default URL: /api/sn_ind_tsm_sdwan/ticket/troubleTicket

Supported request parameters

Table 1. Path parameters
Name Description
None
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

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.

Response body parameters (JSON)

Example: cURL request

This example returns specified fields for the first five trouble ticket case records.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket?limit=5&fields=id%2Cname%2Cdescription%2Cstatus%2Cseverity%2CticketType&ticketType=case" \
--request GET \
--user 'username':'password'

Response body.

[
   {
      "id": "0004609eb9830110f877b3758cd21d37",
      "name": "Compliant Over 2796",
      "description": "checkNo2796",
      "status": "New",
      "severity": "3 - Moderate",
      "ticketType": "Case"
   },
   {
      "id": "000560d2b9c30110f877b3758cd21d36",
      "name": "Compliant Over 4696",
      "description": "checkNo4696",
      "status": "New",
      "severity": "3 - Moderate",
      "ticketType": "Case"
   },
   {
      "id": "0007ac5eb9c30110f877b3758cd21d34",
      "name": "Compliant Over 8817",
      "description": "checkNo8817",
      "status": "New",
      "severity": "3 - Moderate",
      "ticketType": "Case"
   },
   {
      "id": "0007ac5eb9c30110f877b3758cd21d39",
      "name": "Compliant Over 8819",
      "description": "checkNo8819",
      "status": "New",
      "severity": "3 - Moderate",
      "ticketType": "Case"
   },
   {
      "id": "0007ac5eb9c30110f877b3758cd21d3e",
      "name": "Compliant Over 8821",
      "description": "checkNo8821",
      "status": "New",
      "severity": "3 - Moderate",
      "ticketType": "Case"
   }
]

Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

Retrieves a specified record from the Case [sn_customerservice_case] or Incident [incident] table.

URL format

Default URL: /api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

Supported request parameters

Table 7. Path parameters
Name Description
id Sys_id of the case or incident record to retrieve.

Data type: String

Table: Case [sn_customerservice_case] or Incident [incident]

Table 8. Query parameters
Name Description
fields List of fields to return in the response. Invalid fields are ignored.
Valid values:
  • channel
  • creationDate
  • description
  • href
  • id
  • lastUpdate
  • name
  • note
  • relatedEntity
  • relatedParty
  • severity
  • status
  • ticketType
  • @type

Data type: String

Default: Returns all fields.

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
Accept Data format of the response body. Only supports application/json.
Table 11. Response headers
Header Description
None

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 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Invalid path parameter.
  • Invalid URI.
404 Record not found. A record associated with the ID is not found in the Case [sn_customerservice_case] or Incident [incident] table.

Response body parameters (JSON)

Example: cURL request

This example retrieves a trouble ticket record from the Case [sn_customerservice_case] table.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

Response body.

{
    "id": "370415f03c20e910f8772f1bc332b31b",
    "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/370415f03c20e910f8772f1bc332b31b",
    "creationDate": "2023-01-19 22:39:28",
    "lastUpdate": "2023-01-19 22:41:39",
    "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
    "severity": "2 - High",
    "ticketType": "Case",
    "name": "My router is not working properly",
    "status": "Open",
    "channel": {
        "name": "e_bonding"
    },
    "relatedParty": [
        {
            "id": "ffc68911c35420105252716b7d40dd55",
            "name": "Funco Intl",
            "@referredType": "customer"
        },
        {
            "id": "eaf68911c35420105252716b7d40ddde",
            "name": "Sally Thomas",
            "@referredType": "customer_contact"
        },
        {
            "id": "",
            "name": "",
            "@referredType": "assignment_group"
        },
        {
            "id": "",
            "name": "",
            "@referredType": "assigned_to"
        }
    ],
    "relatedEntity": [
        {
            "id": "b7fa12c7532520103b6bddeeff7b123b",
            "href": "",
            "name": "Deduplication and Compression PRD00001965",
            "role": "This is the product associated with the case.",
            "@type": "relatedEntity",
            "@referredType": "product"
        },
        {
            "id": "71e73d87c3e23010ff00ed23a140dde8",
            "href": "",
            "name": "",
            "role": "This is the asset associated with the case.",
            "@type": "relatedEntity",
            "@referredType": "asset"
        },
        {
            "id": "a1913c3577b301108e191e599a5a99e8",
            "href": "",
            "name": "Deduplication and Compression PI0000037",
            "role": "This is the product inventory associated with the case.",
            "@type": "relatedEntity",
            "@referredType": "product_inventory"
        }
    ],
    "note": [
        {
            "text": "This is a testing comment<script>gs.info('Hello World')</script>",
            "date": "2023-01-19 14:41:39",
            "author": "System Administrator",
            "@type": "comments"
        },
        {
            "text": "This is a testing comment<script>gs.info('Hello World')</script>",
            "date": "2023-01-19 14:39:28",
            "author": "System Administrator",
            "@type": "comments"
        }
    ],
    "@type": "TroubleTicket"
}

Trouble Ticket - GET /sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

Retrieves a specified record from the Case [sn_customerservice_case] or Incident [incident] table.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Trouble Ticket - GET /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}.

URL format

Default URL: /api/sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

Supported request parameters

Table 13. Path parameters
Name Description
ticketType Type of ticket. This value determines whether a record is retrieved from the Case [sn_customerservice_case] or Incident [incident] table.
Valid values:
  • case
  • incident

Data type: String

id Sys_id of the case or incident record to retrieve.

Data type: String

Table 14. Query parameters
Name Description
fields Comma-separated list of fields to return in the response. Invalid fields are ignored. If this value is not passed in, all fields are returned.
Valid fields:
  • channel
  • creationDate
  • description
  • id
  • lastUpdate
  • name
  • note
  • relatedEntity
  • relatedParty
  • severity
  • status
  • ticketType
  • @type

Data type: String

Table 15. Request body parameters (XML or 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 16. Request headers
Header Description
Accept Data format of the response body. Only supports application/json.
Table 17. Response headers
Header Description
None

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
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Invalid path parameter.
  • Invalid URI.
404 Record not found. A record associated with the ID is not found in the Case [sn_customerservice_case] or Incident [incident] table.

Response body parameters (JSON or XML)

Example: cURL request

This example gets the name, description, severity, and status of a case.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case/a78e2c8cdb68b41015364c9b0b96193e?fields=name%2Cdescription%2Cseverity%2Cstatus" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'

Response body.

{
  "name": "Short description of issue",
  "description": "Example description of an issue",
  "severity": "2 - High",
  "status": "Open"
}

Trouble Ticket - PATCH /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

Updates a specified record in the Case [sn_customerservice_case] or Incident [incident] table.

URL format

Default URL: /api/sn_ind_tsm_sdwan/ticket/troubleTicket/{id}

Supported request parameters

Table 19. Path parameters
Name Description
id Sys_id of the case or incident record to update.

Data type: String

Table: Case [sn_customerservice_case] or Incident [incident]

Table 20. Query parameters
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 22. 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 23. Response headers
Header Description
None

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 24. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Invalid path parameter.
  • Invalid URI.
404 Record not found. A record associated with the ID is not found in the Case [sn_customerservice_case] or Incident [incident] table.

Response body parameters (JSON)

Example: cURL request

This example updates a case record.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6" \
--request PATCH \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
   description: "Updated description",
   "note": [
      {
         "text": "Adding another comment",
         "@type": "comments"
      }
   ]
}" \
--user 'username':'password'

Response body.

{
   "id": "6467508d47e345508761b955d36d43f6",
   "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6",
   "creationDate": "2022-05-16 23:38:55",
   "lastUpdate": "2022-05-16 23:48:42",
   "description": "Updated description",
   "severity": "2 - High",
   "ticketType": "Case",
   "name": "Laptop problem",
   "status": "New",
   "channel": {
      "name": "web"
   },
   "relatedParty": [
      {
         "id": "",
         "name": "",
         "@referredType": "customer"
      },
      {
         "id": "62826bf03710200044e0bfc8bcbe5df1",
         "name": "",
         "@referredType": "customer_contact"
      },
      {
         "id": "",
         "name": "",
         "@referredType": "assignment_group"
      },
      {
         "id": "",
         "name": "",
         "@referredType": "assigned_to"
      }
   ],
   "relatedEntity": [
      {
         "id": "",
         "href": "",
         "name": "",
         "role": "This is the product associated with the case",
         "@type": "relatedEntity",
         "@referredType": "product"
      },
      {
         "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
         "href": "",
         "name": "P1000597 - Apple MacBook Pro 15\"",
         "role": "This is the asset associated with the case",
         "@type": "relatedEntity",
         "@referredType": "asset"
      }
      {
         "id": "a1913c3577b301108e191e599a5a99e8",
         "href": "",
         "name": "Deduplication and Compression PI0000037",
         "role": "This is the product inventory associated with the case.",
         "@type": "relatedEntity",
         "@referredType": "product_inventory"
      }
   ],
   "note": [
      {
         "text": "Adding another comment",
         "date": "2022-05-16 16:48:42",
         "author": "admin",
         "@type": "comments"
      },
      {
         "text": "Comment about this case",
         "date": "2022-05-16 16:38:55",
         "author": "admin",
         "@type": "comments"
      }
   ],
   "@type": "TroubleTicket"
}

Trouble Ticket - PATCH /sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

Updates a record in the Case [sn_customerservice_case] or Incident [incident] table.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Trouble Ticket - PATCH /sn_ind_tsm_sdwan/ticket/troubleTicket/{id}.

URL format

Default URL: /api/sn_ind_tsm_sdwan/troubleticket/{ticketType}/{id}

Supported request parameters

Table 25. Path parameters
Name Description
ticketType Type of ticket. This value determines whether a record is updated in the Case [sn_customerservice_case] or Incident [incident] table.
Valid values:
  • case
  • incident

Data type: String

id Sys_id of the case or incident record to update.

Data type: String

Table 26. Query parameters
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 28. 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 29. Response headers
Header Description
None

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 30. Status codes
Status code Description
200 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Invalid path parameter.
  • Invalid URI.
404 Record not found. A record associated with the ID is not found in the Case [sn_customerservice_case] or Incident [incident] table.

Response body parameters (JSON or XML)

Example: cURL request

This example updates a case record.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case/370415f03c20e910f8772f1bc332b31b" \
--request PATCH \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
    \"description\":\"Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.\",
    \"name\":\"My router is not working properly\",
    \"severity\":\"2\",
    \"status\":\"10\",
    \"ticketType\":\"Case\",
    \"channel\":{
        \"id\":\"8774\",
        \"name\":\"eBonding\",
        \"@type\":\"Channel\"
    },
    \"note\":[
        {
            \"id\":\"77456\",
            \"author\":\"Jack Smith\",
            \"date\":\"2019-05-31T07:34:45.968Z\",
            \"text\":\"This is a testing work note<html>hello world</html> and <h1>title</h1>\",
            \"@type\":\"Worknotes\"
        },
        {
            \"id\":\"77457\",
            \"author\":\"Jack Smith\",
            \"date\":\"2019-05-31T07:35:45.968Z\",
            \"text\":\"This is a testing comment<script>gs.info('Hello World')</script>\",
            \"@type\":\"Comment\"
        }
    ],
    \"relatedParty\":[
        {
            \"id\":\"eaf68911c35420105252716b7d40ddde\",
            \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v1/individual/9866\",
            \"name\":\"Sally Thomas\",
            \"role\":\"customer\",
            \"@referredType\":\"customer_contact\"
        },
        {
            \"id\":\"ffc68911c35420105252716b7d40dd55\",
            \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v4/customer/9176\",
            \"name\":\"Funco Intl\",
            \"role\":\"customer\",
            \"@referredType\":\"customer\"
        }
    ],
    \"relatedEntity\": [
        {
            \"id\": \"b7fa12c7532520103b6bddeeff7b123b\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"product\"
        },
        {
            \"id\": \"71e73d87c3e23010ff00ed23a140dde8\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"asset\"
        },
        {
            \"id\": \"a1913c3577b301108e191e599a5a99e8\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"product_inventory\"
        }
    ]
}" \
--user 'username':'password'

Response body.

{
  "id": "370415f03c20e910f8772f1bc332b31b",
  "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/370415f03c20e910f8772f1bc332b31b",
  "creationDate": "2023-01-19 22:39:28",
  "lastUpdate": "2023-01-19 22:41:39",
  "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
  "severity": "2 - High",
  "ticketType": "Case",
  "name": "My router is not working properly",
  "status": "Open",
  "channel": {
    "name": "e_bonding"
  },
  "relatedParty": [
    {
      "id": "ffc68911c35420105252716b7d40dd55",
      "name": "Funco Intl",
      "@referredType": "customer"
    },
    {
      "id": "eaf68911c35420105252716b7d40ddde",
      "name": "Sally Thomas",
      "@referredType": "customer_contact"
    },
    {
      "id": "",
      "name": "",
      "@referredType": "assignment_group"
    },
    {
      "id": "",
      "name": "",
      "@referredType": "assigned_to"
    }
  ],
  "relatedEntity": [
    {
      "id": "b7fa12c7532520103b6bddeeff7b123b",
      "href": "",
      "name": "Deduplication and Compression PRD00001965",
      "role": "This is the product associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "product"
    },
    {
      "id": "71e73d87c3e23010ff00ed23a140dde8",
      "href": "",
      "name": "",
      "role": "This is the asset associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "asset"
    },
    {
      "id": "a1913c3577b301108e191e599a5a99e8",
      "href": "",
      "name": "Deduplication and Compression PI0000037",
      "role": "This is the product inventory associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "product_inventory"
    }
  ],
  "note": [
    {
      "text": "This is a testing comment<script>gs.info('Hello World')</script>",
      "date": "2023-01-19 14:41:39",
      "author": "System Administrator",
      "@type": "comments"
    },
    {
      "text": "This is a testing comment<script>gs.info('Hello World')</script>",
      "date": "2023-01-19 14:39:28",
      "author": "System Administrator",
      "@type": "comments"
    }
  ],
  "@type": "TroubleTicket"
}

Trouble Ticket - POST /sn_ind_tsm_sdwan/ticket/troubleTicket 

Creates a record in the Case [sn_customerservice_case] or Incident [incident] table.

URL format

Default URL: /api/sn_ind_tsm_sdwan/ticket/troubleTicket

Supported request parameters

Table 31. Path parameters
Name Description
None
Table 32. Query parameters
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 34. 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 35. Response headers
Header Description
None

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 36. Status codes
Status code Description
201 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Empty payload.
  • Invalid payload. Mandatory field missing.
  • Invalid ticketType.

Response body parameters (JSON)

Example: cURL request

This example creates a trouble ticket case record.

curl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/ticket/troubleTicket" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
   "name": "Laptop problem",
   "description": "Laptop keeps shutting off unexpectedly",
   "severity": "2",
   "status": "New",
   "ticketType": "Case",
   "channel": {
      "name": "Web"
   },
   "note": [
      {
         "text": "Work note about this case",
         "@type": "work_notes"
      },
      {
         "text": "Comment about this case",
         "@type": "comments"
      }
   ],
   "relatedEntity": [
      {
         "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
         "@referredType": "asset"
      }
   ],
   "relatedParty": [
      {
         "id": "62826bf03710200044e0bfc8bcbe5df1",
         "@referredType": "customer_contact"
      }
   ]
}" \
--user 'username':'password'

Response body.

{
   "id": "6467508d47e345508761b955d36d43f6",
   "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/6467508d47e345508761b955d36d43f6",
   "creationDate": "2022-05-16 23:38:55",
   "lastUpdate": "2022-05-16 23:38:55",
   "description": "Laptop keeps shutting off unexpectedly",
   "severity": "2 - High",
   "ticketType": "Case",
   "name": "Laptop problem",
   "status": "New",
   "channel": {
      "name": "web"
   },
   "relatedParty": [
      {
         "id": "",
         "name": "",
         "@referredType": "customer"
      },
      {
         "id": "62826bf03710200044e0bfc8bcbe5df1",
         "name": "",
         "@referredType": "customer_contact"
      },
      {
         "id": "",
         "name": "",
         "@referredType": "assignment_group"
      },
      {
         "id": "",
         "name": "",
         "@referredType": "assigned_to"
      }
   ],
   "relatedEntity": [
      {
         "id": "",
         "href": "",
         "name": "",
         "role": "This is the product associated with the case.",
         "@type": "relatedEntity",
         "@referredType": "product"
      },
      {
         "id": "74a9ec0d3790200044e0bfc8bcbe5d7f",
         "href": "",
         "name": "P1000597 - Apple MacBook Pro 15\"",
         "role": "This is the asset associated with the case.",
         "@type": "relatedEntity",
         "@referredType": "asset"
      }
      {
         "id": "a1913c3577b301108e191e599a5a99e8",
         "href": "",
         "name": "Deduplication and Compression PI0000037",
         "role": "This is the product inventory associated with the case.",
         "@type": "relatedEntity",
         "@referredType": "product_inventory"
      }
   ],
   "note": [
      {
         "text": "Comment about this case",
         "date": "2022-05-16 16:38:55",
         "author": "admin",
         "@type": "comments"
      }
   ],
   "@type": "TroubleTicket"
}

Trouble Ticket - POST /sn_ind_tsm_sdwan/troubleticket/{ticketType}

Creates a record in the Case [sn_customerservice_case] or Incident [incident] table.

Important: Starting with the Tokyo release, this endpoint is deprecated. The new version of this endpoint is Trouble Ticket - POST /sn_ind_tsm_sdwan/ticket/troubleTicket .

URL format

Default URL: /api/sn_ind_tsm_sdwan/troubleticket/{ticketType}

Supported request parameters

Table 37. Path parameters
Name Description
ticketType The type of ticket. This value determines whether the record is created in the Case [sn_customerservice_case] or Incident [incident] table.
Valid values:
  • case
  • incident

Data type: String

Table 38. Query parameters
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 40. 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 41. Response headers
Header Description
None

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 42. Status codes
Status code Description
201 Successful. The request was successfully processed.
400 Bad Request. A bad request type or malformed request was detected for one or more of the following reasons.
  • Empty payload.
  • Invalid payload. Mandatory field missing.
  • Invalid ticketType or ticketType does not match path parameter ticketType. For example, ticketType is case but path parameter is incident.

Response body parameters (JSON or XML)

Example: cURL request

This example creates a case with high priority and open state.

ccurl "https://instance.servicenow.com/api/sn_ind_tsm_sdwan/troubleticket/case" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{
    \"description\":\"Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.\",
    \"name\":\"My router is not working properly\",
    \"severity\":\"2\",
    \"status\":\"10\",
    \"ticketType\":\"Case\",
    \"channel\":{
        \"id\":\"8774\",
        \"name\":\"eBonding\",
        \"@type\":\"Channel\"
    },
    \"note\":[
        {
            \"id\":\"77456\",
            \"author\":\"Jack Smith\",
            \"date\":\"2019-05-31T07:34:45.968Z\",
            \"text\":\"This is a testing work note<html>hello world</html> and <h1>title</h1>\",
            \"@type\":\"Worknotes\"
        },
        {
            \"id\":\"77457\",
            \"author\":\"Jack Smith\",
            \"date\":\"2019-05-31T07:35:45.968Z\",
            \"text\":\"This is a testing comment<script>gs.info('Hello World')</script>\",
            \"@type\":\"Comment\"
        }
    ],
    \"relatedParty\":[
        {
            \"id\":\"eaf68911c35420105252716b7d40ddde\",
            \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v1/individual/9866\",
            \"name\":\"Sally Thomas\",
            \"role\":\"customer\",
            \"@referredType\":\"customer_contact\"
        },
        {
            \"id\":\"ffc68911c35420105252716b7d40dd55\",
            \"href\":\"https://mycsp.com:8080/tmf-api/partyManagement/v4/customer/9176\",
            \"name\":\"Funco Intl\",
            \"role\":\"customer\",
            \"@referredType\":\"customer\"
        }
    ],
    \"relatedEntity\": [
        {
            \"id\": \"b7fa12c7532520103b6bddeeff7b123b\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"product\"
        },
        {
            \"id\": \"71e73d87c3e23010ff00ed23a140dde8\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"asset\"
        },
        {
            \"id\": \"a1913c3577b301108e191e599a5a99e8\",
            \"href\": \"www.google.com\",
            \"name\": \"Some random name\",
            \"role\": \"I dont know what this is\",
            \"@type\": \"relatedEntity\",
            \"@referredType\": \"product_inventory\"
        }
    ]
}" \
--user 'username':'password'

Response body.

{
  "id": "5bbb5cbc3c2ca910f8772f1bc332b34d",
  "href": "/api/sn_ind_tsm_sdwan/ticket/troubleTicket/5bbb5cbc3c2ca910f8772f1bc332b34d",
  "creationDate": "2023-01-19 18:33:24",
  "lastUpdate": "2023-01-19 18:33:24",
  "description": "Router is not working, my devices cannot detect any signals from the router. First button from the left is flashing red, all others are black. Resetting the router does not solve the problem, I need urgent assistance.",
  "severity": "2 - High",
  "ticketType": "Case",
  "name": "My router is not working properly",
  "status": "Open",
  "channel": {
    "name": "e_bonding"
  },
  "relatedParty": [
    {
      "id": "ffc68911c35420105252716b7d40dd55",
      "name": "Funco Intl",
      "@referredType": "customer"
    },
    {
      "id": "eaf68911c35420105252716b7d40ddde",
      "name": "Sally Thomas",
      "@referredType": "customer_contact"
    },
    {
      "id": "",
      "name": "",
      "@referredType": "assignment_group"
    },
    {
      "id": "",
      "name": "",
      "@referredType": "assigned_to"
    }
  ],
  "relatedEntity": [
    {
      "id": "b7fa12c7532520103b6bddeeff7b123b",
      "href": "",
      "name": "Deduplication and Compression PRD00001965",
      "role": "This is the product associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "product"
    },
    {
      "id": "71e73d87c3e23010ff00ed23a140dde8",
      "href": "",
      "name": "",
      "role": "This is the asset associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "asset"
    },
    {
      "id": "a1913c3577b301108e191e599a5a99e8",
      "href": "",
      "name": "Deduplication and Compression PI0000037",
      "role": "This is the product inventory associated with the case.",
      "@type": "relatedEntity",
      "@referredType": "product_inventory"
    }
  ],
  "note": [
    {
      "text": "This is a testing comment<script>gs.info('Hello World')</script>",
      "date": "2023-01-19 10:33:24",
      "author": "System Administrator",
      "@type": "comments"
    }
  ],
  "@type": "TroubleTicket"
}