b2_list_groups
    • Dark
      Light

    b2_list_groups

    • Dark
      Light

    Article Summary

    Post
    /b2api/v3/b2_list_groups

    Lists active Groups for an authorized Group admin.

    A single Group admin can administer a maximum of 500 groups.

    Header parameters
    Authorization
    stringRequired

    An account authorization token, obtained from b2_authorize_account.

    Body parameters
    object
    adminAccountId
    string Required

    The accountId of the Group admin. This account must be authorized for the Partner API.

    ExampleADMIN_ACCOUNT_ID
    groupName
    string

    The name of a Group, which may or may not be unique.

    When groupName is specified, the result will be a list of active Groups matching this Group name for which the accountId is an ACCEPTED Group admin, or no Groups if the account does not have any Groups with this name or the Group admin accountId is not an ACCEPTED Group admin for the Group. If multiple Groups have the same name, all Groups with that name will be returned.

    ExamplePartner Group 2
    startGroupId
    integer

    If the starting groupId is provided, the search will begin with this startGroupId. If startGroupId is not provided, then the search will begin with the first Group.

    Example234
    maxGroupCount
    integer

    If provided, the number of Groups to return expressed as an integer between 1 and 100. Defaults to 100. If more Groups exist, the response's nextGroupId will be populated with a startGroupId suitable for us in a subsequent query. Providing a startGroupId and a maxGroupCount of 1 will return just the Group with the startGroupId.

    Example100
    Responses
    200

    The request succeeded.

    Array of object
    object
    accountId
    string

    The accountId for the Group member.

    ExampleYOUR_ACCOUNT_ID
    groups
    Array of object

    The list of matching Groups (see below).

    Example[ { "accountStandingDetails": { "state": "B2_GOOD_STANDING" }, "b2Stats": { "b2BytesStoredCount": 0, "b2FilesStoredCount": 0, "b2StatsAsOfTimestamp": "null", "bucketCount": 0 }, "groupId": "254", "groupName": "Partner Group 2", "groupProducts": [ "STORAGE", "BACKUP" ], "groupStats": { "createdTimestamp": "d20210816_m203806", "groupStatsAsOfTimestamp": "d20210829_m090056", "memberCount": 0 } } ]
    object
    accountStandingDetails
    object

    The structure reflecting the Group's account standing.

    state
    string
    ExampleB2_GOOD_STANDING
    b2Stats
    object

    The structure for Backblaze B2 statistics if the Group has the Backblaze B2 product enabled, generated once a day.

    b2BytesStoredCount
    integer
    Example0
    b2FilesStoredCount
    integer
    Example0
    b2StatsAsOfTimestamp
    string
    Examplenull
    bucketCount
    integer
    Example0
    groupId
    string

    The unique ID of the Group for which the new account was added as a Group member.

    groupName
    string

    The Group name of the Group from which the account was ejected.

    groupProducts
    Array of string

    A set of: BACKUP, STORAGE, or other values added in the future. BACKUP means that personal backups are enabled for Group members. STORAGE means that Group members will have Backblaze B2 Cloud Storage enabled.

    string
    groupStats
    object

    The structure for Group statistics generated once a day.

    createdTimestamp
    string

    Timestamp for when the Group was created.

    groupStatsAsOfTimestamp
    string

    Timestamp for the last update to the Group's stats.

    memberCount
    integer

    The total number of ACCEPTED members in the Group.

    nextGroupId
    string

    This field is set when the query matches more than the maximum number of Groups for a single response. Use the value as startGroupId in a subsequent b2_list_groups call to retrieve the next list of Groups.

    ExamplePartner Group 2
    400
    statuscodedescription
    400bad_requestThe request had the wrong fields or illegal values. The message returned with the error will describe the problem.
    object
    status
    integer

    The numeric HTTP status code. Always matches the status in the HTTP response.

    Example400
    code
    string

    A single-identifier code that identifies the error.

    Exampleinvalid_bucket_name
    message
    string

    A human-readable message, in English, saying what went wrong.

    Examplebucket name is too long
    401
    statuscodedescription
    401invalid_group_idThe groupId is invalid, the Group has been deleted, the Group admin is not a Group admin for the Group.
    401unauthorizedThe auth token used is valid, but does not authorize this call with these parameters. The capabilities of an auth token are determined by the Application Key used with b2_authorize_account.
    401bad_auth_tokenThe auth token used is not valid. Call b2_authorize_account again to either get a new one, or an error message describing the problem.
    401expired_auth_tokenThe auth token used has expired. Call b2_authorize_account again to get a new one.

    Was this article helpful?