# Get user's namespaces


[API catalog](/reference/api/) · [Publisher analytics overview](/reference/api/dvp/latest/) · [Product manual](https://docs.docker.com/docker-hub/repos/manage/trusted-content/insights-analytics/) · [OpenAPI specification](/reference/api/dvp/latest.yaml)

API version: 1.0.0



`GET /namespaces`

Get metadata associated with the namespaces the user has access to, including extra repos associated with the namespaces.

## Connection and access

[API connection and authentication guidance](/reference/api/dvp/latest/#authentication)


Server: `https://hub.docker.com/api/publisher/analytics/v1`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "HubAuth": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/api/publisher/analytics/v1/namespaces'
```

## Parameters

## Request and responses

### Response 200 application/json

Success


Schema:

```json
{
  "items": {
    "$ref": "#/components/schemas/NamespaceMetadata"
  },
  "type": "array"
}
```




publishers:
```json
[
  {
    "datasets": [
      {
        "name": "pulls",
        "timespans": [
          "months",
          "weeks"
        ],
        "views": [
          "raw",
          "summary",
          "repo-summary",
          "namespace-summary",
          "geo-repo-summary"
        ]
      }
    ],
    "extensionPublisher": false,
    "extraRepos": null,
    "namespace": "org1",
    "publisherType": "DVP"
  }
]
```


### Response 401 

Authentication failed or second factor required

No response content is declared.






## Complete operation contract

```json
{
  "description": "Get metadata associated with the namespaces the user has access to, including extra repos associated with the namespaces.",
  "operationId": "getUserNamespaces",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "examples": {
            "publishers": {
              "summary": "Namespace metadata",
              "value": [
                {
                  "datasets": [
                    {
                      "name": "pulls",
                      "timespans": [
                        "months",
                        "weeks"
                      ],
                      "views": [
                        "raw",
                        "summary",
                        "repo-summary",
                        "namespace-summary",
                        "geo-repo-summary"
                      ]
                    }
                  ],
                  "extensionPublisher": false,
                  "extraRepos": null,
                  "namespace": "org1",
                  "publisherType": "DVP"
                }
              ]
            }
          },
          "schema": {
            "items": {
              "$ref": "#/components/schemas/NamespaceMetadata"
            },
            "type": "array"
          }
        }
      },
      "description": "Success"
    },
    "401": {
      "description": "Authentication failed or second factor required"
    }
  },
  "summary": "Get user's namespaces",
  "tags": [
    "discovery"
  ]
}
```

## Referenced schemas

- [#/components/schemas/NamespaceMetadata](/reference/api/dvp/latest/schemas/NamespaceMetadata/)




