Integrations (Import Set API & Table API)
Integrations (Import Set API & Table API)
Table of Contents:
• Import sets API.
• Table API.
• ServiceNow to Jira.
• Jira to ServiceNow.
• Jira Spoke.
• Google form integration.
*Pre-Requisites:
1. API / Endpoint
2. Credentials
3. Payload
=> After opening the Edit web services, navigate to related links > click on Explore
REST API.
=> Explore REST API and create a Request Body.
=> Now REST API Explorer page will be opened with API name as Import set API and
POST method.
=> Now click on send. HTTP Method, Status Code, and Response body will be
generated.
Response Body:
{ "import_set": "ISET0010004",
"staging_table": "u_imp_set_api",
"result": [
{
"transform_map": "Imp_set_API",
"table": "incident",
"display_name": "number",
"display_value": "INC0010077",
"record_link":
"https://dev208055.service-now.com/api/now/table/incident/81391ddf93320210bf463
1697bba1018",
"status": "inserted",
"sys_id": "81391ddf93320210bf4631697bba1018"
}
]
}
=> Create REST Message with endpoint URL and HTTP methods.
=> Click on NEW to create a new REST Message, Fill the all-Mandatory fields.
=> Name: (Message name)
=> Endpoint: (instance URL, ex: https://dev264155.service-now.com/)
=> In the Authentication section > Authentication type > Basic.
=> Now we need to create a Basic auth profile, click new > fill the username and
Password, and select it.
=> In HTTP Request section > HTTP Headers need to-be filled, and submitted.
Content-Type : application/json
Accept : application/json
=> And Default GET Method will be created, we need to create new POST Method so
select POST in HTTP Method field and ENDPOINT field will need to be filled with
API/HTTP Method URL (From Receiver > HTTP Method / URI
=> Now click on SAVE, and in Related links check the TEST and it will return HTTP
status as 201 and New record will be created in Receiver instance.
=> Now in the content we need to pass the values dynamically, we will add variables in
value places by using “${}”.
{"u_caller_id":"${caller}","u_active":"${active}","u_assigned_to":"${assignTo}"}
=> After clicking Auto-generate variables in Related links, we can see the variables in the
Variable Substitutions section.
=> Now copy the script in the Preview Script Usage and create a Business Rule.
=> Select the required fields and paste the script in the advanced section.
=> Enter the variable values in the script.
Ex: r.setStringParameterNoEscape('caller',current.caller_id);
Table API
The Table API provides endpoints that allow you to perform create, read,
update, and delete (CRUD) operations on existing tables.
} catch (ex) {
var message = ex.message;
}
}
})(current, previous);
Insert/Update/Delete Records:
=> Perform insert/update/delete operations on the source instance's table.
=> Check logs and target instances to ensure data is synchronized correctly.