List the Containers in the Account

To list the containers in an account, send a GET request to the account.

  1. To send REST API calls to Object Storage Classic, you need a valid authentication token. If you obtained a token less than 30 minutes ago, then you can use that token. Otherwise, get a new token as described in Get an Authentication Token.
  2. Send a GET call to the account. Specify the authentication token in the X-Auth-Token header.

    Syntax

    curl -X GET \
      {accountRestEndpointURL} \
      -H 'x-auth-token: {authToken}'

    Sample Command

    curl -X GET \
      https://myaccount.ocm.rack01.example.com/v1/Storage-myaccount \
      -H 'x-auth-token: AUTH_tk10d7cf10041726fa2e64652d975bbab0'
  3. The output is a list of the containers in the account.