UNPKG

@itentialopensource/adapter-servicenow

Version:

This adapter integrates with system described as: servicenowMadrid.

762 lines (757 loc) 547 kB
{ "openapi": "3.0.2", "info": { "title": "ServiceNow Madrid", "version": "1.0.0", "description": "Custom built swagger for ServiceNow Madrid. Built May 21, 2019" }, "paths": { "/now/table/{tableName}/{sys_id}": { "summary": "The Table API allows you to perform create, read, update, and delete (CRUD) operations on existing tables.", "description": "The Table API allows you to perform create, read, update, and delete (CRUD) operations on existing tables.", "get": { "tags": [ "Table" ], "parameters": [ { "name": "tableName", "description": "Name of the table from which to retrieve the records.", "schema": { "type": "string" }, "in": "path", "required": true }, { "name": "sys_id", "description": "Unique identifier of the record to retrieve.", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "content": { "application/json": { "examples": { "name-value-pairs": { "value": { "result": { "upon_approval": "", "location": { "link": "https://instance.service-now.com/api/now/table/cmn_location/105cf7f3c611227501e75e08b14a38ba", "value": "105cf7f3c611227501e75e08b14a38ba" }, "expected_start": "", "reopen_count": "", "close_notes": "", "additional_assignee_list": "", "impact": "1", "urgency": "3", "correlation_id": "", "sys_tags": "", "sys_domain": { "link": "https://instance.service-now.com/api/now/table/sys_user_group/global", "value": "global" }, "description": "", "group_list": "", "priority": "3", "delivery_plan": "", "sys_mod_count": "4", "work_notes_list": "", "business_service": "", "follow_up": "", "closed_at": "", "sla_due": "2015-11-11 22:04:15", "delivery_task": "", "sys_updated_on": "2015-11-01 22:37:27", "parent": "", "work_end": "", "number": "INC0000046", "closed_by": "", "work_start": "", "calendar_stc": "", "category": "software", "business_duration": "", "incident_state": "1", "activity_due": "", "correlation_display": "", "company": "", "active": "true", "due_date": "", "assignment_group": { "link": "https://instance.service-now.com/api/now/table/sys_user_group/8a4dde73c6112278017a6a4baf547aa7", "value": "8a4dde73c6112278017a6a4baf547aa7" }, "caller_id": { "link": "https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7", "value": "46c6f9efa9fe198101ddf5eed9adf6e7" }, "knowledge": "false", "made_sla": "false", "comments_and_work_notes": "", "parent_incident": "", "state": "1", "user_input": "", "sys_created_on": "2015-11-01 22:05:30", "approval_set": "", "reassignment_count": "1", "rfc": "", "child_incidents": "", "opened_at": "2015-11-02 22:04:15", "short_description": "Can't access SFA software", "order": "", "sys_updated_by": "glide.maint", "resolved_by": "", "notify": "1", "upon_reject": "", "approval_history": "", "problem_id": { "link": "https://instance.service-now.com/api/now/table/problem/a9e4890bc6112276003d7a5a5c774a74", "value": "a9e4890bc6112276003d7a5a5c774a74" }, "work_notes": "", "calendar_duration": "", "close_code": "", "sys_id": "a9e30c7dc61122760116894de7bcc7bd", "approval": "not requested", "caused_by": "", "severity": "3", "sys_created_by": "admin", "resolved_at": "", "assigned_to": "", "business_stc": "", "wf_activity": "", "sys_domain_path": "/", "cmdb_ci": { "link": "https://instance.service-now.com/api/now/table/cmdb_ci/a9c0c8d2c6112276018f7705562f9cb0", "value": "a9c0c8d2c6112276018f7705562f9cb0" }, "opened_by": { "link": "https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7", "value": "46c6f9efa9fe198101ddf5eed9adf6e7" }, "subcategory": "", "rejection_goto": "", "sys_class_name": "incident", "watch_list": "", "time_worked": "", "contact_type": "phone", "escalation": "0", "comments": "" } } } } } }, "description": "Request completed successfully. If a valid query returned no results, the response body contains only an empty result array." }, "404": { "content": { "application/json": { } }, "description": "Indicates the record is not found or the requesting user does not have access to the record." } }, "operationId": "queryTableByNameAndId", "summary": "Retrieves the record identified by the specified sys_id from the specified table.", "description": "Retrieves the record identified by the specified sys_id from the specified table." }, "put": { "requestBody": { "description": "name-value pairs for the field(s) to update in the associated table. For example, to update the short description file, enter a name-value pair similar to the following: --data \"{\\\"short_description\\\": \\\"my short desc\\\" }\" \\.\n", "content": { "application/json": { "examples": { "name-value pairs": { "value": { "assigned_to": "681b365ec0a80164000fb0b05854a0cd", "urgency": "1", "comments": "Elevating urgency, this is a blocking issue" } } } } }, "required": true }, "tags": [ "Table" ], "parameters": [ { "name": "tableName", "description": "Name of the table from which to retrieve the records.", "schema": { "type": "string" }, "in": "path", "required": true }, { "name": "sys_id", "description": "Unique identifier of the record to retrieve.", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "content": { "application/json": { "examples": { "name-value pairs": { "value": { "result": { "upon_approval": "proceed", "location": { "link": "https://instance.service-now.com/api/now/table/cmn_location/108752c8c611227501d4ab0e392ba97f", "value": "108752c8c611227501d4ab0e392ba97f" }, "expected_start": "", "reopen_count": "", "close_notes": "", "additional_assignee_list": "", "impact": "1", "urgency": "1", "correlation_id": "", "sys_tags": "", "sys_domain": { "link": "https://instance.service-now.com/api/now/table/sys_user_group/global", "value": "global" }, "description": "", "group_list": "", "priority": "1", "delivery_plan": "", "sys_mod_count": "7", "work_notes_list": "", "business_service": "", "follow_up": "", "closed_at": "", "sla_due": "2017-07-05 05:58:24", "delivery_task": "", "sys_updated_on": "2016-01-22 14:12:37", "parent": "", "work_end": "", "number": "INC0000050", "closed_by": "", "work_start": "", "calendar_stc": "", "category": "hardware", "business_duration": "", "incident_state": "2", "activity_due": "2016-01-22 16:12:37", "correlation_display": "", "company": { "link": "https://instance.service-now.com/api/now/table/core_company/31bea3d53790200044e0bfc8bcbe5dec", "value": "31bea3d53790200044e0bfc8bcbe5dec" }, "active": "true", "due_date": "", "assignment_group": { "link": "https://instance.service-now.com/api/now/table/sys_user_group/8a5055c9c61122780043563ef53438e3", "value": "8a5055c9c61122780043563ef53438e3" }, "caller_id": { "link": "https://instance.service-now.com/api/now/table/sys_user/5b7c200d0a640069006b3845b5d0fa7c", "value": "5b7c200d0a640069006b3845b5d0fa7c" }, "knowledge": "false", "made_sla": "true", "comments_and_work_notes": "", "parent_incident": "", "state": "2", "user_input": "", "sys_created_on": "2015-11-02 18:05:40", "approval_set": "", "reassignment_count": "0", "rfc": "", "child_incidents": "", "opened_at": "2015-11-02 21:58:24", "short_description": "Can't access Exchange server - is it down?", "order": "", "sys_updated_by": "admin", "resolved_by": "", "notify": "1", "upon_reject": "cancel", "approval_history": "", "problem_id": "", "work_notes": "", "calendar_duration": "", "close_code": "", "sys_id": "ef43c6d40a0a0b5700c77f9bf387afe3", "approval": "not requested", "caused_by": "", "severity": "3", "sys_created_by": "glide.maint", "resolved_at": "", "assigned_to": { "link": "https://instance.service-now.com/api/now/table/sys_user/681b365ec0a80164000fb0b05854a0cd", "value": "681b365ec0a80164000fb0b05854a0cd" }, "business_stc": "", "wf_activity": "", "sys_domain_path": "/", "cmdb_ci": { "link": "https://instance.service-now.com/api/now/table/cmdb_ci/281190e3c0a8000b003f593aa3f20ca6", "value": "281190e3c0a8000b003f593aa3f20ca6" }, "opened_by": { "link": "https://instance.service-now.com/api/now/table/sys_user/glide.maint", "value": "glide.maint" }, "subcategory": "", "rejection_goto": "", "sys_class_name": "incident", "watch_list": "", "time_worked": "", "contact_type": "phone", "escalation": "3", "comments": "" } } } } } }, "description": "Indicates the request completed successfully.\n" } }, "operationId": "updateTableRecord", "summary": "Updates the specified record with the request body.", "description": "Updates the specified record with the request body.\n\n" }, "delete": { "tags": [ "Table" ], "parameters": [ { "name": "tableName", "description": "Name of the table from which to retrieve the records.", "schema": { "type": "string" }, "in": "path", "required": true }, { "name": "sys_id", "description": "Unique identifier of the record to retrieve.", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "204": { "description": "Indicates the request completed successfully." } }, "operationId": "deleteTableRecord", "summary": "Deletes the specified record from the specified table.", "description": "Deletes the specified record from the specified table.\n\n" }, "parameters": [ { "name": "tableName", "description": "Name of the table from which to retrieve the records.", "schema": { "type": "string" }, "in": "path", "required": true }, { "name": "sys_id", "description": "Unique identifier of the record to retrieve.", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/now/awa/agents/{sys_id}": { "summary": "Use the Agent Presence API to get or set agent presence and channel availability.", "description": "Use the Agent Presence API to get or set agent presence and channel availability.\n\nThe Agent Presence API is provided within the sn_awa namespace.\n\nRequires the Advanced Work Assignment plugin (com.glide.awa) and awa_integration_user role.", "put": { "requestBody": { "content": { "application/json": { } }, "required": true }, "tags": [ "Agent Presence" ], "parameters": [ { "name": "sys_id", "description": "The sys_id of the user listed in sys_user table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "content": { "application/json": { } }, "description": "Request completed successfully.\n" }, "400": { "content": { "application/json": { } }, "description": "Bad Request. A bad request type or malformed request was detected.\n" }, "404": { "content": { "application/json": { } }, "description": "Not Found. The specified record could not be found.\n" } }, "operationId": "setAgentPresence", "summary": "Sets the state of a provided agent’s presence and sets the agent’s channel availability for that state (if provided).", "description": "Sets the state of a provided agent’s presence and sets the agent’s channel availability for that state (if provided).\n\n" }, "parameters": [ { "name": "sys_id", "description": "The sys_id of the user listed in sys_user table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/sn_chg_rest/change/standard/{standard_change_template_id}": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "post": { "tags": [ "Change Management" ], "parameters": [ { "name": "standard_change_template_id", "description": "Unique identifier of the standard change template on which to base the new standard change request (from [std_change_record_producer] table).\n", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "description": "Request completed successfully.\n" }, "400": { "description": "Bad Request. A bad request type or malformed request was detected.\n" }, "404": { "description": "Not Found. The specified record could not be found.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "changeStandardTemplateById", "summary": "Creates one standard change request based on an existing standard change template.", "description": "Creates one standard change request based on an existing standard change template as specified by the passed-in template sys_id. Multiple standard change request creations within a single call is not supported.\n\n" }, "parameters": [ { "name": "standard_change_template_id", "description": "Unique identifier of the standard change template on which to base the new standard change request (from [std_change_record_producer] table).\n", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/sn_chg_rest/change/standard": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "get": { "tags": [ "Change Management" ], "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set. e.g. change=CHG123456", "schema": { "type": "object" }, "in": "query" } ], "responses": { "200": { "description": "Request completed successfully.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "getStandardChangeRequest", "summary": "Retrieves one or more standard change requests based on the specified criteria.", "description": "Retrieves one or more standard change requests based on the specified criteria.\n\n" }, "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set. e.g. change=CHG123456", "schema": { "type": "object" }, "in": "query" } ] }, "/sn_chg_rest/change/standard/{sys_id}": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "get": { "tags": [ "Change Management" ], "parameters": [ { "name": "sys_id", "description": "Unique identifier of the standard change request to retrieve from the [change_request] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "content": { "application/json": { "examples": { "response": { "value": "{\n result: [\n {\n sys_id: {\n value: \"1c87925347c12200e0ef563dbb9a7177\",\n display_value: \"1c87925347c12200e0ef563dbb9a7177\"\n },\n state: {\n value: \"-5\", \n display_value: \"New\"\n },\n ..., // all valid fields in record, example below\n short_description: {\n value: \"Add network switch to cabinet\",\n display_value: \"Add network switch to cabinet\"\n },\n }, \n ]\n}" } } } }, "description": "Request completed successfully.\n" }, "400": { "description": "Bad Request. A bad request type or malformed request was detected.\n" }, "404": { "description": "Not Found. The specified record could not be found.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "getStandardChangeRequestById", "summary": "Retrieves the standard change request identified by the specified sys_id.", "description": "Retrieves the standard change request identified by the specified sys_id." }, "delete": { "tags": [ "Change Management" ], "parameters": [ { "name": "sys_id", "description": "Unique identifier of the standard change request to retrieve from the [change_request] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "description": "Request completed successfully.\n" }, "404": { "description": "Not Found. The specified record could not be found.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "deleteStandardChangeRequestById", "summary": "Deletes the standard change request identified by the specified sys_id.", "description": "Deletes the standard change request identified by the specified sys_id.\n\n" }, "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set. e.g. change=CHG123456", "schema": { "type": "object" }, "in": "query" }, { "name": "sys_id", "description": "Unique identifier of the standard change request to retrieve from the [change_request] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/sn_chg_rest/change/standard/{sys_id}/risk": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "parameters": [ { "name": "sys_id", "description": "Unique identifier of the standard change request to retrieve from the [change_request] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/sn_chg_rest/change/standard/template": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "get": { "tags": [ "Change Management" ], "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set.\n", "schema": { "type": "object" }, "in": "query" } ], "responses": { "200": { "description": "Request completed successfully.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "getStandardChangeTemplate", "summary": "Retrieves one or more standard change templates based on the specified criteria.", "description": "Retrieves one or more standard change templates based on the specified criteria.\n\n" }, "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set. e.g. change=CHG123456", "schema": { "type": "object" }, "in": "query" } ] }, "/sn_chg_rest/change/standard/template/{sys_id}": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Management process, all change requests, regardless of where they are initiated, have a single source of truth, providing a single audit source.\n\nThese REST APIs enable integrators to:\n\n- Initiate a standard change request from a published standard change request template.\n\n- Create a change request of type emergency or normal.\n\n- Update any field that exists in the change request table for any change request type.\n\n- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.\n\n- Retrieve a specific change request, standard template, or change request task.\n\n- Retrieve multiple change requests, standard templates, or change request tasks using pagination.\n\n- Generate and process any related approval activity associated with a change request.\n\n- Identify potential scheduling conflicts and identify periods where conflicts do not exist.\n\n- Delete change requests, change request tasks, and conflict checking processes.\n\nUse these REST APIs to integrate your change management process with external applications and when developing ServiceNow client-side applications. Also use these REST APIs as a reference model and guide to the scriptable APIs.\n\nIn addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.\n\n", "get": { "tags": [ "Change Management" ], "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set.\n", "schema": { "type": "object" }, "in": "query" }, { "name": "sys_id", "description": "Unique identifier of the standard change template to retrieve from the [std_change_record_producer] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ], "responses": { "200": { "description": "Request completed successfully.\n" }, "400": { "description": "Bad Request. A bad request type or malformed request was detected.\n" }, "404": { "description": "Not Found. The specified record could not be found.\n" }, "500": { "description": "Internal Server Error. A logic error on the server-side code occurred.\n" } }, "operationId": "getStandardChangeTemplateById", "summary": "Retrieves the standard change template identified by the specified sys_id.", "description": "Retrieves the standard change template identified by the specified sys_id.\n\n" }, "parameters": [ { "name": "sysparm_query", "description": "Encoded query used to filter the result set. e.g. change=CHG123456", "schema": { "type": "object" }, "in": "query" }, { "name": "sys_id", "description": "Unique identifier of the standard change template to retrieve from the [std_change_record_producer] table.\n", "schema": { "type": "string" }, "in": "path", "required": true } ] }, "/sn_chg_rest/change/normal": { "summary": "The Change Management API provides REST APIs that enable third-party application integration with the ServiceNow Change Management process.", "description": "By integrating your application with the ServiceNow Change Manage