Class SchemasClient

java.lang.Object
ai.vectros.resources.schemas.SchemasClient

public class SchemasClient extends Object
  • Field Details

  • Constructor Details

    • SchemasClient

      public SchemasClient(ClientOptions clientOptions)
  • Method Details

    • withRawResponse

      public RawSchemasClient withRawResponse()
      Get responses with HTTP metadata like headers
    • listSchemas

      public SchemaPage listSchemas()
      Returns a paginated list of the record schemas defined in your account. Filter by userId or scope to scope to an owner, by surface to list the types bindable to one surface, or by recordType to resolve the single schema for a type directly. Filtering by surface=user lists your account-wide identity schemas regardless of the calling context (a user-surfaced schema always has one tenant-wide home). Filtering by surface=entity reads your own app context's entity schemas AND the tenant-wide home together, newest first, through a single cursor — an entity schema may live in either home depending on where its namespace is placed (see POST /v1/namespaces). Filtering by record or document lists within the calling context only. Requires the schemas:r scope.
    • listSchemas

      public SchemaPage listSchemas(RequestOptions requestOptions)
      Returns a paginated list of the record schemas defined in your account. Filter by userId or scope to scope to an owner, by surface to list the types bindable to one surface, or by recordType to resolve the single schema for a type directly. Filtering by surface=user lists your account-wide identity schemas regardless of the calling context (a user-surfaced schema always has one tenant-wide home). Filtering by surface=entity reads your own app context's entity schemas AND the tenant-wide home together, newest first, through a single cursor — an entity schema may live in either home depending on where its namespace is placed (see POST /v1/namespaces). Filtering by record or document lists within the calling context only. Requires the schemas:r scope.
    • listSchemas

      public SchemaPage listSchemas(ListSchemasRequest request)
      Returns a paginated list of the record schemas defined in your account. Filter by userId or scope to scope to an owner, by surface to list the types bindable to one surface, or by recordType to resolve the single schema for a type directly. Filtering by surface=user lists your account-wide identity schemas regardless of the calling context (a user-surfaced schema always has one tenant-wide home). Filtering by surface=entity reads your own app context's entity schemas AND the tenant-wide home together, newest first, through a single cursor — an entity schema may live in either home depending on where its namespace is placed (see POST /v1/namespaces). Filtering by record or document lists within the calling context only. Requires the schemas:r scope.
    • listSchemas

      public SchemaPage listSchemas(ListSchemasRequest request, RequestOptions requestOptions)
      Returns a paginated list of the record schemas defined in your account. Filter by userId or scope to scope to an owner, by surface to list the types bindable to one surface, or by recordType to resolve the single schema for a type directly. Filtering by surface=user lists your account-wide identity schemas regardless of the calling context (a user-surfaced schema always has one tenant-wide home). Filtering by surface=entity reads your own app context's entity schemas AND the tenant-wide home together, newest first, through a single cursor — an entity schema may live in either home depending on where its namespace is placed (see POST /v1/namespaces). Filtering by record or document lists within the calling context only. Requires the schemas:r scope.
    • createSchema

      public SchemaResponse createSchema(SchemaRequest body)
      Defines a new record type with optional field definitions, validation rules, and lookup indexes. Idempotent by typeName within the same ownership scope: re-creating an existing typeName returns the existing schema rather than failing. The response's created field (and the HTTP status — 201 when created, 200 when an existing schema was returned) tells the two apart. To reconcile an existing schema to the submitted shape instead of returning it unchanged, set ?upsert=true (this also requires the schemas:u scope; only legal schema changes are applied — migration-locked changes are rejected). Requires the schemas:c scope to create. Being returned the existing schema on a collision is a read of that schema's data and additionally requires the schemas:r scope — a credential holding schemas:c alone receives a 400 ("already in use") on collision instead of the schema.
    • createSchema

      public SchemaResponse createSchema(SchemaRequest body, RequestOptions requestOptions)
      Defines a new record type with optional field definitions, validation rules, and lookup indexes. Idempotent by typeName within the same ownership scope: re-creating an existing typeName returns the existing schema rather than failing. The response's created field (and the HTTP status — 201 when created, 200 when an existing schema was returned) tells the two apart. To reconcile an existing schema to the submitted shape instead of returning it unchanged, set ?upsert=true (this also requires the schemas:u scope; only legal schema changes are applied — migration-locked changes are rejected). Requires the schemas:c scope to create. Being returned the existing schema on a collision is a read of that schema's data and additionally requires the schemas:r scope — a credential holding schemas:c alone receives a 400 ("already in use") on collision instead of the schema.
    • createSchema

      public SchemaResponse createSchema(CreateSchemaRequest request)
      Defines a new record type with optional field definitions, validation rules, and lookup indexes. Idempotent by typeName within the same ownership scope: re-creating an existing typeName returns the existing schema rather than failing. The response's created field (and the HTTP status — 201 when created, 200 when an existing schema was returned) tells the two apart. To reconcile an existing schema to the submitted shape instead of returning it unchanged, set ?upsert=true (this also requires the schemas:u scope; only legal schema changes are applied — migration-locked changes are rejected). Requires the schemas:c scope to create. Being returned the existing schema on a collision is a read of that schema's data and additionally requires the schemas:r scope — a credential holding schemas:c alone receives a 400 ("already in use") on collision instead of the schema.
    • createSchema

      public SchemaResponse createSchema(CreateSchemaRequest request, RequestOptions requestOptions)
      Defines a new record type with optional field definitions, validation rules, and lookup indexes. Idempotent by typeName within the same ownership scope: re-creating an existing typeName returns the existing schema rather than failing. The response's created field (and the HTTP status — 201 when created, 200 when an existing schema was returned) tells the two apart. To reconcile an existing schema to the submitted shape instead of returning it unchanged, set ?upsert=true (this also requires the schemas:u scope; only legal schema changes are applied — migration-locked changes are rejected). Requires the schemas:c scope to create. Being returned the existing schema on a collision is a read of that schema's data and additionally requires the schemas:r scope — a credential holding schemas:c alone receives a 400 ("already in use") on collision instead of the schema.
    • getSchema

      public SchemaResponse getSchema(String id)
      Retrieves a single record schema by its id. Requires the schemas:r scope.
    • getSchema

      public SchemaResponse getSchema(String id, RequestOptions requestOptions)
      Retrieves a single record schema by its id. Requires the schemas:r scope.
    • getSchema

      public SchemaResponse getSchema(String id, GetSchemaRequest request)
      Retrieves a single record schema by its id. Requires the schemas:r scope.
    • getSchema

      public SchemaResponse getSchema(String id, GetSchemaRequest request, RequestOptions requestOptions)
      Retrieves a single record schema by its id. Requires the schemas:r scope.
    • updateSchema

      public SchemaResponse updateSchema(String id, UpdateSchemaRequest request)
      Updates a record schema. Fields you omit are preserved; typeName is immutable and cannot be changed. Collection fields (fields, lookupFields, renderHints, capabilities) are replaced in full when supplied. Requires the schemas:u scope.
    • updateSchema

      public SchemaResponse updateSchema(String id, UpdateSchemaRequest request, RequestOptions requestOptions)
      Updates a record schema. Fields you omit are preserved; typeName is immutable and cannot be changed. Collection fields (fields, lookupFields, renderHints, capabilities) are replaced in full when supplied. Requires the schemas:u scope.
    • deleteSchema

      public void deleteSchema(String id)
      Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. A lineage base (a schema other schemas declare basedOn) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. Requires the schemas:d scope.
    • deleteSchema

      public void deleteSchema(String id, RequestOptions requestOptions)
      Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. A lineage base (a schema other schemas declare basedOn) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. Requires the schemas:d scope.
    • deleteSchema

      public void deleteSchema(String id, DeleteSchemaRequest request)
      Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. A lineage base (a schema other schemas declare basedOn) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. Requires the schemas:d scope.
    • deleteSchema

      public void deleteSchema(String id, DeleteSchemaRequest request, RequestOptions requestOptions)
      Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. A lineage base (a schema other schemas declare basedOn) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. Requires the schemas:d scope.
    • getSchemaVersions

      public ModelDataVersionPage getSchemaVersions(String id)
      Returns the audit trail of changes to a record schema, newest first (create, update, and delete). Schema version history is always recorded — there is no per-schema toggle to disable it. Requires the schemas:r scope.
    • getSchemaVersions

      public ModelDataVersionPage getSchemaVersions(String id, RequestOptions requestOptions)
      Returns the audit trail of changes to a record schema, newest first (create, update, and delete). Schema version history is always recorded — there is no per-schema toggle to disable it. Requires the schemas:r scope.
    • getSchemaVersions

      public ModelDataVersionPage getSchemaVersions(String id, GetSchemaVersionsRequest request)
      Returns the audit trail of changes to a record schema, newest first (create, update, and delete). Schema version history is always recorded — there is no per-schema toggle to disable it. Requires the schemas:r scope.
    • getSchemaVersions

      public ModelDataVersionPage getSchemaVersions(String id, GetSchemaVersionsRequest request, RequestOptions requestOptions)
      Returns the audit trail of changes to a record schema, newest first (create, update, and delete). Schema version history is always recorded — there is no per-schema toggle to disable it. Requires the schemas:r scope.