fepli
API resources

Me

GET /me tells you who a token belongs to and what it may do. Make it the first call of any integration or agent: it confirms the token works, shows which municipality it's for, and whether it can write.

The principal model

  • Name
    identifier
    Type
    string
    Description

    The principal's identifier: the e-mail address of a person, or service-account: followed by the UUID of a service account.

  • Name
    type
    Type
    string
    Description

    user for a personal access token, service-account for a service account token.

  • Name
    uuid
    Type
    string
    Description

    The UUID of the person's account or of the service account.

  • Name
    name
    Type
    string
    Description

    The person's full name, or the service account's name.

  • Name
    email
    Type
    string
    Description

    The person's e-mail address. Not present for service accounts.

  • Name
    roles
    Type
    string[]
    Description

    The roles that decide which endpoints the token can use. See Permissions.

  • Name
    scopes
    Type
    string[]
    Description

    The scopes of the token in use: api:read, and api:write for a token that may write.

  • Name
    access
    Type
    string
    Description

    read or write: what the token can actually do, after the service account's access level is applied.

  • Name
    tenant
    Type
    object
    Description

    The municipality the token belongs to, with slug and name. Only on installations that host several municipalities.


GET/me

Retrieve the principal

Returns the person or service account behind the token. Any valid token works, read-only or not. Tokens created with earlier versions of fepli, which only read offers, get a 403.

Request

GET·/me
curl https://ferienpass-musterstadt.de/api/me \
  -H "Authorization: Bearer $FEPLI_TOKEN"

Response

{
  "identifier": "service-account:0193b2d6-5c1e-7a48-9e0f-4d2a6b8c1e10",
  "type": "service-account",
  "uuid": "0193b2d6-5c1e-7a48-9e0f-4d2a6b8c1e10",
  "name": "Support-Agent",
  "roles": [
    "ROLE_ADMIN",
    "ROLE_PARTICIPANTS_ADMIN",
    "ROLE_PAYMENTS_ADMIN",
    "ROLE_USER",
    "ROLE_SERVICE_ACCOUNT"
  ],
  "scopes": ["api:read"],
  "access": "read",
  "tenant": { "slug": "musterstadt", "name": "Ferienpass Musterstadt" }
}

Was this page helpful?