Contrato histórico: POST create-webhook
Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.
Significado histórico
Crear webhook
Este endpoint de la API se utiliza para agregar un webhook.
API vigente
Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.
Ver la referencia de la API vigenteParámetros
[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]
Cuerpo de solicitud
{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hook",
"url"
],
"properties": {
"hook": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
}
}
}
Respuestas
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"url\": \"https://example.com/radar/9e7eauii4apb/42d9388f-7d65-4723-936a-adf085e1de2e/history/340b6176-beed-46dc-b6cf-6f8d8fc837b7\",\n \"hook\": \"RUNSCOPE\",\n \"id\": 1\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"url": {
"type": "string",
"example": "https://example.com/radar/9e7eauii4apb/42d9388f-7d65-4723-936a-adf085e1de2e/history/340b6176-beed-46dc-b6cf-6f8d8fc837b7"
},
"hook": {
"type": "string",
"example": "RUNSCOPE"
},
"id": {
"type": "integer",
"example": 1,
"default": 0
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The Hook field is required.\",\n \"The Url field is required.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The Hook field is required."
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}