Update Shard Key for Users, Enterprises, or Enterprise Templates.

post/api/v2/admin/updateshardkey

This operation allows setting or unsetting the shard key for specified documents based on their IDs and collection type.

Permissions required:

  • updateUser
  • updateEnterprise
  • updateEnterpriseTemplate

Request Body

shardKey string required
Shardkey value for which to set the collections.
Allowed values: bitgoKorea unset
collectionType string required
The type of IDs provided (user, enterprise, enterpriseTemplate)
Allowed values: user enterprise enterpriseTemplate
ids array[string] required
The IDs to migrate. They are all treated as being of the same collectionType
enterpriseUpdateUsers
boolean or null
required
True, if an updated enterprise should also update all enterprise users.
Default: true

200 Response

migrated array[object] required
The IDs that were successfully migrated. Deduplicated.
id string required
Min length: >= 1 characters

400 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id