{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-ansible-automation-platform/json-schema/red-hat-ansible-automation-platform-paginated-oauth2-token-list-schema.json",
  "title": "PaginatedOAuth2TokenList",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-ansible-automation-platform-applications-api-openapi.yml#/components/schemas/PaginatedOAuth2TokenList",
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OAuth2Token"
      }
    }
  },
  "$defs": {
    "OAuth2Token": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "related": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        },
        "summary_fields": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          },
          "readOnly": true
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date/time this resource was created."
        },
        "created_by": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true,
          "description": "The user who created this resource."
        },
        "modified": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date/time this resource was created."
        },
        "modified_by": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true,
          "description": "The user who last modified this resource."
        },
        "expires": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "user": {
          "type": "integer",
          "readOnly": true,
          "description": "The user representing the token owner."
        },
        "application": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The related application. If None, this is a user token instead of an application token."
        },
        "description": {
          "type": "string",
          "description": "A description for this token."
        },
        "last_used": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true,
          "description": "A timestamp of when this token was last used."
        },
        "scope": {
          "type": "string",
          "description": "Allowed scopes, further restricts user permissions. Must be a simple space-separated string with allowed scopes ['read', 'write', 'openid', 'roles'].",
          "maxLength": 128
        },
        "token": {
          "type": "string",
          "readOnly": true,
          "description": "The generated token value."
        },
        "refresh_token": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        }
      }
    }
  }
}