# Get a schema


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`GET /v2/scim/2.0/Schemas/{id}`

Returns a schema by ID.


## Connection and access

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


Server: `https://hub.docker.com`

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

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

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${SCIM_TOKEN}" \
  --header 'Accept: application/scim+json' \
  'https://hub.docker.com/v2/scim/2.0/Schemas/urn:ietf:params:scim:schemas:core:2.0:User'
```

## Parameters

### id

Location: path. Required: yes.

URN identifying the SCIM schema.

```json
{
  "description": "URN identifying the SCIM schema.",
  "example": "urn:ietf:params:scim:schemas:core:2.0:User",
  "in": "path",
  "name": "id",
  "pointer": "/paths/~1v2~1scim~12.0~1Schemas~1{id}/get/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/scim+json




Schema:

```json
{
  "$ref": "#/components/schemas/scim_schema"
}
```




Schema example:
```json
{
  "attributes": [],
  "description": "User Account",
  "id": "urn:ietf:params:scim:schemas:core:2.0:User",
  "name": "User",
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Schema"
  ]
}
```


### Response 401 application/scim+json

Unauthorized


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "401"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "401"
}
```


### Response 404 application/scim+json

Not Found


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "404"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "404"
}
```


### Response 500 application/scim+json

Internal Error


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "500"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "500"
}
```


## Complete operation contract

```json
{
  "description": "Returns a schema by ID.\n",
  "operationId": "getV2Scim20SchemasById",
  "parameters": [
    {
      "description": "URN identifying the SCIM schema.",
      "example": "urn:ietf:params:scim:schemas:core:2.0:User",
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "$ref": "#/components/responses/scim_get_schema_resp"
    },
    "401": {
      "$ref": "#/components/responses/scim_unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/scim_not_found"
    },
    "500": {
      "$ref": "#/components/responses/scim_error"
    }
  },
  "security": [
    {
      "scimToken": []
    }
  ],
  "summary": "Get a schema",
  "tags": [
    "scim"
  ]
}
```

## Referenced schemas

- `#/components/responses/scim_error`

- `#/components/responses/scim_get_schema_resp`

- `#/components/responses/scim_not_found`

- `#/components/responses/scim_unauthorized`




