Skip to main content

Get history list

Returns event history of entities in the system. Use the optional parameters to filter.

Function

getHistory(query: HistoryListQuery): Promise<ItemList<HistoryListItem>>

Parameters

export interface ListQuery {
page: number;
pageSize: number;
organisationId: string;
}
export interface HistoryListQuery extends ListQuery {
entityId?: string;
action?: HistoryActionEnum;
entityTypes?: HistoryEntityTypeEnum[];
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
createdDateFrom?: string;
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
createdDateTo?: string;
didId?: string;
credentialId?: string;
credentialSchemaId?: string;
searchText?: string;
searchType?: HistorySearchTypeEnum;
}

Fields

Required parameters

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

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

  • organisationId - Specify the organization ID.

Optional parameters

  • entityId - Filter by UUID of an entity.

  • action - Filter by event.

    • [ACCEPTED, CREATED, DEACTIVATED, DELETED, ERRORED, ISSUED, OFFERED, REACTIVATED, REJECTED, REQUESTED, REVOKED, PENDING, SUSPENDED, RESTORED]
  • entityTypes - Filter by entity type.

    • [KEY, DID, CREDENTIAL, CREDENTIAL_SCHEMA, PROOF, PROOF_SCHEMA, ORGANISATION, BACKUP]
  • createdDateFrom - Return event history after this time.

    • RFC3339 format, e.g.: 2023-06-09T14:19:57.000Z
  • createdDateTo - Return event history before this time.

    • RFC3339 format, e.g.: 2023-06-09T14:19:57.000Z
  • didId - Only return history entries associated with the provided DID.

  • credentialId - Only return history entries associated with the provided credential identifier.

  • credentialSchemaId - Only return history entries associated with the provided credential schema.

History search:

  • searchText - Search for a string.

  • searchType - Search a particular column in the database. If no value is provided, all columns are searched.

    • [claimName, claimValue, credentialSchemaName, issuerDid, issuerName, verifierDid, verifierName]

Return value

export interface ItemList<Item> {
totalItems: number;
totalPages: number;
values: Item[HistoryListItem];
}
export interface HistoryListItem {
id: string;
createdDate: string;
action: HistoryActionEnum;
entityId?: string;
entityType: HistoryEntityTypeEnum;
organisationId: string;
metadata?: HistoryMetadata | null;
}