SNOW Incident Creation API - shubham-sayon/Shubham-Sayon-s-Technical-Documentations GitHub Wiki
ServiceNow
, Integration
, Incident Creation
, REST API
Usage Info
Sends a request to create an INCIDENT record in ServiceNow.
Quick Overview
To access the ServiceNow Incident Creation API from Postman follow these steps:
- Use the endpoint: https://dev194827.service-now.com/api/now/import/u_postman_inbound_integration
- Authenticate with valid ServiceNow credentials or tokens with sufficient permissions to create incidents.
- Set the required parameters and headers.
- Send the incident creation request in the form of a JSON object.
Authentication Details
Authenticate with valid ServiceNow credentials or tokens with sufficient permissions to create incidents. Ensure the username and password provided are for an account with the necessary access rights. The credentials must be passed as a Basic Auth header in the request.
Arguments
Header
Header Name | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
API Request Parameters
The API processes requests 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"
}
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
Example Response
Successful Response (201: Created)
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. |
Errors
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. |
Test API
Code Samples
Sample Contacts and External Documentation Links
- Support Contact: Email:
[email protected]
| Phone:+91-8902007753
- ServiceNow Developer Documentation: https://developer.servicenow.com
- Postman Documentation: https://learning.postman.com