List the Objects in a Container

To list the objects in a container, send a GET request to the container.

  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 request to the container. Specify the authentication token in the x-auth-token header.

    Syntax

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

    Sample Command

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