Class IdentityClient

java.lang.Object
ai.vectros.resources.identity.IdentityClient

public class IdentityClient extends Object
  • Field Details

  • Constructor Details

    • IdentityClient

      public IdentityClient(ClientOptions clientOptions)
  • Method Details

    • withRawResponse

      public RawIdentityClient withRawResponse()
      Get responses with HTTP metadata like headers
    • listEntities

      public EntityPage listEntities(String namespace)
      Returns a paginated list of entities in a namespace. Filter by userId (entities owned by a user), by externalId (exact lookup by your own identifier), or by scope (scope=<namespace>:<value> — entities that have that value as a parent, e.g. scope=org:6ba7...). Naming this namespace's own name in scope resolves the entity itself (scope=team:6ba7... on /v1/entities/team returns that team), since an entity is always in its own scope. userId and scope can be combined to narrow on both dimensions at once; externalId identifies a single entity and cannot be combined with either. Requires the entities:r:<namespace> scope.
    • listEntities

      public EntityPage listEntities(String namespace, RequestOptions requestOptions)
      Returns a paginated list of entities in a namespace. Filter by userId (entities owned by a user), by externalId (exact lookup by your own identifier), or by scope (scope=<namespace>:<value> — entities that have that value as a parent, e.g. scope=org:6ba7...). Naming this namespace's own name in scope resolves the entity itself (scope=team:6ba7... on /v1/entities/team returns that team), since an entity is always in its own scope. userId and scope can be combined to narrow on both dimensions at once; externalId identifies a single entity and cannot be combined with either. Requires the entities:r:<namespace> scope.
    • listEntities

      public EntityPage listEntities(String namespace, ListEntitiesRequest request)
      Returns a paginated list of entities in a namespace. Filter by userId (entities owned by a user), by externalId (exact lookup by your own identifier), or by scope (scope=<namespace>:<value> — entities that have that value as a parent, e.g. scope=org:6ba7...). Naming this namespace's own name in scope resolves the entity itself (scope=team:6ba7... on /v1/entities/team returns that team), since an entity is always in its own scope. userId and scope can be combined to narrow on both dimensions at once; externalId identifies a single entity and cannot be combined with either. Requires the entities:r:<namespace> scope.
    • listEntities

      public EntityPage listEntities(String namespace, ListEntitiesRequest request, RequestOptions requestOptions)
      Returns a paginated list of entities in a namespace. Filter by userId (entities owned by a user), by externalId (exact lookup by your own identifier), or by scope (scope=<namespace>:<value> — entities that have that value as a parent, e.g. scope=org:6ba7...). Naming this namespace's own name in scope resolves the entity itself (scope=team:6ba7... on /v1/entities/team returns that team), since an entity is always in its own scope. userId and scope can be combined to narrow on both dimensions at once; externalId identifies a single entity and cannot be combined with either. Requires the entities:r:<namespace> scope.
    • createEntity

      public EntityResponse createEntity(String namespace, EntityRequest body)
      Creates a new entity in the given namespace. This call is idempotent on externalId within the namespace: if an entity with the same externalId already exists, the existing record is returned instead of creating a duplicate (created: false, HTTP 200). To overwrite an existing entity's content instead of returning it unchanged, set ?upsert=true (also requires the entities:u:<namespace> scope). The namespace must be entity-backed (org/client, or registered via POST /v1/namespaces). Requires the entities:c:<namespace> scope to create. Being returned the existing entity on a collision is a read of that entity's data and additionally requires the entities:r:<namespace> scope — a credential holding entities:c:<namespace> alone receives a 400 ("already in use") on collision instead of the entity.
    • createEntity

      public EntityResponse createEntity(String namespace, EntityRequest body, RequestOptions requestOptions)
      Creates a new entity in the given namespace. This call is idempotent on externalId within the namespace: if an entity with the same externalId already exists, the existing record is returned instead of creating a duplicate (created: false, HTTP 200). To overwrite an existing entity's content instead of returning it unchanged, set ?upsert=true (also requires the entities:u:<namespace> scope). The namespace must be entity-backed (org/client, or registered via POST /v1/namespaces). Requires the entities:c:<namespace> scope to create. Being returned the existing entity on a collision is a read of that entity's data and additionally requires the entities:r:<namespace> scope — a credential holding entities:c:<namespace> alone receives a 400 ("already in use") on collision instead of the entity.
    • createEntity

      public EntityResponse createEntity(String namespace, CreateEntityRequest request)
      Creates a new entity in the given namespace. This call is idempotent on externalId within the namespace: if an entity with the same externalId already exists, the existing record is returned instead of creating a duplicate (created: false, HTTP 200). To overwrite an existing entity's content instead of returning it unchanged, set ?upsert=true (also requires the entities:u:<namespace> scope). The namespace must be entity-backed (org/client, or registered via POST /v1/namespaces). Requires the entities:c:<namespace> scope to create. Being returned the existing entity on a collision is a read of that entity's data and additionally requires the entities:r:<namespace> scope — a credential holding entities:c:<namespace> alone receives a 400 ("already in use") on collision instead of the entity.
    • createEntity

      public EntityResponse createEntity(String namespace, CreateEntityRequest request, RequestOptions requestOptions)
      Creates a new entity in the given namespace. This call is idempotent on externalId within the namespace: if an entity with the same externalId already exists, the existing record is returned instead of creating a duplicate (created: false, HTTP 200). To overwrite an existing entity's content instead of returning it unchanged, set ?upsert=true (also requires the entities:u:<namespace> scope). The namespace must be entity-backed (org/client, or registered via POST /v1/namespaces). Requires the entities:c:<namespace> scope to create. Being returned the existing entity on a collision is a read of that entity's data and additionally requires the entities:r:<namespace> scope — a credential holding entities:c:<namespace> alone receives a 400 ("already in use") on collision instead of the entity.
    • getEntity

      public EntityResponse getEntity(String namespace, String id)
      Retrieves a single entity by its namespace and Vectros-assigned ID. Requires the entities:r:<namespace> scope.
    • getEntity

      public EntityResponse getEntity(String namespace, String id, RequestOptions requestOptions)
      Retrieves a single entity by its namespace and Vectros-assigned ID. Requires the entities:r:<namespace> scope.
    • getEntity

      public EntityResponse getEntity(String namespace, String id, GetEntityRequest request)
      Retrieves a single entity by its namespace and Vectros-assigned ID. Requires the entities:r:<namespace> scope.
    • getEntity

      public EntityResponse getEntity(String namespace, String id, GetEntityRequest request, RequestOptions requestOptions)
      Retrieves a single entity by its namespace and Vectros-assigned ID. Requires the entities:r:<namespace> scope.
    • updateEntity

      public EntityResponse updateEntity(String namespace, String id, UpdateEntityRequest request)
      Updates the mutable fields of an entity. Omitted fields are preserved (a null value does not clear a field), and the payload object is replaced in full when supplied. Providing scopes replaces the entity's parent edges. Requires the entities:u:<namespace> scope.
    • updateEntity

      public EntityResponse updateEntity(String namespace, String id, UpdateEntityRequest request, RequestOptions requestOptions)
      Updates the mutable fields of an entity. Omitted fields are preserved (a null value does not clear a field), and the payload object is replaced in full when supplied. Providing scopes replaces the entity's parent edges. Requires the entities:u:<namespace> scope.
    • deleteEntity

      public void deleteEntity(String namespace, String id)
      Permanently deletes an entity. This action cannot be undone. Requires the entities:d:<namespace> scope.
    • deleteEntity

      public void deleteEntity(String namespace, String id, RequestOptions requestOptions)
      Permanently deletes an entity. This action cannot be undone. Requires the entities:d:<namespace> scope.
    • deleteEntity

      public void deleteEntity(String namespace, String id, DeleteEntityRequest request)
      Permanently deletes an entity. This action cannot be undone. Requires the entities:d:<namespace> scope.
    • deleteEntity

      public void deleteEntity(String namespace, String id, DeleteEntityRequest request, RequestOptions requestOptions)
      Permanently deletes an entity. This action cannot be undone. Requires the entities:d:<namespace> scope.
    • lookupEntities

      public EntityPage lookupEntities(String namespace, LookupEntitiesRequest request)
      Looks up entities in a namespace by a schema-declared field value, with the criteria in the request body instead of the URL. Use this for a sensitive field: the value travels in the body and never appears in the URL. Body equivalent of the type/field/value lookup on GET /v1/entities/{namespace}, which rejects sensitive-field values and directs you here. Requires the entities:r:<namespace> scope.
    • lookupEntities

      public EntityPage lookupEntities(String namespace, LookupEntitiesRequest request, RequestOptions requestOptions)
      Looks up entities in a namespace by a schema-declared field value, with the criteria in the request body instead of the URL. Use this for a sensitive field: the value travels in the body and never appears in the URL. Body equivalent of the type/field/value lookup on GET /v1/entities/{namespace}, which rejects sensitive-field values and directs you here. Requires the entities:r:<namespace> scope.
    • getEntityVersions

      public ModelDataVersionPage getEntityVersions(String namespace, String id)
      Returns the audit trail of changes made to an entity, newest first. Sensitive field values are redacted in the history. Requires the entities:r:<namespace> scope.
    • getEntityVersions

      public ModelDataVersionPage getEntityVersions(String namespace, String id, RequestOptions requestOptions)
      Returns the audit trail of changes made to an entity, newest first. Sensitive field values are redacted in the history. Requires the entities:r:<namespace> scope.
    • getEntityVersions

      public ModelDataVersionPage getEntityVersions(String namespace, String id, GetEntityVersionsRequest request)
      Returns the audit trail of changes made to an entity, newest first. Sensitive field values are redacted in the history. Requires the entities:r:<namespace> scope.
    • getEntityVersions

      public ModelDataVersionPage getEntityVersions(String namespace, String id, GetEntityVersionsRequest request, RequestOptions requestOptions)
      Returns the audit trail of changes made to an entity, newest first. Sensitive field values are redacted in the history. Requires the entities:r:<namespace> scope.
    • getNamespace

      public NamespaceResponse getNamespace(String namespace)
      Retrieves a single scope-namespace registration by name. The reserved built-ins org and client are always resolvable.
    • getNamespace

      public NamespaceResponse getNamespace(String namespace, RequestOptions requestOptions)
      Retrieves a single scope-namespace registration by name. The reserved built-ins org and client are always resolvable.
    • getNamespace

      public NamespaceResponse getNamespace(String namespace, GetNamespaceRequest request)
      Retrieves a single scope-namespace registration by name. The reserved built-ins org and client are always resolvable.
    • getNamespace

      public NamespaceResponse getNamespace(String namespace, GetNamespaceRequest request, RequestOptions requestOptions)
      Retrieves a single scope-namespace registration by name. The reserved built-ins org and client are always resolvable.
    • updateNamespace

      public NamespaceResponse updateNamespace(String namespace, UpdateNamespaceRequest request)
      Updates the mutable fields (entityBacked, defaultSchemaId, specificityRank) of a registered namespace. The namespace name itself is immutable. Requires a root API key. The reserved built-ins cannot be updated.
    • updateNamespace

      public NamespaceResponse updateNamespace(String namespace, UpdateNamespaceRequest request, RequestOptions requestOptions)
      Updates the mutable fields (entityBacked, defaultSchemaId, specificityRank) of a registered namespace. The namespace name itself is immutable. Requires a root API key. The reserved built-ins cannot be updated.
    • deleteNamespace

      public void deleteNamespace(String namespace)
      Deletes a registered scope namespace. Requires a root API key. The reserved built-ins cannot be deleted. A namespace that still has entities cannot be deleted (409) — delete its entities first; this keeps them reachable by the account-teardown and erasure sweeps.
    • deleteNamespace

      public void deleteNamespace(String namespace, RequestOptions requestOptions)
      Deletes a registered scope namespace. Requires a root API key. The reserved built-ins cannot be deleted. A namespace that still has entities cannot be deleted (409) — delete its entities first; this keeps them reachable by the account-teardown and erasure sweeps.
    • deleteNamespace

      public void deleteNamespace(String namespace, DeleteNamespaceRequest request)
      Deletes a registered scope namespace. Requires a root API key. The reserved built-ins cannot be deleted. A namespace that still has entities cannot be deleted (409) — delete its entities first; this keeps them reachable by the account-teardown and erasure sweeps.
    • deleteNamespace

      public void deleteNamespace(String namespace, DeleteNamespaceRequest request, RequestOptions requestOptions)
      Deletes a registered scope namespace. Requires a root API key. The reserved built-ins cannot be deleted. A namespace that still has entities cannot be deleted (409) — delete its entities first; this keeps them reachable by the account-teardown and erasure sweeps.
    • listNamespaces

      public NamespacePage listNamespaces()
      Returns the scope namespaces registered in your account, with the reserved built-ins org and client listed first. Returns a {data, nextCursor} envelope.
    • listNamespaces

      public NamespacePage listNamespaces(RequestOptions requestOptions)
      Returns the scope namespaces registered in your account, with the reserved built-ins org and client listed first. Returns a {data, nextCursor} envelope.
    • listNamespaces

      public NamespacePage listNamespaces(ListNamespacesRequest request)
      Returns the scope namespaces registered in your account, with the reserved built-ins org and client listed first. Returns a {data, nextCursor} envelope.
    • listNamespaces

      public NamespacePage listNamespaces(ListNamespacesRequest request, RequestOptions requestOptions)
      Returns the scope namespaces registered in your account, with the reserved built-ins org and client listed first. Returns a {data, nextCursor} envelope.
    • registerNamespace

      public NamespaceResponse registerNamespace(NamespaceRequest request)
      Registers a new scope namespace and declares whether its values resolve to identity entities (entityBacked). Also requires specificityRank, an explicit, account-unique position in the specificity order used to break recordType schema-resolution ties. Requires a root API key. The reserved names org and client are built in and cannot be registered.
    • registerNamespace

      public NamespaceResponse registerNamespace(NamespaceRequest request, RequestOptions requestOptions)
      Registers a new scope namespace and declares whether its values resolve to identity entities (entityBacked). Also requires specificityRank, an explicit, account-unique position in the specificity order used to break recordType schema-resolution ties. Requires a root API key. The reserved names org and client are built in and cannot be registered.
    • listUsers

      public UserPage listUsers()
      Returns a paginated list of the users in your account. Pass externalId to look up a single user by your own identifier. To filter on schema-declared lookup fields, supply type and field together with one lookup mode: value (exact match), from+to (range), or prefix. Requires the users:r scope.
    • listUsers

      public UserPage listUsers(RequestOptions requestOptions)
      Returns a paginated list of the users in your account. Pass externalId to look up a single user by your own identifier. To filter on schema-declared lookup fields, supply type and field together with one lookup mode: value (exact match), from+to (range), or prefix. Requires the users:r scope.
    • listUsers

      public UserPage listUsers(ListUsersRequest request)
      Returns a paginated list of the users in your account. Pass externalId to look up a single user by your own identifier. To filter on schema-declared lookup fields, supply type and field together with one lookup mode: value (exact match), from+to (range), or prefix. Requires the users:r scope.
    • listUsers

      public UserPage listUsers(ListUsersRequest request, RequestOptions requestOptions)
      Returns a paginated list of the users in your account. Pass externalId to look up a single user by your own identifier. To filter on schema-declared lookup fields, supply type and field together with one lookup mode: value (exact match), from+to (range), or prefix. Requires the users:r scope.
    • createUser

      public UserResponse createUser(UserRequest body)
      Creates a user identity in your account. The operation is idempotent on externalId: if a user with the same externalId already exists, the existing record is returned instead of creating a duplicate. The response's created field (and the HTTP status — 201 when created, 200 when an existing user was returned) tells the two apart. To overwrite an existing user's mutable fields (email, status, payload, schema binding) instead of returning it unchanged, set ?upsert=true (this also requires the users:u scope). Requires the users:c scope to create. Being returned the existing user on a collision is a read of that user's data and additionally requires the users:r scope — a credential holding users:c alone receives a 400 ("already exists") on collision instead of the user.
    • createUser

      public UserResponse createUser(UserRequest body, RequestOptions requestOptions)
      Creates a user identity in your account. The operation is idempotent on externalId: if a user with the same externalId already exists, the existing record is returned instead of creating a duplicate. The response's created field (and the HTTP status — 201 when created, 200 when an existing user was returned) tells the two apart. To overwrite an existing user's mutable fields (email, status, payload, schema binding) instead of returning it unchanged, set ?upsert=true (this also requires the users:u scope). Requires the users:c scope to create. Being returned the existing user on a collision is a read of that user's data and additionally requires the users:r scope — a credential holding users:c alone receives a 400 ("already exists") on collision instead of the user.
    • createUser

      public UserResponse createUser(CreateUserRequest request)
      Creates a user identity in your account. The operation is idempotent on externalId: if a user with the same externalId already exists, the existing record is returned instead of creating a duplicate. The response's created field (and the HTTP status — 201 when created, 200 when an existing user was returned) tells the two apart. To overwrite an existing user's mutable fields (email, status, payload, schema binding) instead of returning it unchanged, set ?upsert=true (this also requires the users:u scope). Requires the users:c scope to create. Being returned the existing user on a collision is a read of that user's data and additionally requires the users:r scope — a credential holding users:c alone receives a 400 ("already exists") on collision instead of the user.
    • createUser

      public UserResponse createUser(CreateUserRequest request, RequestOptions requestOptions)
      Creates a user identity in your account. The operation is idempotent on externalId: if a user with the same externalId already exists, the existing record is returned instead of creating a duplicate. The response's created field (and the HTTP status — 201 when created, 200 when an existing user was returned) tells the two apart. To overwrite an existing user's mutable fields (email, status, payload, schema binding) instead of returning it unchanged, set ?upsert=true (this also requires the users:u scope). Requires the users:c scope to create. Being returned the existing user on a collision is a read of that user's data and additionally requires the users:r scope — a credential holding users:c alone receives a 400 ("already exists") on collision instead of the user.
    • getUser

      public UserResponse getUser(String id)
      Retrieves a single user by its Vectros-assigned ID. Requires the users:r scope.
    • getUser

      public UserResponse getUser(String id, RequestOptions requestOptions)
      Retrieves a single user by its Vectros-assigned ID. Requires the users:r scope.
    • getUser

      public UserResponse getUser(String id, GetUserRequest request)
      Retrieves a single user by its Vectros-assigned ID. Requires the users:r scope.
    • getUser

      public UserResponse getUser(String id, GetUserRequest request, RequestOptions requestOptions)
      Retrieves a single user by its Vectros-assigned ID. Requires the users:r scope.
    • updateUser

      public UserResponse updateUser(String id, UpdateUserRequest request)
      Updates mutable fields on an existing user (such as email, status, payload, or schema binding). The type field is immutable after creation. This endpoint also activates an invited user: a PUT that moves a PENDING user to ACTIVE and carries inviteToken, externalSubject, and emailVerifiedAttestation=true completes the invitation. Requires the users:u scope.
    • updateUser

      public UserResponse updateUser(String id, UpdateUserRequest request, RequestOptions requestOptions)
      Updates mutable fields on an existing user (such as email, status, payload, or schema binding). The type field is immutable after creation. This endpoint also activates an invited user: a PUT that moves a PENDING user to ACTIVE and carries inviteToken, externalSubject, and emailVerifiedAttestation=true completes the invitation. Requires the users:u scope.
    • deleteUser

      public void deleteUser(String id)
      Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the users:d scope.
    • deleteUser

      public void deleteUser(String id, RequestOptions requestOptions)
      Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the users:d scope.
    • deleteUser

      public void deleteUser(String id, DeleteUserRequest request)
      Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the users:d scope.
    • deleteUser

      public void deleteUser(String id, DeleteUserRequest request, RequestOptions requestOptions)
      Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the users:d scope.
    • lookupUsers

      public UserPage lookupUsers(IdentityLookupRequest request)
      Looks up users by a schema lookup field, with the query criteria carried in the request body rather than the URL. Use this when looking up by a sensitive (blind-indexed) field: the value is blind-indexed server-side and never appears in the URL, request logs, or proxies. The query semantics are identical to the GET /v1/users lookup, which rejects sensitive-field values and directs you here. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.
    • lookupUsers

      public UserPage lookupUsers(IdentityLookupRequest request, RequestOptions requestOptions)
      Looks up users by a schema lookup field, with the query criteria carried in the request body rather than the URL. Use this when looking up by a sensitive (blind-indexed) field: the value is blind-indexed server-side and never appears in the URL, request logs, or proxies. The query semantics are identical to the GET /v1/users lookup, which rejects sensitive-field values and directs you here. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.
    • getUserVersions

      public ModelDataVersionPage getUserVersions(String id)
      Returns the audit trail of changes to a user, most recent first. Identity history is always recorded and always available. Sensitive field values are redacted in every historical version. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.
    • getUserVersions

      public ModelDataVersionPage getUserVersions(String id, RequestOptions requestOptions)
      Returns the audit trail of changes to a user, most recent first. Identity history is always recorded and always available. Sensitive field values are redacted in every historical version. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.
    • getUserVersions

      public ModelDataVersionPage getUserVersions(String id, GetUserVersionsRequest request)
      Returns the audit trail of changes to a user, most recent first. Identity history is always recorded and always available. Sensitive field values are redacted in every historical version. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.
    • getUserVersions

      public ModelDataVersionPage getUserVersions(String id, GetUserVersionsRequest request, RequestOptions requestOptions)
      Returns the audit trail of changes to a user, most recent first. Identity history is always recorded and always available. Sensitive field values are redacted in every historical version. Returns a page in the {data, nextCursor} envelope. Requires the users:r scope.