Hierarchy

  • SchemasService

Constructors

Methods

  • Create a schema To model your event-driven architecture, schemas are a fundamental building block for modelling the payloads of the events flowing through your system. Use this API to create schemas that can later be referenced by events.

    Token Permissions: [ schema:create:* ]

    Returns

    SchemaResponse Created a schema. The newly saved schema is returned in the response body.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          requestBody: SchemaObject;
          xContextId?: string;
      }
      • requestBody: SchemaObject

        The schema requires a name, an application domain, a schema type and a content type. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaResponse>

  • Create a schema version Creates a schema version

    Token Permissions: [ schema:update:* ]

    Returns

    SchemaVersionResponse Created a schema version. The newly saved schema version is returned in the response body.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          requestBody: SchemaVersion;
          xContextId?: string;
      }
      • requestBody: SchemaVersion

        schema version details *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaVersionResponse>

  • Delete a schema Use this API to delete a schema. The schema must not be in use by any events else it cannot be deleted.

    Token Permissions: [ schema:delete:* ]

    Returns

    void

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          id: string;
          xContextId?: string;
      }
      • id: string

        The ID of the schema. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<void>

  • Delete a schema version Use this API to delete a schema version.

    Token Permissions: [ schema:update:* ]

    Returns

    void

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          id: string;
          xContextId?: string;
      }
      • id: string

        The ID of the schema version. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<void>

  • Get a schema Use this API to get a single schema by its ID.

    Token Permissions: [ schema:get:* ]

    Returns

    SchemaResponse The schema.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          id: string;
          xContextId?: string;
      }
      • id: string

        The ID of the schema. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaResponse>

  • Get a schema version Use this API to get a single schema version by its ID.

    Token Permissions: [ schema:get:* ]

    Returns

    SchemaVersionResponse The schema version.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          versionId: string;
          xContextId?: string;
      }
      • versionId: string

        The ID of the schema version. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaVersionResponse>

  • Get a list of schema versions Use this API to get a list of schema versions that match the given parameters.

    Token Permissions: [ event_designer:access ]

    Returns

    SchemaVersionsResponse Get a list of schema versions and the accompanying metadata.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          customAttributes?: string;
          ids?: string[];
          pageNumber?: number;
          pageSize?: number;
          schemaIds?: string[];
          xContextId?: string;
      }
      • Optional customAttributes?: string

        Returns the entities that match the custom attribute filter.
        To filter by custom attribute name and value, use the format: customAttributes=<custom-attribute-name>==<custom-attribute-value>.
        To filter by custom attribute name, use the format: customAttributes=<custom-attribute-name>.
        The filter supports the AND operator for multiple custom attribute definitions (not multiple values for a given definition). Use ; (semicolon) to separate multiple queries with AND operation.
        Note: the filter supports custom attribute values containing only the characters [a-zA-Z0-9_\-\. ]. *

      • Optional ids?: string[]

        Match only schema versions with the given IDs, separated by commas. *

      • Optional pageNumber?: number

        The page number to get. *

      • Optional pageSize?: number

        The number of schema versions to get per page. *

      • Optional schemaIds?: string[]

        Match only schema versions of these schema IDs, separated by commas. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaVersionsResponse>

  • Get a list of schemas Use this API to get a list of schemas that match the given parameters.

    Token Permissions: [ event_designer:access ]

    Returns

    SchemasResponse Get a list of schemas and the accompanying metadata.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          applicationDomainId?: string;
          applicationDomainIds?: string[];
          customAttributes?: string;
          ids?: string[];
          name?: string;
          pageNumber?: number;
          pageSize?: number;
          schemaType?: string;
          shared?: boolean;
          sort?: string;
          xContextId?: string;
      }
      • Optional applicationDomainId?: string

        Match only schemas in the given application domain. *

      • Optional applicationDomainIds?: string[]

        Match only schemas in the given application domain ids. *

      • Optional customAttributes?: string

        Returns the entities that match the custom attribute filter.
        To filter by custom attribute name and value, use the format: customAttributes=<custom-attribute-name>==<custom-attribute-value>.
        To filter by custom attribute name, use the format: customAttributes=<custom-attribute-name>.
        The filter supports the AND operator for multiple custom attribute definitions (not multiple values for a given definition). Use ; (semicolon) to separate multiple queries with AND operation.
        Note: the filter supports custom attribute values containing only the characters [a-zA-Z0-9_\-\. ]. *

      • Optional ids?: string[]

        Match only schemas with the given IDs separated by commas. *

      • Optional name?: string

        Name of the schema to match on. *

      • Optional pageNumber?: number

        The page number to get. *

      • Optional pageSize?: number

        The number of schemas to get per page. *

      • Optional schemaType?: string

        Match only schemas with the given schema type *

      • Optional shared?: boolean

        Match only with shared or unshared schemas. *

      • Optional sort?: string

        Sort based on the provided parameters.
        The value can be either a standalone field name (?sort=<field>) or a field and direction, delimited by a colon (?sort=<field>:<asc|desc>). If the direction is not specified, the default is ascending. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemasResponse>

  • Update a schema Update a schema.

    Token Permissions: [ schema:update:* ]

    Returns

    SchemaResponse Updated a schema. The newly saved schema is returned in the response body.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          id: string;
          requestBody: SchemaObject;
          xContextId?: string;
      }
      • id: string

        The ID of the schema. *

      • requestBody: SchemaObject

        The schema requires a name, an application domain, a schema type and a content type. *

      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaResponse>

  • Update a schema version Use this API to update a schema version.

    Token Permissions: [ schema:update:* ]

    Returns

    SchemaVersionResponse The schema version.

    Throws

    ApiError

    Parameters

    • __namedParameters: {
          id: string;
          requestBody: SchemaVersion;
          xContextId?: string;
      }
      • id: string

        The ID of the schema version. *

      • requestBody: SchemaVersion
      • Optional xContextId?: string

        Optional context id the request is running. *

    Returns CancelablePromise<SchemaVersionResponse>