Skip to main content

configure Service Now Incidents

POST /api/auth/servicenow/tasks

Canonical origin only. POST requires an exact Origin header and application/json. Browser sessions use an HttpOnly, Secure, SameSite=Strict cookie. Setup sessions cannot access tenant APIs. Tenant provisioning and global audit require a platform operator; member administration requires a tenant administrator. SSO is deferred. Verified workspace administrator browser session and a configured connection with current authorization owner are required. Read/save incident defaults, page migration tasks (50 per page), prepare a server-derived task preview, or revalidate a preview. Saving advances the connection revision and clears prior previews. Source fields are explicitly allowlisted; raw evidence, private scanner fields and caller-supplied task content are excluded. Previews expire after five minutes, bind the actor, task/evidence, mapping, revision and credential generation, and expose an exact payload hash and server-generated request ID. A title longer than 160 characters requires a shorter task title or fixed summary. Reference IDs and instance-specific field rules remain unvalidated. The list-choices operation performs a bounded read of English incident category/subcategory choices from sys_choice (100 per page, sys_id cursor). It requires optional choice-table read access, rechecks connection authorization and credential generation, and does not establish write access or business-rule validity. Other configuration operations make no provider request. No incident creation occurs.

Authentication​

The following OpenAPI alternatives describe accepted authentication. Browser mutations also require the canonical Origin header.

[
{
"browserSession": []
}
]

Parameters​

[]

Request body​

{
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "list-choices"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"after": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
},
"required": [
"operation",
"connectionId",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "list-tasks"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"after": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"operation",
"connectionId",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "read-mapping"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"operation",
"connectionId",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "save-mapping"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"mapping": {
"type": "object",
"properties": {
"shortDescription": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "task-title"
}
},
"required": [
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "constant"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"source",
"value"
],
"additionalProperties": false
}
]
},
"includeTaskDetails": {
"type": "boolean"
},
"defaults": {
"type": "object",
"properties": {
"urgency": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"impact": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"assignment_group": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"assigned_to": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"cmdb_ci": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"subcategory": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^(?:u_|x_)[a-z][a-z0-9_]{0,77}$"
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 1024
},
{
"type": "boolean"
},
{
"type": "number"
}
]
}
}
},
"additionalProperties": false
}
},
"required": [
"shortDescription",
"includeTaskDetails",
"defaults"
],
"additionalProperties": false
}
},
"required": [
"operation",
"connectionId",
"expectedRevision",
"mapping"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "prepare-task"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedPlanVersion": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"operation",
"connectionId",
"expectedRevision",
"planId",
"expectedPlanVersion"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "read-preview"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"previewId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"operation",
"connectionId",
"expectedRevision",
"previewId"
],
"additionalProperties": false
}
]
}
}
}
}

Responses​

{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
},
"field": {
"type": "string",
"enum": [
"category",
"subcategory"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"dependentValue": {
"type": "string",
"maxLength": 80
}
},
"required": [
"id",
"field",
"value",
"label",
"dependentValue"
],
"additionalProperties": false
}
},
"nextAfter": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{32}$"
},
{
"type": "null"
}
]
},
"language": {
"type": "string",
"const": "en"
},
"table": {
"type": "string",
"const": "incident"
}
},
"required": [
"items",
"nextAfter",
"language",
"table"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"configured": {
"type": "boolean"
},
"mapping": {
"type": "object",
"properties": {
"shortDescription": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "task-title"
}
},
"required": [
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "constant"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"source",
"value"
],
"additionalProperties": false
}
]
},
"includeTaskDetails": {
"type": "boolean"
},
"defaults": {
"type": "object",
"properties": {
"urgency": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"impact": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"assignment_group": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"assigned_to": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"cmdb_ci": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"subcategory": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^(?:u_|x_)[a-z][a-z0-9_]{0,77}$"
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 1024
},
{
"type": "boolean"
},
{
"type": "number"
}
]
}
}
},
"additionalProperties": false
}
},
"required": [
"shortDescription",
"includeTaskDetails",
"defaults"
],
"additionalProperties": false
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"configured",
"mapping",
"revision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"title": {
"type": "string",
"maxLength": 200
}
},
"required": [
"id",
"version",
"title"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"nextCursor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"previewId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersion": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"requestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"fields": {
"type": "object",
"properties": {
"short_description": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"description": {
"type": "string",
"maxLength": 20000
},
"urgency": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"impact": {
"type": "string",
"enum": [
"1",
"2",
"3"
]
},
"assignment_group": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"assigned_to": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"cmdb_ci": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"category": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"subcategory": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"customFields": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^(?:u_|x_)[a-z][a-z0-9_]{0,77}$"
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 1024
},
{
"type": "boolean"
},
{
"type": "number"
}
]
}
}
},
"required": [
"short_description"
],
"additionalProperties": false
},
"payloadHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"unverifiedReferences": {
"type": "array",
"items": {
"type": "string",
"enum": [
"assignment_group",
"assigned_to",
"cmdb_ci"
]
}
},
"providerValidation": {
"type": "string",
"const": "not-performed"
},
"incidentCreated": {
"type": "boolean",
"const": false
}
},
"required": [
"previewId",
"planId",
"planVersion",
"requestId",
"fields",
"payloadHash",
"createdAt",
"expiresAt",
"unverifiedReferences",
"providerValidation",
"incidentCreated"
],
"additionalProperties": false
}
]
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}

References such as #/components/schemas/Asset resolve in shared schemas. Download the OpenAPI contract for client generation. This page is generated; it describes the implemented development API, not planned endpoints.