Skip to main content

List DIDs

Returns a list of DIDs within an organization. Use the optional parameters to filter and sort.

Function

getDids(query: DidListQuery): Promise<ItemList<DidListItem>>

Parameters

export interface DidListQuery extends ListQuery {
sort?: SortableDidColumnEnum;
sortDirection?: SortDirection;
name?: string;
did?: string;
type?: DidTypeEnum;
deactivated?: boolean;
exact?: ExactDidFilterColumnEnum[];
keyAlgorithms?: string[];
keyStorages?: string[];
keyRoles?: KeyRoleEnum[];
}
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.

  • 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]
  • organisationId - Value from create organization.

  • name - Return only DIDs with names starting with this string. Not case-sensitive.

  • did - Return only DIDs with addresses starting with this string. Not case-sensitive.

  • type - Filter by DIDs created locally or DIDs of remote wallets from credentials issued or proofs requested.

    • [REMOTE, LOCAL]
  • deactivated - Filter by active or deactivated DIDs.

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

    • [NAME, DID]
  • keyAlgorithms - Return only DIDs which support the key algorithm(s) specified here. Uses values from the configuration.

  • keyStorages - Return only DIDs which support the key storage(s) specified here.

  • keyRoles - Return only DIDs which have at least one key in the role(s) specified here. See the keys object guide.

    • [AUTHENTICATION, ASSERTION_METHOD, KEY_AGREEMENT, CAPABILITY_INVOCATION, CAPABILITY_DELEGATION]

Return value

export interface ItemList<Item> {
totalItems: number;
totalPages: number;
values: Item[];
}
export interface DidListItem {
id: string;
createdDate: string;
lastModified: string;
name: string;
did: string;
didType: DidTypeEnum;
didMethod: string;
deactivated: boolean;
}