Skip to main content

Manage Group IDs

This page provides guidance for managing group IDs if they are enabled on your key-value collection.

List Group IDs

To list all group IDs in a collection:

  1. Follow the instructions to Run a Query in the Console or Run a Query with the CLI.

  2. Run the following query:

    FOR doc IN @@collectionName
    COLLECT groups = doc.groupID
    LIMIT @offset, @limit
    RETURN groups

Update Group IDs

To update all key-value pairs belonging to old groupID with new groupID in a collection:

  1. Follow the instructions to Run a Query in the Console or Run a Query with the CLI.

  2. Run the following query:

     FOR doc IN @@collectionName
    FILTER doc.groupID == @oldGroupID
    UPDATE doc._key WITH {groupID: @newGroupID} IN @@collectionName RETURN doc._key