Skip to main content
Skip to main content

update - API Key Module Reference

This documentation provides a reference to the update method. This belongs to the API Key Module.

update(id, data, sharedContext?): Promise<ApiKeyDTO>

This method updates an existing API key.

Example

const apiKey = await apiKeyModuleService.update("apk_123", {
title: "My development key"
})

Parameters

idstringRequired
The ID of the API key.
dataUpdateApiKeyDTORequired
The attributes to update in the API key.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ApiKeyDTO>Required
The updated API key.

update(selector, data, sharedContext?): Promise<ApiKeyDTO[]>

This method updates existing API keys.

Example

const apiKey = await apiKeyModuleService.update(
{
title: "Development key",
},
{
title: "My development key",
}
)

Parameters

selectorFilterableApiKeyPropsRequired
The filters that specify which API keys should be updated.
dataUpdateApiKeyDTORequired
The attributes to update in the API keys.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ApiKeyDTO[]>Required
The updated API keys.
Was this section helpful?