ServiceNow Postman API - shubham-sayon/Shubham-Sayon-s-Technical-Documentations GitHub Wiki

The ServiceNow Postman API allows you to send POST requests to create an INCIDENT record in ServiceNow.

ServiceNow, Integration, Incident Creation, REST API


Quick Overview of How to Access the API

To access the ServiceNow Postman API from Postman follow these steps:

  1. Use the endpoint: https://dev194827.service-now.com/api/now/import/u_postman_inbound_integration to send a POST request
  2. Authenticate with valid ServiceNow credentials or tokens with sufficient permissions to create incidents.
  3. Set the required parameters and headers.
  4. Send the incident creation request in the form of a JSON object.

Authentication Details

  • The API uses Basic Authentication.
  • You need to include your username and password which will be automatically included in the request header:

image


API Operations and Paths

Supported Operation

  • POST: Allows POSTMAN to send requests to create an incident in ServiceNow.

Endpoint URL

https://dev194827.service-now.com/api/now/import/u_postman_inbound_integration

Headers

Header Name Value
Content-Type application/json
Accept application/json

These operations support incident creation in ServiceNow by sending a POST request with the required headers.


API Request Parameters

This API processes inbound requests from POSTMAN and creates new incident records in ServiceNow. It requires a JSON payload with specific parameters to define the incident details such as the requester, email, description, and state.

Parameter Name Description Type Required Additional Details
u_requested_for The name of the requester. String true Must be a valid ServiceNow user.
u_email_id The email ID of the requester. String true Must be in a valid email format.
u_short_description Brief description of the issue. String true Should not exceed 100 characters.
u_incident_state The state of the incident (e.g., 1 for New). String true Must be a valid incident state value.

Example Request Body

{
    "u_requested_for": "Fred Luddy",
    "u_email_id": "[email protected]",
    "u_short_description": "Please fix the server issue ASAP!",
    "u_incident_state": "1"
}

API Responses

Successful Response (201: Created)

A successful response will return a JSON object with the following details:

Example Response Body:

{
  "import_set": "ISET0010003",
  "staging_table": "u_postman_inbound_integration",
  "result": [
    {
      "transform_map": "Postman Inbound Integration",
      "table": "incident",
      "display_name": "number",
      "display_value": "INC0010045",
      "record_link": "https://dev194827.service-now.com/api/now/table/incident/39565d5c83221a106c6ccc65eeaad337",
      "status": "inserted",
      "sys_id": "39565d5c83221a106c6ccc65eeaad337"
    }
  ]
}

Response Parameters:

Parameter Name Description
import_set The import set ID.
staging_table The staging table used for processing the request.
result Details of the created incident record.
transform_map The transform map used to populate the fields.
table The table where the record was inserted. In this case it's the Incident table.
display_name Display field name for the record.
display_value Display field value for the record, i.e., the incident number
record_link Direct link to the created incident record.
status Status of the operation (e.g., inserted).
sys_id Unique identifier for the created record.

Error Responses

HTTP Code Error Message Description
400 Bad Request Missing or invalid parameters.
401 Unauthorized Authentication failed.
403 Forbidden Insufficient permissions to perform the action.
500 Internal Server Error An unexpected error occurred on the server.

Example Error Response (400: Bad Request):

{
    "error": {
        "message": "Exception while reading request",
        "detail": "The payload is not valid JSON."
    },
    "status": "failure"
}

Sample Contacts and External Documentation Links

  1. Support Contact: Email: [email protected] | Phone: +91-8902007753
  2. ServiceNow Developer Documentation: https://developer.servicenow.com
  3. Postman Documentation: https://learning.postman.com