Environments

Stats Environments

Changed on
get/v2/projects/{proj_id}/envs/{env_id}/stats

Request

  • Base URL
    https://api.permit.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

proj_idstring required

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

env_idstring required

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Response

Successful Response

keystring required

A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment.

idstring uuid required

Unique id of the environment

organization_idstring uuid required

Unique id of the organization that the environment belongs to.

project_idstring uuid required

Unique id of the project that the environment belongs to.

created_atstring date-time required

Date and time when the environment was created (ISO_8601 format).

updated_atstring date-time required

Date and time when the environment was last updated/modified (ISO_8601 format).

avp_policy_store_idstring
namestring required

The name of the environment

descriptionstring

an optional longer description of the environment

custom_branch_namestring

when using gitops feature, an optional branch name for the environment

settingsobject

the settings for this environment

jwks_unpinnedstring[]

Read-only. Which of jwks.issuer and jwks.audience this environment leaves unset: Elements login takes each of those from the token itself, so it checks nothing, and any application whose tokens the same JWKS signs can log in. On a JWKS that must pin both (Firebase Auth's always; a shared IdP host, such as Entra ID or Google, once the deployment refuses unpinned shared configs) Elements login and invite approval are refused instead. Empty when both are set or no JWKS is configured.

Example response

{
  "stats": {
    "members": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "email": "janedoe@permituser.com",
        "email_verified": true,
        "given_name": "Jane",
        "family_name": "Doe",
        "name": "Jane Josephine Doe",
        "picture": "http://permituser.com/janedoe/me.jpg",
        "settings": {
          "option": "value",
          "another-option": "another-value"
        },
        "is_superuser": false,
        "is_onboarding": true,
        "onboarding_step": "done",
        "created_at": "2019-08-20T14:15:22Z",
        "last_login": "2019-08-24T14:15:22Z",
        "last_ip": "1.2.3.4",
        "logins_count": 2,
        "identities": [
          {
            "user_id": "google-oauth2|000000000000000000001",
            "provider": "google-oauth2",
            "sub": "000000000000000000001",
            "email": "Jane@permituser.com",
            "email_verified": true,
            "user_info": {
              "sub": "000000000000000000001",
              "name": "Jane Josephine Doe",
              "given_name": "Jane",
              "family_name": "Doe",
              "middle_name": "Josephine",
              "nickname": "JJ",
              "preferred_username": "j.doe",
              "profile": "http://permituser.com/janedoe",
              "picture": "http://permituser.com/janedoe/me.jpg",
              "website": "http://permituser.com",
              "email": "janedoe@permituser.com",
              "email_verified": true,
              "gender": "female",
              "birthdate": "1972-03-31",
              "zoneinfo": "America/Los_Angeles",
              "locale": "en-US",
              "phone_number": "+1 (111) 222-3434",
              "phone_number_verified": false,
              "address": {
                "country": "us"
              },
              "updated_at": "1556845729"
            }
          }
        ],
        "invite": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
          "invite_code": "40ef0e48-a11f-4963-a229-e396c9eeefff",
          "email": "Jane@permituser.com",
          "role": "admin",
          "created_at": "2019-08-24T14:15:22Z",
          "status": "pending",
          "failed_reason": ""
        },
        "grants": [
          {
            "object_type": "org",
            "access_level": "admin",
            "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6"
          }
        ]
      }
    ]
  }
}

Changes

    • info

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

    • info

      added the optional property to the response with the status