Aller au contenu principal

Créer un webhook signé désactivé ou une destination Splunk

POST /api/v1/webhooks

Maximum 10 destinations non révoquées partagées entre types. Les appelants Splunk doivent conserver un requestId UUID et réutiliser le corps identique après perte de réponse de création ; changer l'entrée ou le principal renvoie 409 et un original révoqué ne peut être recréé avec cet ID. Webhook signé : HTTPS public port 443 ; renvoie le secret de signature une fois. Splunk : kind=splunk et jeton HEC ; point d'événement HTTPS public sur port 443 ou 8088, éventuellement une origine normalisée en /services/collector/event. Le jeton est chiffré et jamais renvoyé. Hôte/index/sourcetype/mode d'accusé sont immuables. Aucun identifiant dans l'URL, chaîne de requête, fragment ou IP littérale. Envoyez un test et examinez son assurance avant activation.

Rôles autorisés : admin.

Authentification​

Les alternatives OpenAPI suivantes décrivent les méthodes d'authentification acceptées. Les modifications depuis le navigateur nécessitent également l'en-tête Origin canonique.

[
{
"organizationCredential": []
},
{
"browserSession": []
}
]

Paramètres​

[]

Corps de la requête​

{
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"enum": [
"audit.recorded",
"security.recorded",
"job.completed",
"job.partial",
"job.failed",
"job.cancelled",
"plan.verified",
"evidence.archived",
"repository-scan.completed",
"repository-scan.failed",
"repository-scan.cancelled",
"cloud-operation.completed",
"cloud-operation.failed",
"cloud-operation.cancelled",
"capture.completed",
"capture.failed",
"capture.cancelled",
"network-scan.completed",
"network-scan.partial",
"network-scan.failed",
"network-scan.cancelled",
"scm-scan.completed",
"scm-scan.failed",
"scm-scan.cancelled"
]
},
"minItems": 1,
"maxItems": 24
}
},
"required": [
"name",
"url",
"events"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"enum": [
"audit.recorded",
"security.recorded",
"job.completed",
"job.partial",
"job.failed",
"job.cancelled",
"plan.verified",
"evidence.archived",
"repository-scan.completed",
"repository-scan.failed",
"repository-scan.cancelled",
"cloud-operation.completed",
"cloud-operation.failed",
"cloud-operation.cancelled",
"capture.completed",
"capture.failed",
"capture.cancelled",
"network-scan.completed",
"network-scan.partial",
"network-scan.failed",
"network-scan.cancelled",
"scm-scan.completed",
"scm-scan.failed",
"scm-scan.cancelled"
]
},
"minItems": 1,
"maxItems": 24
},
"kind": {
"const": "splunk"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"token": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"writeOnly": true,
"description": "HEC token. Stored encrypted; never returned."
},
"index": {
"type": "string",
"maxLength": 80,
"pattern": "^[A-Za-z0-9_-]*$",
"default": "",
"description": "Empty uses the HEC token default index."
},
"sourcetype": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[A-Za-z0-9_.:-]+$",
"default": "sectigo:quantum:ready"
},
"acknowledgements": {
"type": "boolean",
"default": false,
"description": "Enable only when the HEC token and deployment support indexer acknowledgement. Collector acceptance alone will not complete delivery in this mode."
}
},
"required": [
"kind",
"name",
"url",
"token",
"events"
],
"additionalProperties": false
}
]
}
}
}
}

Réponses​

{
"201": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/Webhook"
},
{
"type": "object",
"properties": {
"secret": {
"type": "string"
}
},
"required": [
"secret"
]
}
]
},
{
"allOf": [
{
"$ref": "#/components/schemas/Webhook"
},
{
"type": "object",
"properties": {
"kind": {
"const": "splunk"
},
"splunk": {
"$ref": "#/components/schemas/SplunkConfiguration"
}
},
"required": [
"kind",
"splunk"
]
}
]
}
]
}
}
}
},
"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"
}
}
}
}
}

Les références telles que #/components/schemas/Asset sont résolues dans les schémas partagés. Téléchargez le contrat OpenAPI pour générer des clients. Cette page est générée ; elle décrit l'API de développement implémentée, et non des points de terminaison prévus.