Skip to main content

List proof schemas

Returns a list of proof schemas. Use the optional parameters to filter and sort.

Function

getProofSchemas(
query: ProofSchemaListQuery
): Promise<ItemList<ProofSchemaListItem>>

Parameters

export interface ProofSchemaListQuery extends ListQuery {
sort?: SortableProofSchemasColumnEnum;
sortDirection?: SortDirection;
name?: string;
exact?: ExactProofSchemaFilterColumnEnum[];
ids?: string[];
}
export interface ListQuery {
page: number;
pageSize: number;
organisationId: string;
}

Fields

  • page - Returns a specific page of the results. The first page is 0.

  • pageSize - Specify how many items appear on each page.

  • organisationId - Value from create organization.

  • sorting - If no sorting values are provided, CREATED_DATE + DESCENDING are used. If a value is passed for sort, the default direction becomes ASCENDING.

    • sort - Sort by certain values in the response body.

      • [CREATED_DATE, SCHEMA_NAME, ISSUER_DID, STATE]
    • sortDirection - Default value = DESCENDING.

      • [ASCENDING, DESCENDING]
  • name - Return proof schemas whose name starts with this string. Not case-sensitive.

  • exact - Set which filters apply in an exact way.

    • [NAME]
  • ids - Specify proof schemas to be returned by their UUID.

Return value

export interface ItemList<Item> {
totalItems: number;
totalPages: number;
values: Item[];
}
export interface ProofSchemaListItem {
id: string;
createdDate: string;
lastModified: string;
deletedAt: string;
name: string;
expireDuration: number;
}

Fields

  • expireDuration - The length of storage of received proofs, in seconds. After the defined duration, the received proof and its data are deleted from the system. If 0, the proofs received when using this proof schema will not be deleted.