Aller au contenu

Environnement de développement : contenu en cours de rédaction, rien ne pointe vers la production.

Sommaire de la documentation

api-keys

Version 0.1.03 opérations

List the API keys of the organisation (prefixes and labels only)

GET/organisations/{id}/api-keysSession du tableau de bord

Paramètres

  • idstringpathobligatoire

Réponses

  • 200

    • idstring (uuid)obligatoire
    • prefixstringobligatoire
    • labelstring | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • lastUsedAtstring (date-time) | nullobligatoire
    • revokedAtstring (date-time) | nullobligatoire
    • createdBystring (uuid) | nullobligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/api-keys" \
  -H "Cookie: konnect_session=$KONNECT_SESSION"

Exemple : 200

[
  {
    "id": "id",
    "prefix": "prefix",
    "label": "label",
    "createdAt": "2026-10-01T09:30:00.000Z",
    "lastUsedAt": "2026-10-01T09:30:00.000Z",
    "revokedAt": "2026-10-01T09:30:00.000Z",
    "createdBy": "createdBy"
  }
]

Create an API key; the full key is returned once

POST/organisations/{id}/api-keysSession du tableau de bord

Paramètres

  • idstringpathobligatoire

Corps de la requête application/json

  • labelstring

Réponses

  • 201

    • idstring (uuid)obligatoire
    • prefixstringobligatoire
    • labelstring | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • lastUsedAtstring (date-time) | nullobligatoire
    • revokedAtstring (date-time) | nullobligatoire
    • createdBystring (uuid) | nullobligatoire
    • keystringobligatoire

      Full key <prefix>:<secret>, shown once

Exemples de code

curl -X POST "$KONNECT_API_URL/organisations/id/api-keys" \
  -H "Cookie: konnect_session=$KONNECT_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "WooCommerce shop"
}'

Exemple : corps de la requête

{
  "label": "WooCommerce shop"
}

Exemple : 201

{
  "id": "id",
  "prefix": "prefix",
  "label": "label",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z",
  "revokedAt": "2026-10-01T09:30:00.000Z",
  "createdBy": "createdBy",
  "key": "key"
}

Revoke an API key (kept for history)

DELETE/organisations/{id}/api-keys/{keyId}Session du tableau de bord

Paramètres

  • idstringpathobligatoire
  • keyIdstringpathobligatoire

Réponses

  • 200

    • idstring (uuid)obligatoire
    • prefixstringobligatoire
    • labelstring | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • lastUsedAtstring (date-time) | nullobligatoire
    • revokedAtstring (date-time) | nullobligatoire
    • createdBystring (uuid) | nullobligatoire

Exemples de code

curl -X DELETE "$KONNECT_API_URL/organisations/id/api-keys/keyId" \
  -H "Cookie: konnect_session=$KONNECT_SESSION"

Exemple : 200

{
  "id": "id",
  "prefix": "prefix",
  "label": "label",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z",
  "revokedAt": "2026-10-01T09:30:00.000Z",
  "createdBy": "createdBy"
}