Hướng dẫn AgentFlow

create_webhook_subscription

POST/webhook-subscriptions
AuthorizationBearer <token>

A service principal's credential, or a person's access token, AgentFlow's own or an installed app's. A service principal's effective permissions are its role permissions intersected with the credential's scopes.

In: header

Header Parameters

Idempotency-Key?string

A key of 1 to 255 printable ASCII characters. Repeating this request with the same key returns the original outcome instead of performing it again. A UUID is recommended.

Length1 <= length <= 255

Request Body

application/json

The receiver, the event types, and the identity the subscription acts as

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/webhook-subscriptions" \  -H "Content-Type: application/json" \  -d '{    "event_types": [      "string"    ],    "service_principal_id": "0d57b427-9ed2-4a5e-b0bd-32c8ce299b8e",    "url": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "event_types": [    "string"  ],  "expired_delivery_count": 0,  "failing_since": "2019-08-24T14:15:22Z",  "held_delivery_count": 0,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "include_child_runs": true,  "last_expired_at": "2019-08-24T14:15:22Z",  "last_success_at": "2019-08-24T14:15:22Z",  "principal_disabled_at": "2019-08-24T14:15:22Z",  "secret_rotated_at": "2019-08-24T14:15:22Z",  "service_principal_id": "0d57b427-9ed2-4a5e-b0bd-32c8ce299b8e",  "status": "active",  "updated_at": "2019-08-24T14:15:22Z",  "url": "string",  "secret": "string"}