Download OpenAPI specification:
What the webhooks package adds to the published contract when it is installed (see WebVision\Adsum\Core\Shared\Api\Contract\OpenApiDocument): the webhook subscriptions of a company, the events they can listen to and the log of the deliveries. Linted on its own.
The events of the installed packages, each with the fields of its data and their data category. Every field is of the category directory; an event with any other field cannot be registered.
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "items": [
- {
- "code": "employee.hired",
- "description": "string",
- "fields": [
- {
- "name": "string",
- "category": "directory"
}
]
}
]
}| page | integer >= 1 Default: 1 |
| perPage | integer [ 1 .. 200 ] Default: 50 |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "items": [
- {
- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active",
- "secretSet": true,
- "secret": "string",
- "failingSince": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "meta": {
- "page": 1,
- "perPage": 1,
- "totalItems": 0,
- "facets": {
- "property1": {
- "property1": 1,
- "property2": 1
}, - "property2": {
- "property1": 1,
- "property2": 1
}
}, - "groupBy": "string",
- "groups": [
- {
- "key": "string",
- "label": "string",
- "count": 1
}
]
}
}Every event of the company the subscription listens to is sent to the address as a POST with a JSON document (id, event, occurredAt, companyId, data), signed with Adsum-Signature. The signing secret is in the answer once. HR without the admin role and employees receive 403.
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
| name required | string <= 200 characters |
| url required | string <= 2048 characters An https address (http where the installation allows it) that does not lead to the server itself, a private network or a metadata service; otherwise 422 on |
| events required | Array of strings non-empty |
| status | string Enum: "active" "disabled" Only when updating. |
{- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active"
}{- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active",
- "secretSet": true,
- "secret": "string",
- "failingSince": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}The secret is never returned; secretSet says it exists.
| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active",
- "secretSet": true,
- "secret": "string",
- "failingSince": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}Needs If-Match. status: active resumes a suspended or paused subscription; the failures so far count no more.
| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
| If-Match required | string ETag of the representation being modified (optimistic locking). A stale value yields 412. |
| name required | string <= 200 characters |
| url required | string <= 2048 characters An https address (http where the installation allows it) that does not lead to the server itself, a private network or a metadata service; otherwise 422 on |
| events required | Array of strings non-empty |
| status | string Enum: "active" "disabled" Only when updating. |
{- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active"
}{- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active",
- "secretSet": true,
- "secret": "string",
- "failingSince": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "type": "../dictionary",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "../dictionary",
- "code": 0,
- "correlationId": "string",
- "violations": [
- {
- "propertyPath": "startDate",
- "message": "string",
- "code": "string",
- "existingEmployeeId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "employeeId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "status": "pending",
- "suggestion": "string",
- "pair": "string",
- "scheme": "light",
- "ratio": "string",
- "required": "string",
- "proposal": "string",
- "requiredBy": "string",
- "line": 0,
- "column": 0,
- "placeholder": "string",
- "slot": "string",
- "language": "string",
- "maxBytes": 0,
- "formats": "string"
}
], - "dependents": [
- {
- "type": "string",
- "count": 1,
- "effect": "kept"
}
]
}The new secret is in the answer once. The previous secret signs beside it for 24 hours (a second v1 value in Adsum-Signature), so the receiver can switch over.
| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "name": "string",
- "url": "string",
- "events": [
- "string"
], - "status": "active",
- "secretSet": true,
- "secret": "string",
- "failingSince": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}Sent synchronously and not kept as a delivery; the answer reports the status code and the duration.
| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "succeeded": true,
- "statusCode": 0,
- "durationMs": 0,
- "error": "string"
}Each delivery with its event, status, attempts, the status code and duration of the last attempt, the first 2048 bytes of the answer and the document that was sent. Employees and HR without the admin role receive 403.
| status | string Enum: "queued" "succeeded" "failed" |
| subscriptionId | string <uuid> (Uuid) Examples: subscriptionId=0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| page | integer >= 1 Default: 1 |
| perPage | integer [ 1 .. 200 ] Default: 50 |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "items": [
- {
- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "subscriptionId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "event": "string",
- "status": "queued",
- "attempts": 0,
- "responseCode": 0,
- "durationMs": 0,
- "responseExcerpt": "string",
- "error": "string",
- "nextAttemptAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "payload": { }
}
], - "meta": {
- "page": 1,
- "perPage": 1,
- "totalItems": 0,
- "facets": {
- "property1": {
- "property1": 1,
- "property2": 1
}, - "property2": {
- "property1": 1,
- "property2": 1
}
}, - "groupBy": "string",
- "groups": [
- {
- "key": "string",
- "label": "string",
- "count": 1
}
]
}
}Queued again under the same Adsum-Delivery ID with a fresh set of attempts.
| id required | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b |
| Company-Id | string <uuid> (Uuid) Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403. |
{- "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "subscriptionId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
- "event": "string",
- "status": "queued",
- "attempts": 0,
- "responseCode": 0,
- "durationMs": 0,
- "responseExcerpt": "string",
- "error": "string",
- "nextAttemptAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "payload": { }
}