{
  "openapi": "3.0.0",
  "paths": {
    "/agents/roles": {
      "post": {
        "description": "Creates vended roles on-behalf-of a user across the requested platforms. Roles are provisioned asynchronously and torn down when the TTL expires.",
        "operationId": "createVendedRoles",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVendedRolesBodyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendedRolesResponseDto"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AugmentedZodDto"
                }
              }
            }
          }
        },
        "summary": "Create vended roles",
        "tags": [
          "Agent"
        ]
      }
    },
    "/agents/roles/{id}": {
      "get": {
        "description": "Returns the roles vended for a request, including their current provisioning status.",
        "operationId": "getVendedRoles",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Identifier of the vending request, as returned when the roles were created",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendedRolesResponseDto"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AugmentedZodDto"
                }
              }
            }
          }
        },
        "summary": "Get vended roles",
        "tags": [
          "Agent"
        ]
      },
      "delete": {
        "description": "Initiates teardown of the roles vended for a request, ahead of their TTL. Teardown proceeds asynchronously.",
        "operationId": "deleteVendedRoles",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Identifier of the vending request, as returned when the roles were created",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AugmentedZodDto"
                }
              }
            }
          }
        },
        "summary": "Tear down vended roles",
        "tags": [
          "Agent"
        ]
      }
    }
  },
  "info": {
    "title": "Comply API",
    "description": "The Comply API",
    "version": "1.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "Agent",
      "description": "Agent-authenticated endpoints"
    }
  ],
  "servers": [],
  "components": {
    "schemas": {
      "AugmentedZodDto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "description": "HTTP status code of the failure",
            "type": "number"
          },
          "message": {
            "description": "Human-readable description of what went wrong",
            "type": "string"
          },
          "error": {
            "description": "Short name for the error class, e.g. `Bad Request`",
            "type": "string"
          }
        },
        "required": [
          "statusCode",
          "message"
        ]
      },
      "AISdkChatRequestBodyDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Thread the message belongs to; a new thread is created if it does not exist yet",
            "type": "string"
          },
          "messages": {
            "description": "Conversation history, ending with the message to respond to",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Unique identifier of the message",
                  "type": "string"
                },
                "role": {
                  "description": "Who authored the message",
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system"
                  ]
                },
                "parts": {
                  "description": "AI SDK UI message parts making up the message content",
                  "type": "array",
                  "items": {}
                },
                "metadata": {
                  "description": "Message metadata supplied by the AI SDK",
                  "type": "object",
                  "properties": {
                    "createdAt": {
                      "description": "When the message was created, as an ISO 8601 timestamp",
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "createdAt"
                  ]
                }
              },
              "required": [
                "id",
                "role",
                "parts"
              ]
            }
          },
          "trigger": {
            "description": "Whether this request submits a new message or regenerates an existing one",
            "type": "string",
            "enum": [
              "submit-message",
              "regenerate-message"
            ]
          },
          "messageId": {
            "description": "Message to regenerate. Required when `trigger` is `regenerate-message`",
            "type": "string"
          }
        },
        "required": [
          "id",
          "messages",
          "trigger"
        ]
      },
      "ChatThreadListDto": {
        "type": "object",
        "properties": {
          "threads": {
            "description": "Threads on the requested page",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Unique identifier of the thread",
                  "type": "string"
                },
                "title": {
                  "description": "Human-readable thread title, generated from the first message",
                  "type": "string"
                },
                "resourceId": {
                  "description": "Owning resource, scoping the thread to a single tenant and user",
                  "type": "string"
                },
                "createdAt": {
                  "description": "When the thread was created, as an ISO 8601 timestamp",
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "description": "When the thread was last updated, as an ISO 8601 timestamp",
                  "type": "string",
                  "format": "date-time"
                },
                "metadata": {
                  "description": "Arbitrary thread metadata, including the agent, tenant, and user it belongs to",
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "required": [
                "id",
                "resourceId",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          "nextToken": {
            "description": "Cursor for the next page, or null when there are no more threads",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "threads",
          "nextToken"
        ]
      },
      "ChatThreadDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier of the thread",
            "type": "string"
          },
          "title": {
            "description": "Human-readable thread title, generated from the first message",
            "type": "string"
          },
          "resourceId": {
            "description": "Owning resource, scoping the thread to a single tenant and user",
            "type": "string"
          },
          "createdAt": {
            "description": "When the thread was created, as an ISO 8601 timestamp",
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "When the thread was last updated, as an ISO 8601 timestamp",
            "type": "string",
            "format": "date-time"
          },
          "metadata": {
            "description": "Arbitrary thread metadata, including the agent, tenant, and user it belongs to",
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "resourceId",
          "createdAt",
          "updatedAt"
        ]
      },
      "ChatMessageDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier of the message",
            "type": "string"
          },
          "role": {
            "description": "Who authored the message",
            "type": "string",
            "enum": [
              "user",
              "assistant",
              "system"
            ]
          },
          "parts": {
            "description": "AI SDK UI message parts making up the message content",
            "type": "array",
            "items": {}
          },
          "metadata": {
            "description": "Message metadata supplied by the AI SDK",
            "type": "object",
            "properties": {
              "createdAt": {
                "description": "When the message was created, as an ISO 8601 timestamp",
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "createdAt"
            ]
          }
        },
        "required": [
          "id",
          "role",
          "parts"
        ]
      },
      "DatasetsDto": {
        "type": "object",
        "properties": {
          "datasets": {
            "description": "Every eval dataset available to run experiments against",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Unique identifier of the dataset",
                  "type": "string"
                },
                "name": {
                  "description": "Human-readable dataset name",
                  "type": "string"
                },
                "description": {
                  "description": "What the dataset covers",
                  "type": "string"
                },
                "experimentCount": {
                  "description": "Number of experiments that have been run against the dataset",
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "experimentCount"
              ]
            }
          }
        },
        "required": [
          "datasets"
        ]
      },
      "ExperimentsDto": {
        "type": "object",
        "properties": {
          "experiments": {
            "description": "Experiment runs for the dataset, most recent first",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Unique identifier of the experiment run",
                  "type": "string"
                },
                "name": {
                  "description": "Human-readable experiment name",
                  "type": "string"
                },
                "status": {
                  "description": "Current state of the run",
                  "type": "string",
                  "enum": [
                    "pending",
                    "running",
                    "completed",
                    "failed"
                  ]
                },
                "totalItems": {
                  "description": "Number of dataset items in the run",
                  "type": "number"
                },
                "succeededCount": {
                  "description": "Number of items that passed",
                  "type": "number"
                },
                "failedCount": {
                  "description": "Number of items that failed",
                  "type": "number"
                },
                "startedAt": {
                  "description": "When the run started, as an ISO 8601 timestamp, or null while pending",
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "completedAt": {
                  "description": "When the run finished, as an ISO 8601 timestamp, or null while still running",
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "createdAt": {
                  "description": "When the run was created, as an ISO 8601 timestamp",
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "status",
                "totalItems",
                "succeededCount",
                "failedCount",
                "startedAt",
                "completedAt",
                "createdAt"
              ]
            }
          }
        },
        "required": [
          "experiments"
        ]
      },
      "ExperimentResultsDto": {
        "type": "object",
        "properties": {
          "experiment": {
            "description": "The experiment run these results belong to",
            "type": "object",
            "properties": {
              "id": {
                "description": "Unique identifier of the experiment run",
                "type": "string"
              },
              "name": {
                "description": "Human-readable experiment name",
                "type": "string"
              },
              "status": {
                "description": "Current state of the run",
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "completed",
                  "failed"
                ]
              },
              "totalItems": {
                "description": "Number of dataset items in the run",
                "type": "number"
              },
              "succeededCount": {
                "description": "Number of items that passed",
                "type": "number"
              },
              "failedCount": {
                "description": "Number of items that failed",
                "type": "number"
              },
              "startedAt": {
                "description": "When the run started, as an ISO 8601 timestamp, or null while pending",
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "completedAt": {
                "description": "When the run finished, as an ISO 8601 timestamp, or null while still running",
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "createdAt": {
                "description": "When the run was created, as an ISO 8601 timestamp",
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "status",
              "totalItems",
              "succeededCount",
              "failedCount",
              "startedAt",
              "completedAt",
              "createdAt"
            ]
          },
          "items": {
            "description": "Per-case results for the run",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "itemId": {
                  "description": "Unique identifier of this result within the run",
                  "type": "string"
                },
                "caseId": {
                  "description": "Dataset case the item was produced from",
                  "type": "string"
                },
                "question": {
                  "description": "Question posed to the agent",
                  "type": "string"
                },
                "passed": {
                  "description": "Whether the item met every scorer threshold",
                  "type": "boolean"
                },
                "error": {
                  "description": "Failure message when the item errored, otherwise null",
                  "type": "string",
                  "nullable": true
                },
                "scores": {
                  "description": "Score from each scorer applied to the item",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "scorerId": {
                        "description": "Scorer that produced this score",
                        "type": "string"
                      },
                      "score": {
                        "description": "Score value, or null when the scorer could not produce one",
                        "type": "number",
                        "nullable": true
                      },
                      "reason": {
                        "description": "Scorer's explanation for the score, when it provides one",
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": [
                      "scorerId",
                      "score",
                      "reason"
                    ]
                  }
                },
                "inputTokens": {
                  "description": "Prompt tokens consumed by the item",
                  "type": "number"
                },
                "outputTokens": {
                  "description": "Completion tokens produced by the item",
                  "type": "number"
                },
                "estimatedCostUsd": {
                  "description": "Estimated cost of the item in USD",
                  "type": "number"
                },
                "output": {
                  "description": "The agent's answer"
                },
                "groundTruth": {
                  "description": "Expected answer the output was scored against"
                },
                "startedAt": {
                  "description": "When the item started, as an ISO 8601 timestamp",
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "completedAt": {
                  "description": "When the item finished, as an ISO 8601 timestamp",
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                }
              },
              "required": [
                "itemId",
                "caseId",
                "question",
                "passed",
                "error",
                "scores"
              ]
            }
          }
        },
        "required": [
          "experiment",
          "items"
        ]
      },
      "RunExperimentDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "description": "Tenant to run the experiment against",
            "type": "string"
          },
          "concurrency": {
            "description": "Number of dataset cases to evaluate in parallel. Defaults to 1",
            "type": "integer",
            "minimum": 1,
            "exclusiveMinimum": false,
            "default": 1
          },
          "runner": {
            "description": "Which eval runner to execute. Defaults to `access-summary`",
            "type": "string",
            "enum": [
              "access-summary",
              "prompt-injection"
            ],
            "default": "access-summary"
          }
        },
        "required": [
          "tenantId"
        ]
      },
      "TriggeredExperimentDto": {
        "type": "object",
        "properties": {
          "experimentId": {
            "description": "Identifier of the newly triggered experiment run",
            "type": "string"
          },
          "status": {
            "description": "Always `pending`; the run is queued, not yet started",
            "type": "string",
            "enum": [
              "pending"
            ]
          }
        },
        "required": [
          "experimentId",
          "status"
        ]
      },
      "TenantDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "description": "Unique identifier of the tenant",
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "description": "Organization the tenant belongs to",
            "type": "string",
            "format": "uuid"
          },
          "fqdn": {
            "description": "Fully qualified domain name the tenant's Governance app is reachable at",
            "type": "string"
          },
          "shortKey": {
            "description": "Short, human-readable key identifying the tenant",
            "type": "string"
          },
          "globalSegment": {
            "description": "Deployment segment the tenant is hosted in",
            "type": "string"
          },
          "organizationName": {
            "description": "Display name of the organization",
            "type": "string"
          },
          "internalHostname": {
            "description": "Cluster-internal hostname used for service-to-service calls to the tenant's Governance app",
            "type": "string"
          }
        },
        "required": [
          "tenantId",
          "organizationId",
          "fqdn",
          "shortKey",
          "globalSegment",
          "organizationName",
          "internalHostname"
        ]
      },
      "UserDto": {
        "type": "object",
        "properties": {
          "iamId": {
            "description": "Identity provider the identity authenticates against",
            "type": "string"
          },
          "globalUserId": {
            "description": "Unique identifier of the identity, stable across identity providers",
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "description": "Username within the identity provider",
            "type": "string"
          },
          "displayName": {
            "description": "Human-readable name for the identity",
            "type": "string"
          },
          "permissions": {
            "description": "Governance permissions granted to the identity",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalUsernames": {
            "description": "Usernames the identity maps to on connected data platforms",
            "type": "object",
            "properties": {
              "snowflake": {
                "description": "The identity's username on Snowflake, when one is mapped",
                "type": "string"
              },
              "databricks": {
                "description": "The identity's username on Databricks, when one is mapped",
                "type": "string"
              }
            }
          },
          "email": {
            "description": "The user's email address, or null when the identity provider does not supply one",
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "tenantInfo": {
            "description": "The tenant the user is currently operating in",
            "type": "object",
            "properties": {
              "tenantId": {
                "description": "Unique identifier of the tenant",
                "type": "string",
                "format": "uuid"
              },
              "organizationName": {
                "description": "Display name of the organization",
                "type": "string"
              },
              "fqdn": {
                "description": "Fully qualified domain name the tenant's Governance app is reachable at",
                "type": "string"
              },
              "globalSegment": {
                "description": "Deployment segment the tenant is hosted in",
                "type": "string"
              }
            },
            "required": [
              "tenantId",
              "organizationName",
              "fqdn",
              "globalSegment"
            ]
          }
        },
        "required": [
          "iamId",
          "globalUserId",
          "username",
          "displayName",
          "permissions",
          "externalUsernames",
          "email",
          "tenantInfo"
        ]
      },
      "CreateVendedRolesBodyDto": {
        "type": "object",
        "properties": {
          "username": {
            "description": "Username of the user to vend roles on behalf of",
            "type": "string",
            "minLength": 1
          },
          "iamId": {
            "description": "Identity provider to disambiguate the user with, when the username matches more than one identity",
            "type": "string",
            "minLength": 1
          },
          "ttl": {
            "description": "How long the vended roles remain valid, in milliseconds. Between 1m and 24h. Defaults to 1h",
            "default": 3600000
          },
          "platforms": {
            "description": "Platforms to vend roles on",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "technology": {
                  "description": "Data platform to vend roles on",
                  "type": "string",
                  "enum": [
                    "Snowflake",
                    "Databricks"
                  ]
                },
                "connectionKeys": {
                  "description": "Restricts vending to these connections. Omit to vend on every connection for the platform. Required with exactly one key for Databricks.",
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "technology"
              ]
            }
          }
        },
        "required": [
          "username",
          "platforms"
        ]
      },
      "VendedRolesResponseDto": {
        "type": "object",
        "properties": {
          "requestId": {
            "description": "Identifier of the vending request, used to fetch or tear down the roles",
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "description": "When the roles were requested, as an ISO 8601 timestamp",
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "description": "When the roles are torn down, as an ISO 8601 timestamp",
            "type": "string",
            "format": "date-time"
          },
          "roles": {
            "description": "Roles vended for this request, one per platform connection",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Unique identifier of the vended role",
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "description": "Name of the role as created on the platform",
                      "type": "string"
                    },
                    "technology": {
                      "description": "Data platform the role was vended on",
                      "type": "string",
                      "enum": [
                        "Snowflake"
                      ]
                    },
                    "connectionKey": {
                      "description": "Connection the role was vended against",
                      "type": "string"
                    },
                    "status": {
                      "description": "Provisioning state of the role",
                      "type": "string",
                      "enum": [
                        "CREATING",
                        "READY",
                        "FAILED",
                        "DROPPED",
                        "ABANDONED"
                      ]
                    },
                    "metadata": {
                      "description": "Snowflake-native details of the granted role, or null until the role is created",
                      "type": "object",
                      "properties": {
                        "roleName": {
                          "description": "Name of the granted Snowflake role",
                          "type": "string"
                        }
                      },
                      "required": [
                        "roleName"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "technology",
                    "connectionKey",
                    "status",
                    "metadata"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Unique identifier of the vended role",
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "description": "Name of the role as created on the platform",
                      "type": "string"
                    },
                    "technology": {
                      "description": "Data platform the role was vended on",
                      "type": "string",
                      "enum": [
                        "Databricks"
                      ]
                    },
                    "connectionKey": {
                      "description": "Connection the role was vended against",
                      "type": "string"
                    },
                    "status": {
                      "description": "Provisioning state of the role",
                      "type": "string",
                      "enum": [
                        "CREATING",
                        "READY",
                        "FAILED",
                        "DROPPED",
                        "ABANDONED"
                      ]
                    },
                    "metadata": {
                      "description": "Databricks-native details of the granted group, or null until the group is created",
                      "type": "object",
                      "properties": {
                        "groupName": {
                          "description": "Name of the granted Databricks group",
                          "type": "string"
                        },
                        "groupId": {
                          "description": "Identifier of the granted Databricks group",
                          "type": "string"
                        }
                      },
                      "required": [
                        "groupName",
                        "groupId"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "technology",
                    "connectionKey",
                    "status",
                    "metadata"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "requestId",
          "createdAt",
          "expiresAt",
          "roles"
        ]
      },
      "VendedRoleActivityResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Vended-role activity rows on the requested page",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Unique identifier of the vended role",
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "description": "Name of the role as created on the platform",
                      "type": "string"
                    },
                    "technology": {
                      "description": "Data platform the role was vended on",
                      "type": "string",
                      "enum": [
                        "Snowflake"
                      ]
                    },
                    "connectionKey": {
                      "description": "Connection the role was vended against",
                      "type": "string"
                    },
                    "status": {
                      "description": "Provisioning state of the role",
                      "type": "string",
                      "enum": [
                        "CREATING",
                        "READY",
                        "FAILED",
                        "DROPPED",
                        "ABANDONED"
                      ]
                    },
                    "requestId": {
                      "description": "Vending request the role was created by",
                      "type": "string",
                      "format": "uuid"
                    },
                    "globalUserId": {
                      "description": "User the role was vended on behalf of",
                      "type": "string",
                      "format": "uuid"
                    },
                    "createdAt": {
                      "description": "When the role was requested, as an ISO 8601 timestamp",
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "description": "When the role is torn down, as an ISO 8601 timestamp",
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "description": "Snowflake-native details of the granted role, or null until the role is created",
                      "type": "object",
                      "properties": {
                        "roleName": {
                          "description": "Name of the granted Snowflake role",
                          "type": "string"
                        }
                      },
                      "required": [
                        "roleName"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "technology",
                    "connectionKey",
                    "status",
                    "requestId",
                    "globalUserId",
                    "createdAt",
                    "expiresAt",
                    "metadata"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Unique identifier of the vended role",
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "description": "Name of the role as created on the platform",
                      "type": "string"
                    },
                    "technology": {
                      "description": "Data platform the role was vended on",
                      "type": "string",
                      "enum": [
                        "Databricks"
                      ]
                    },
                    "connectionKey": {
                      "description": "Connection the role was vended against",
                      "type": "string"
                    },
                    "status": {
                      "description": "Provisioning state of the role",
                      "type": "string",
                      "enum": [
                        "CREATING",
                        "READY",
                        "FAILED",
                        "DROPPED",
                        "ABANDONED"
                      ]
                    },
                    "requestId": {
                      "description": "Vending request the role was created by",
                      "type": "string",
                      "format": "uuid"
                    },
                    "globalUserId": {
                      "description": "User the role was vended on behalf of",
                      "type": "string",
                      "format": "uuid"
                    },
                    "createdAt": {
                      "description": "When the role was requested, as an ISO 8601 timestamp",
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "description": "When the role is torn down, as an ISO 8601 timestamp",
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "description": "Databricks-native details of the granted group, or null until the group is created",
                      "type": "object",
                      "properties": {
                        "groupName": {
                          "description": "Name of the granted Databricks group",
                          "type": "string"
                        },
                        "groupId": {
                          "description": "Identifier of the granted Databricks group",
                          "type": "string"
                        }
                      },
                      "required": [
                        "groupName",
                        "groupId"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "technology",
                    "connectionKey",
                    "status",
                    "requestId",
                    "globalUserId",
                    "createdAt",
                    "expiresAt",
                    "metadata"
                  ]
                }
              ]
            }
          },
          "meta": {
            "description": "Sort and pagination actually applied to this response",
            "type": "object",
            "properties": {
              "sort": {
                "description": "Sorts applied to the results",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "description": "Field the results were sorted by",
                      "type": "string"
                    },
                    "order": {
                      "description": "Direction the field was sorted in",
                      "type": "string",
                      "enum": [
                        "asc",
                        "desc"
                      ]
                    }
                  },
                  "required": [
                    "field",
                    "order"
                  ]
                }
              },
              "page": {
                "description": "Pagination applied to the results",
                "type": "object",
                "properties": {
                  "limit": {
                    "description": "Maximum number of items returned",
                    "type": "integer"
                  },
                  "offset": {
                    "description": "Number of items skipped before the returned page",
                    "type": "integer"
                  }
                },
                "required": [
                  "limit",
                  "offset"
                ]
              }
            },
            "required": [
              "sort",
              "page"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      }
    }
  }
}