metadata.findMulti()

Retrieves Metadata of multiple Group or User entities within a single Organization.

Definition

client.metadata.findMulti(
entityIds: Array<string|Group|User>,
organizationId: string
):Promise<Object<string, Metadata>,Error>

Parameters

ParameterTypeDescription
entityIdsArray<string|Group|User>The entities that metadata should be fetched for
organizationIdstringThe Organization of the entity that the metadata is associated with; entities may have different metadata per organization

Returns

An error will be thrown if any of the arguments are invalid.

Once the returned Promise is resolved, we will have access to an Object whose keys are IDs and values are Metadata objects. If metadata is not found for an entity, its entry will be omitted from the returned object.

Examples

const resultMap = await client.metadata.findMulti(
['some-group-id', 'some-group-id-2', 'some-user-id'],
'some-org-id'
);
console.log('metadata for some-group-id: ', resultMap['some-group-id']);
console.log('metadata for some-group-id-2: ', resultMap['some-group-id-2']);
console.log('metadata for some-user-id: ', resultMap['some-user-id']);