{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/auth/v1/create-client-response.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "All details about a client including the `accessToken`\n",
  "properties": {
    "accessToken": {
      "description": "AccessToken used for authenticating requests, you should store this\nyou won't be able to retrive it again!\n",
      "pattern": "^[a-zA-Z0-9_-]{22,66}$",
      "type": "string"
    },
    "clientId": {
      "description": "ClientId of the client\n",
      "pattern": "^[A-Za-z0-9!@/:.+|_-]+$",
      "type": "string"
    },
    "created": {
      "description": "Date and time when this client was created\n",
      "format": "date-time",
      "type": "string"
    },
    "deleteOnExpiration": {
      "description": "If `true`, the service may delete this client after it has expired.  If\n`false`, the client will remain after expiration, although it cannot be\nused for authentication in that state.\n",
      "type": "boolean"
    },
    "description": {
      "description": "Description of what these credentials are used for in markdown.\nShould include who is the owner, point of contact.\n",
      "maxLength": 10240,
      "type": "string"
    },
    "disabled": {
      "description": "If true, this client is disabled and cannot be used.  This usually occurs when the\nscopes available to the user owning the client no longer satisfy the client.\n",
      "type": "boolean"
    },
    "expandedScopes": {
      "description": "List of scopes granted to this client by matching roles, including the\nclient's scopes and the implicit role `client-id:<clientId>`.\n",
      "items": {
        "description": "A single scope. A scope must be composed of\nprintable ASCII characters and spaces.  Scopes ending in more than\none `*` character are forbidden.\n",
        "pattern": "^[ -~]*$",
        "title": "Scope",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "expires": {
      "description": "Date and time where the clients access is set to expire\n",
      "format": "date-time",
      "type": "string"
    },
    "lastDateUsed": {
      "description": "Date of last time this client was used. Will only be updated every 6 hours\nor so this may be off by up-to 6 hours. But it still gives a solid hint\nas to whether or not this client is in use.\n",
      "format": "date-time",
      "type": "string"
    },
    "lastModified": {
      "description": "Date and time of last modification\n",
      "format": "date-time",
      "type": "string"
    },
    "lastRotated": {
      "description": "Date and time of when the `accessToken` was reset last time.\n",
      "format": "date-time",
      "type": "string"
    },
    "scopes": {
      "default": [],
      "description": "List of scopes the client has (unexpanded).\n",
      "items": {
        "description": "A single scope. A scope must be composed of\nprintable ASCII characters and spaces.  Scopes ending in more than\none `*` character are forbidden.\n",
        "pattern": "^[ -~]*$",
        "title": "Scope",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    }
  },
  "required": [
    "clientId",
    "accessToken",
    "expires",
    "description",
    "created",
    "lastModified",
    "lastDateUsed",
    "lastRotated",
    "scopes",
    "expandedScopes",
    "disabled",
    "deleteOnExpiration"
  ],
  "title": "Create Client Response",
  "type": "object"
}