tokens

Récupère les tokens de manière paginée

Changed on

Cette méthode permet de récupérer les tokens (applicatifs et personnels), avec pagination et filtre optionnel par type.

get/api/v2/tokens

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL http://localhost:8082/realms/referentiel-applications/protocol/openid-connect/auth, token URL http://localhost:8082/realms/referentiel-applications/protocol/openid-connect/token)
    • API key in header x-refapp-token

Query parameters

pagenumber

Numéro de page

pageSizenumber
Example:15

Nombre de résultats par page, 0 pour supprimer la pagination

sortBystring
Example:label

Champ utilisé pour le tri

order'asc' | 'desc'
Example:asc

Ordre de tri

kind'personal' | 'service'

Filtre par type de token (service ou personal)

Response

Liste paginée des tokens récupérée avec succès

totalnumber required

Total number of items

Example response

{
  "results": [
    {
      "id": "abc123def456ghi789jkl012mno345pq",
      "description": "Token pour l'application X",
      "name": "Service X",
      "expiresAt": "2023-12-31T23:59:59.999Z",
      "status": "active",
      "createdBy": {
        "id": "abc123def456ghi789jkl012mno345pq",
        "email": "jean.dupont@beta.gouv.fr"
      },
      "userImpersonate": {
        "id": "abc123def456ghi789jkl012mno345pq",
        "email": "jean.dupont@beta.gouv.fr"
      },
      "scopeOrganization": {
        "id": "f09ed26a-8415-476a-be3b-ada479291c34",
        "path": "Direction de la transformation numérique",
        "sigle": "dtnum",
        "parentId": "f09ed26a-8415-476a-be3b-ada479291c34",
        "businessDivisionId": "f09ed26a-8415-476a-be3b-ada479291c34",
        "businessDivision": {
          "label": "farm"
        },
        "maiaReferences": [
          {
            "id": "f09ed26a-8415-476a-be3b-ada479291c34",
            "maiaRef": "MI/DNUM/SDID",
            "organizationId": "f09ed26a-8415-476a-be3b-ada479291c34"
          }
        ]
      }
    }
  ],
  "total": 100
}

Changes

    • info

      added the required property // to the response with the status

    • info

      added the optional property /////// to the response with the status