ServiceNow インシデントを設定する
POST /api/auth/servicenow/tasks
正規オリジンのみです。POST には正確な Origin ヘッダーと application/json が必要です。ブラウザーセッションは HttpOnly、Secure、SameSite=Strict Cookie を使用します。設定セッションはテナント API にアクセスできません。テナントのプロビジョニングと全体監査にはプラットフォームオペレーターが必要で、メンバー管理にはテナント管理者が必要です。SSO は後日対応です。検証済みワークスペース管理者のブラウザーセッションと、現在の認可所有者がある設定済み接続が必要です。インシデント既定値の読み取り/保存、移行タスクのページ送り(一ページ 50 件)、サーバー由来タスクプレビューの準備、プレビュー再検証を行います。保存は接続リビジョンを進め、以前のプレビューを消去します。ソースフィールドは明示的許可リストに限定し、生証拠、非公開スキャナーフィールド、呼び出し元指定タスク内容は除外します。プレビューは五分後に期限切れとなり、実行者、タスク/証拠、マッピング、リビジョン、認証情報世代に結び付き、正確なペイロードハッシュとサーバー生成要求 ID を公開します。160 文字を超えるタイトルには、短いタスクタイトルまたは固定概要が必要です。参照 ID とインスタンス固有フィールドルールは未検証です。list-choices は英語の incident カテゴリ/サブカテゴリ選択を sys_choice から限定読み取りします(一ページ 100 件、sys_id カーソル)。任意の選択テーブル読み取りアクセスが必要で、接続認可と認証情報世代を再検査します。書き込みアクセスや業務ルールの有効性は確立しません。他の設定操作はプロバイダー要求を行いません。インシデントは作成しません。
認証
以下の OpenAPI の選択肢は、受け付ける認証方式を示します。ブラウザーからの変更には、正規の Origin ヘッダーも必要です。
[
{
"browserSession": []
}
]
パラメーター
[]
リクエスト本文
{
"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
}
]
}
}
}
}
レスポンス
{
"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"
}
}
}
}
}
#/components/schemas/Asset などの参照は、共有スキーマで解決されます。クライアント生成には OpenAPI コントラクトをダウンロードしてください。このページは生成されたもので、計画中のエンドポイントではなく、実装済みの開発 API を説明します。