# Get a concept's 1-hop relationships

Operation ID: `graph.getMedicalConceptRelationships`

Return the flat 1-hop edge table for a medical concept — its direct typed relationships to other concepts, filterable by direction, relationship type, and target vocabulary.

## Public method

`listMedicalConceptRelationships`

Signature: `graph.listMedicalConceptRelationships(conceptId, query)`

Return type: `Promise<MedicalConceptRelationship[]>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /medical-concepts/{concept_id}/relationships`

## Path parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `concept_id` | `string` | Yes |  |  |  | No |  |

## Query parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `direction` | `string` | No |  | outgoing, incoming, both | `"outgoing"` | No |  |
| `limit` | `integer` | No |  |  | `50` | No |  |
| `offset` | `integer` | No |  |  | `0` | No |  |
| `target_vocabulary` | `string` | No |  | SNOMED, RXNORM, MESH |  | No |  |
| `type` | `string` | No |  |  |  | No |  |

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`GetMedicalConceptRelationshipsResponse`](../models/GetMedicalConceptRelationshipsResponse.md) | application/json | Successful Response |

## Success response examples

### 200

```json
[]
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | The request was invalid — a required parameter was missing or a filter value was not recognized |
| `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |

## Error examples

### 400 — A required query parameter was missing or a filter value was not recognized (sanitized example)

```json
{
  "error": "Bad request"
}
```

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const conceptId = "<CONCEPT_ID>";

const query = {
  "direction": "outgoing",
  "limit": 50,
  "offset": 0,
  "target_vocabulary": "SNOMED",
  "type": "<TYPE>"
};

const result = await graph.listMedicalConceptRelationships(conceptId, query);
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-graph.health.cloud/medical-concepts/%3CCONCEPT_ID%3E/relationships?direction=outgoing&limit=50&offset=0&target_vocabulary=SNOMED&type=%3CTYPE%3E'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
