POST · Consulter
Rédigé par Red Blue
Mis à jour le
POST /api/v1/integrations/read
operationId : integrations_read
Accès | Permission | Consentements OAuth |
|---|---|---|
Clé API d’organisation ou délégation OAuth pour l’API | integration.read | api:connect, integration:read |
KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.
Champs du corps JSON
Nom | Emplacement | Requis | Type et contraintes |
|---|---|---|---|
productId | JSON | Oui | string |
request | JSON | Oui | object |
Variantes de la requête
Sélecteur | Valeur | Autres champs requis dans request |
|---|---|---|
request.view | "connections" | Aucun autre champ imposé |
request.view | "connection" | connectionId |
request.view | "sync" | connectionId |
request.view | "subscriptions" | Aucun autre champ imposé |
request.view | "subscription" | subscriptionId |
request.view | "deliveries" | Aucun autre champ imposé |
request.view | "delivery" | deliveryId |
request.view | "attempts" | deliveryId |
Choisissez une variante et respectez son schéma complet : les contraintes des champs optionnels et les unions imbriquées restent applicables.
Exemple de requête
curl --request POST "$KHONY_ORIGIN/api/v1/integrations/read" \
--header "x-api-key: $KHONY_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": "product_01k3w8d7vhe008000000000001",
"request": {
"view": "connections",
"limit": 25
}
}'Réponse de succès · HTTP 200
{
"data": {
"view": "connections",
"items": [
{
"id": "integration_connection_01k3w8d7vhe008000000000002",
"provider": "mixpanel",
"status": "active",
"authStrategy": "api_key",
"healthy": true,
"configurationRevision": 0,
"lastSyncedAt": null,
"lastSuccessfulRequestAt": "2026-10-23T10:00:00.000Z",
"lastFailedRequestAt": null,
"lastWebhookAt": null,
"updatedAt": "2026-10-23T10:00:00.000Z",
"revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"nextCursor": null
}
}Schéma complet du corps JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"productId": {
"type": "string",
"pattern": "^product_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"request": {
"oneOf": [
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "connections"
},
"provider": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$"
},
"limit": {
"$ref": "#/$defs/__schema0"
},
"cursor": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"view"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "connection"
},
"connectionId": {
"$ref": "#/$defs/__schema2"
}
},
"required": [
"view",
"connectionId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "sync"
},
"connectionId": {
"$ref": "#/$defs/__schema2"
},
"limit": {
"$ref": "#/$defs/__schema0"
},
"cursor": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"view",
"connectionId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "subscriptions"
},
"limit": {
"$ref": "#/$defs/__schema0"
},
"cursor": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"view"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "subscription"
},
"subscriptionId": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"view",
"subscriptionId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "deliveries"
},
"subscriptionId": {
"$ref": "#/$defs/__schema3"
},
"limit": {
"$ref": "#/$defs/__schema0"
},
"cursor": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"view"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "delivery"
},
"deliveryId": {
"$ref": "#/$defs/__schema4"
}
},
"required": [
"view",
"deliveryId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "attempts"
},
"deliveryId": {
"$ref": "#/$defs/__schema4"
},
"limit": {
"$ref": "#/$defs/__schema0"
},
"cursor": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"view",
"deliveryId"
],
"additionalProperties": false
}
]
}
},
"required": [
"productId",
"request"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"default": 25,
"type": "integer",
"minimum": 1,
"maximum": 50
},
"__schema1": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"__schema2": {
"type": "string",
"pattern": "^integration_connection_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"__schema3": {
"type": "string",
"pattern": "^webhook_subscription_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"__schema4": {
"type": "string",
"pattern": "^webhook_delivery_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
}
}
}Schéma complet de la réponse
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"oneOf": [
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "connections"
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
"nextCursor": {
"anyOf": [
{
"$ref": "#/$defs/__schema4"
},
{
"type": "null"
}
]
}
},
"required": [
"view",
"items",
"nextCursor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "connection"
},
"item": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"view",
"item"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "sync"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resourceType": {
"type": "string"
},
"direction": {
"type": "string"
},
"status": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"lastStartedAt": {
"$ref": "#/$defs/__schema1"
},
"lastCompletedAt": {
"$ref": "#/$defs/__schema1"
},
"hasError": {
"type": "boolean"
},
"updatedAt": {
"$ref": "#/$defs/__schema2"
}
},
"required": [
"resourceType",
"direction",
"status",
"version",
"lastStartedAt",
"lastCompletedAt",
"hasError",
"updatedAt"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"$ref": "#/$defs/__schema4"
},
{
"type": "null"
}
]
}
},
"required": [
"view",
"items",
"nextCursor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "subscriptions"
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/__schema5"
}
},
"nextCursor": {
"anyOf": [
{
"$ref": "#/$defs/__schema4"
},
{
"type": "null"
}
]
}
},
"required": [
"view",
"items",
"nextCursor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "subscription"
},
"item": {
"$ref": "#/$defs/__schema5"
}
},
"required": [
"view",
"item"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "deliveries"
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/__schema7"
}
},
"nextCursor": {
"anyOf": [
{
"$ref": "#/$defs/__schema4"
},
{
"type": "null"
}
]
}
},
"required": [
"view",
"items",
"nextCursor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "delivery"
},
"item": {
"$ref": "#/$defs/__schema7"
}
},
"required": [
"view",
"item"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "attempts"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^webhook_attempt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"deliveryId": {
"$ref": "#/$defs/__schema8"
},
"attemptNumber": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outcome": {
"type": "string"
},
"httpStatus": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"durationMs": {
"type": [
"number",
"null"
]
},
"createdAt": {
"$ref": "#/$defs/__schema2"
}
},
"required": [
"id",
"deliveryId",
"attemptNumber",
"outcome",
"httpStatus",
"durationMs",
"createdAt"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"$ref": "#/$defs/__schema4"
},
{
"type": "null"
}
]
}
},
"required": [
"view",
"items",
"nextCursor"
],
"additionalProperties": false
}
]
}
},
"required": [
"data"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^integration_connection_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"provider": {
"type": "string"
},
"status": {
"type": "string"
},
"authStrategy": {
"type": "string"
},
"healthy": {
"type": [
"boolean",
"null"
]
},
"configurationRevision": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"lastSyncedAt": {
"$ref": "#/$defs/__schema1"
},
"lastSuccessfulRequestAt": {
"$ref": "#/$defs/__schema1"
},
"lastFailedRequestAt": {
"$ref": "#/$defs/__schema1"
},
"lastWebhookAt": {
"$ref": "#/$defs/__schema1"
},
"updatedAt": {
"$ref": "#/$defs/__schema2"
},
"revision": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"id",
"provider",
"status",
"authStrategy",
"healthy",
"configurationRevision",
"lastSyncedAt",
"lastSuccessfulRequestAt",
"lastFailedRequestAt",
"lastWebhookAt",
"updatedAt",
"revision"
],
"additionalProperties": false
},
"__schema1": {
"anyOf": [
{
"$ref": "#/$defs/__schema2"
},
{
"type": "null"
}
]
},
"__schema2": {
"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))$"
},
"__schema3": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"__schema4": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"__schema5": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/__schema6"
},
"name": {
"type": "string"
},
"endpointOrigin": {
"type": "string"
},
"eventPatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
},
"disabledAt": {
"$ref": "#/$defs/__schema1"
},
"createdAt": {
"$ref": "#/$defs/__schema2"
},
"updatedAt": {
"$ref": "#/$defs/__schema2"
},
"revision": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"id",
"name",
"endpointOrigin",
"eventPatterns",
"status",
"disabledAt",
"createdAt",
"updatedAt",
"revision"
],
"additionalProperties": false
},
"__schema6": {
"type": "string",
"pattern": "^webhook_subscription_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"__schema7": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/__schema8"
},
"subscriptionId": {
"$ref": "#/$defs/__schema6"
},
"eventType": {
"type": "string"
},
"status": {
"type": "string"
},
"attemptCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"nextAttemptAt": {
"$ref": "#/$defs/__schema2"
},
"deliveredAt": {
"$ref": "#/$defs/__schema1"
},
"createdAt": {
"$ref": "#/$defs/__schema2"
},
"updatedAt": {
"$ref": "#/$defs/__schema2"
},
"revision": {
"$ref": "#/$defs/__schema3"
}
},
"required": [
"id",
"subscriptionId",
"eventType",
"status",
"attemptCount",
"nextAttemptAt",
"deliveredAt",
"createdAt",
"updatedAt",
"revision"
],
"additionalProperties": false
},
"__schema8": {
"type": "string",
"pattern": "^webhook_delivery_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
}
}
}Refus et reprise
Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 409, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.
Notes du contrat
{
"description": "The selected product must belong to the authenticated organization. Uses shared API admission, billing meter and public API entitlement. Projections exclude credentials, raw configuration, provider cursors, event payloads and remote response bodies. Outbound webhook views/effects additionally require the webhooks entitlement. Accepts an organization key with integration.read or delegated OAuth with integration:read. request.view selects connections, connection, sync, subscriptions, subscription, deliveries, delivery or attempts. Lists are ordered by native UUID descending, with limit 1–50 (default 25). Keep filters/principal/product unchanged when using nextCursor. Foreign or absent parents return not_found. Endpoint origin is shown; URL paths/query and remote messages remain private."
}