> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve an API Collection

> Get an API collection by ID or fully qualified name

# Retrieve an API Collection

Get a single API collection by its unique ID or fully qualified name.

## Get by ID

**id** `string` *required*

UUID of the API collection to retrieve.

**fields** `string`

Comma-separated list of fields to include, for example `owners,tags,extension,domains,sourceHash`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

## Get by Fully Qualified Name

Use `GET /v1/apiCollections/name/{fqn}` to retrieve by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the API collection, for example `sample_api_service.pet`.

**fields** `string`

Comma-separated list of fields to include: `owners`, `tags`, `extension`, `domains`, `sourceHash`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

```python GET /v1/apiCollections/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import APICollections

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Get by ID
ac = APICollections.retrieve("0f7ee81c-8163-4097-8adb-45c3d6c7b14b")
print(f"{ac.fullyQualifiedName.root}: {ac.name.root}")

# Get by ID with fields
ac = APICollections.retrieve(
    "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
    fields=["owners", "tags"]
)

# Get by fully qualified name
ac = APICollections.retrieve_by_name("sample_api_service.pet")

# Get by name with fields
ac = APICollections.retrieve_by_name(
    "sample_api_service.pet",
    fields=["owners", "tags", "domains"]
)
```

```java GET /v1/apiCollections/{id} theme={null}
import org.openmetadata.schema.entity.data.APICollection;

// client is an initialized OpenMetadataClient.

// Get by ID
APICollection ac = client.apiCollections().get("0f7ee81c-8163-4097-8adb-45c3d6c7b14b");

// Get by ID with fields
APICollection acWithFields = client.apiCollections().get(
    "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
    "owners,tags"
);

// Get by fully qualified name
APICollection acByName = client.apiCollections().getByName(
    "sample_api_service.pet"
);

// Get by name with fields
APICollection acByNameWithFields = client.apiCollections().getByName(
    "sample_api_service.pet",
    "owners,tags,domains"
);
```

```bash GET /v1/apiCollections/{id} theme={null}
# Get by ID
curl "{base_url}/api/v1/apiCollections/0f7ee81c-8163-4097-8adb-45c3d6c7b14b" \
  -H "Authorization: Bearer {access_token}"

# Get by ID with fields
curl "{base_url}/api/v1/apiCollections/0f7ee81c-8163-4097-8adb-45c3d6c7b14b?fields=owners,tags,domains" \
  -H "Authorization: Bearer {access_token}"

# Get by fully qualified name
curl "{base_url}/api/v1/apiCollections/name/sample_api_service.pet" \
  -H "Authorization: Bearer {access_token}"

# Get by name with fields
curl "{base_url}/api/v1/apiCollections/name/sample_api_service.pet?fields=owners,tags,domains" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "id": "0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "name": "pet",
  "fullyQualifiedName": "sample_api_service.pet",
  "version": 0.1,
  "updatedAt": 1769982733673,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet",
  "href": "http://localhost:8585/api/v1/apiCollections/0f7ee81c-8163-4097-8adb-45c3d6c7b14b",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "fullyQualifiedName": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}
```

***

## Returns

Returns an API collection object with all requested fields populated.

## Response

**id** `string`

Unique identifier for the API collection (UUID format).

**name** `string`

API collection name.

**fullyQualifiedName** `string`

Fully qualified name in format `service.collectionName`.

**displayName** `string`

Human-readable display name.

**description** `string`

Description of the API collection in Markdown format.

**endpointURL** `string`

Base URL for the API collection.

**service** `object`

Reference to the parent API service.

**properties**

**id** `string`

UUID of the API service.

**type** `string`

Type of entity (always `apiService`).

**name** `string`

Name of the API service.

**fullyQualifiedName** `string`

Fully qualified name of the API service.

**serviceType** `string`

Type of API service, for example Rest.

**version** `number`

Version number for the entity.

**owners** `array`

List of owners. Only included when `fields` contains `owners`.

**tags** `array`

Classification tags. Only included when `fields` contains `tags`.

**domains** `array`

Domain assignments. Only included when `fields` contains `domains`.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to view this API collection |
| `404` | `NOT_FOUND` | API collection with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.