{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-client-apps-list-schema.json",
  "title": "ClientAppsList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-client-apps-api-openapi.yml#/components/schemas/ClientAppsList",
  "properties": {
    "result": {
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/ClientAppSchema"
          },
          {
            "$ref": "#/$defs/ClientAppMinSchema"
          },
          {
            "$ref": "#/$defs/ClientAppStdSchema"
          },
          {
            "$ref": "#/$defs/ClientAppFullSchema"
          },
          {
            "$ref": "#/$defs/ClientAppFieldsSchema"
          }
        ]
      },
      "type": "array"
    }
  },
  "type": "object",
  "required": [
    "result"
  ],
  "$defs": {
    "ClientAppFieldsSchema": {
      "properties": {
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Description of client app or api tokens"
        },
        "workspace_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Workspace ID of client app or api tokens"
        },
        "user_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "User ID of client app or api tokens"
        },
        "last_usage": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Last usage of client app or api tokens"
        },
        "created_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Creation time of client app or api tokens. Null for apps created before this was recorded."
        },
        "id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "ID of client app or api tokens"
        },
        "app_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Name of client app or api tokens"
        },
        "app_key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "App key of client app or api tokens"
        },
        "type": {
          "oneOf": [
            {
              "$ref": "#/$defs/ClientAppType"
            },
            {
              "type": "null"
            }
          ],
          "description": "Which credential this app authenticates with — 'legacy' for the X-API-KEY/X-API-SECRET pair or 'token' for a single Bearer token. app_key is only a usable credential (paired with the secret) for a legacy app — for a token app it is a display id only."
        }
      },
      "type": "object",
      "required": [],
      "title": "ClientAppFieldsSchema"
    },
    "ClientAppFullSchema": {
      "properties": {
        "id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "ID of client app or api tokens"
        },
        "app_name": {
          "type": "string",
          "description": "Name of client app or api tokens"
        },
        "app_key": {
          "type": "string",
          "description": "App key of client app or api tokens"
        },
        "type": {
          "$ref": "#/$defs/ClientAppType"
        },
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Description of client app or api tokens"
        },
        "workspace_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "Workspace ID of client app or api tokens"
        },
        "user_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "User ID of client app or api tokens"
        },
        "project_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project ID of client app or api tokens"
        },
        "last_usage": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Last usage of client app or api tokens"
        },
        "created_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Creation time of client app or api tokens. Null for apps created before this was recorded."
        }
      },
      "type": "object",
      "required": [
        "app_key",
        "app_name",
        "id",
        "type",
        "user_id",
        "workspace_id"
      ],
      "title": "ClientAppFullSchema"
    },
    "ClientAppMinSchema": {
      "properties": {
        "id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "ID of client app or api tokens"
        },
        "app_name": {
          "type": "string",
          "description": "Name of client app or api tokens"
        },
        "app_key": {
          "type": "string",
          "description": "App key of client app or api tokens"
        },
        "type": {
          "$ref": "#/$defs/ClientAppType"
        }
      },
      "type": "object",
      "required": [
        "app_key",
        "app_name",
        "id",
        "type"
      ],
      "title": "ClientAppMinSchema"
    },
    "ClientAppSchema": {
      "properties": {
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Description of client app or api tokens"
        },
        "workspace_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Workspace ID of client app or api tokens"
        },
        "user_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "User ID of client app or api tokens"
        },
        "last_usage": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Last usage of client app or api tokens"
        },
        "created_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Creation time of client app or api tokens. Null for apps created before this was recorded."
        },
        "id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "ID of client app or api tokens"
        },
        "app_name": {
          "type": "string",
          "description": "Name of client app or api tokens"
        },
        "app_key": {
          "type": "string",
          "description": "App key of client app or api tokens"
        }
      },
      "type": "object",
      "required": [
        "app_key",
        "app_name",
        "id"
      ],
      "title": "ClientAppSchema"
    },
    "ClientAppStdSchema": {
      "properties": {
        "id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "ID of client app or api tokens"
        },
        "app_name": {
          "type": "string",
          "description": "Name of client app or api tokens"
        },
        "app_key": {
          "type": "string",
          "description": "App key of client app or api tokens"
        },
        "type": {
          "$ref": "#/$defs/ClientAppType"
        },
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Description of client app or api tokens"
        },
        "workspace_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "Workspace ID of client app or api tokens"
        },
        "user_id": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "description": "User ID of client app or api tokens"
        },
        "project_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project ID of client app or api tokens"
        },
        "last_usage": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Last usage of client app or api tokens"
        },
        "created_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Creation time of client app or api tokens. Null for apps created before this was recorded."
        }
      },
      "type": "object",
      "required": [
        "app_key",
        "app_name",
        "id",
        "type",
        "user_id",
        "workspace_id"
      ],
      "title": "ClientAppStdSchema"
    },
    "ClientAppType": {
      "type": "string",
      "enum": [
        "legacy",
        "token"
      ],
      "title": "ClientAppType",
      "description": "Which credential this app authenticates with — 'legacy' for the X-API-KEY/X-API-SECRET pair or 'token' for a single Bearer token. app_key is only a usable credential (paired with the secret) for a legacy app — for a token app it is a display id only."
    }
  }
}