> ## 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 Endpoint

> Get an API endpoint by ID or fully qualified name

# Retrieve an API Endpoint

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

## Get by ID

**id** `string` *required*

UUID of the API endpoint 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/apiEndpoints/name/{fqn}` to retrieve by fully qualified name.

**fqn** `string` *required*

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

**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/apiEndpoints/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import APIEndpoints

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

# Get by ID
ep = APIEndpoints.retrieve("1f61427a-4a64-4070-9ac8-1d29302dac7c")
print(f"{ep.fullyQualifiedName.root}: {ep.name.root}")

# Get by ID with fields
ep = APIEndpoints.retrieve(
    "1f61427a-4a64-4070-9ac8-1d29302dac7c",
    fields=["owners", "tags"]
)

# Get by fully qualified name
ep = APIEndpoints.retrieve_by_name("sample_api_service.pet.addPet")

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

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

// client is an initialized OpenMetadataClient.

// Get by ID
APIEndpoint ep = client.apiEndpoints().get("1f61427a-4a64-4070-9ac8-1d29302dac7c");

// Get by ID with fields
APIEndpoint epWithFields = client.apiEndpoints().get(
    "1f61427a-4a64-4070-9ac8-1d29302dac7c",
    "owners,tags"
);

// Get by fully qualified name
APIEndpoint epByName = client.apiEndpoints().getByName(
    "sample_api_service.pet.addPet"
);

// Get by name with fields
APIEndpoint epByNameWithFields = client.apiEndpoints().getByName(
    "sample_api_service.pet.addPet",
    "owners,tags,domains"
);
```

```bash GET /v1/apiEndpoints/{id} theme={null}
# Get by ID
curl "{base_url}/api/v1/apiEndpoints/1f61427a-4a64-4070-9ac8-1d29302dac7c" \
  -H "Authorization: Bearer {access_token}"

# Get by ID with fields
curl "{base_url}/api/v1/apiEndpoints/1f61427a-4a64-4070-9ac8-1d29302dac7c?fields=owners,tags,domains" \
  -H "Authorization: Bearer {access_token}"

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

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

```json Response theme={null}
{
  "id": "1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "name": "addPet",
  "displayName": "Add Pet",
  "fullyQualifiedName": "sample_api_service.pet.addPet",
  "description": "add a new pet",
  "version": 0.1,
  "updatedAt": 1769982733987,
  "updatedBy": "admin",
  "endpointURL": "https://petstore3.swagger.io/#/pet/addPet",
  "requestMethod": "POST",
  "requestSchema": {
    "schemaType": "JSON",
    "schemaFields": [
      {"name": "id", "dataType": "INT", "description": "ID of pet"}
    ]
  },
  "href": "http://localhost:8585/api/v1/apiEndpoints/1f61427a-4a64-4070-9ac8-1d29302dac7c",
  "owners": [],
  "tags": [],
  "service": {
    "id": "58d413a8-abc3-4a6d-bd8a-13a0234b1ff8",
    "type": "apiService",
    "name": "sample_api_service",
    "deleted": false
  },
  "serviceType": "Rest",
  "deleted": false,
  "domains": []
}
```

***

## Returns

Returns an API endpoint object with all requested fields populated.

## Response

**id** `string`

Unique identifier for the API endpoint (UUID format).

**name** `string`

API endpoint name.

**fullyQualifiedName** `string`

Fully qualified name in format `service.collection.endpointName`.

**displayName** `string`

Human-readable display name.

**description** `string`

Description of the API endpoint in Markdown format.

**endpointURL** `string`

URL for the API endpoint.

**requestMethod** `string`

HTTP request method (GET, POST, PUT, PATCH, DELETE).

**requestSchema** `object`

Schema describing the request body.

**properties**

**schemaType** `string`

Type of schema, for example JSON.

**schemaFields** `array`

Array of field definitions.

**responseSchema** `object`

Schema describing the response body.

**properties**

**schemaType** `string`

Type of schema, for example JSON.

**schemaFields** `array`

Array of field definitions.

**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.

**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 endpoint |
| `404` | `NOT_FOUND` | API endpoint with given ID or FQN does not exist |


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