---
updatedAt: 2025-04-28T14:26:02.000Z
agentTools:
  projectIndex: https://clinia.readme.io/llms.txt
---

# Retrieve a relationship from a data partition

Retrieve a relationship from a data partition.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Data Partition API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://{workspaceId}.clinia.cloud",
      "variables": {
        "workspaceId": {
          "default": "",
          "description": "The workspace id."
        }
      }
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/partitions/{partitionKey}/v1/relationships/{relationshipType}/{relationshipId}": {
      "get": {
        "tags": [
          "Relationships"
        ],
        "summary": "Retrieve a relationship from a data partition",
        "description": "Retrieve a relationship from a data partition.\n",
        "operationId": "GetRelationship",
        "parameters": [
          {
            "name": "partitionKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relationshipType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relationshipId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the relationship with the following formats:\n  - v1RelationshipID format: `{fromID}.{toID}` (e.g. `123.456`).\n  - v1Identifier format: `{system}:{value}:{use}` (e.g. `clinia:123:use` or `source:123.456:clinia.worksAt`).\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includes",
            "in": "query",
            "description": "List of resource types to includes with the response. Includes must be valid resource types for the given relationship definition.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1PartitionRelationship"
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is malformed or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1Error"
                }
              }
            }
          },
          "404": {
            "description": "Returned when the relationship type or the relationship does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Clinia-API-Key"
      }
    },
    "schemas": {
      "v1RelationshipID": {
        "type": "string",
        "x-common-model": true,
        "description": "The unique identifier of the relationship.\nThis is a key with the shape `{fromID}.{toID}`.\n",
        "pattern": "^[^.]+.[^.]+$",
        "x-go-type": "apiv1.V1RelationshipID",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1RelationshipRef": {
        "type": "object",
        "x-common-model": true,
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1RelationshipRef",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Symbol": {
        "pattern": "^[\\s\\S]+$",
        "type": "string",
        "x-common-model": true,
        "description": "A sequence of Unicode characters.",
        "x-go-type": "apiv1.V1Symbol",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Uri": {
        "pattern": "^\\S*$",
        "type": "string",
        "x-common-model": true,
        "description": "String of characters used to identify a name or a resource.",
        "x-go-type": "apiv1.V1Uri",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Code": {
        "pattern": "^[^\\s]+( [^\\s]+)*$",
        "type": "string",
        "x-common-model": true,
        "description": "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents.",
        "x-go-type": "apiv1.V1Code",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1DateTime": {
        "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]{1,9})?)?)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)?)?)?$",
        "type": "string",
        "x-common-model": true,
        "description": "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates.",
        "x-go-type": "apiv1.V1DateTime",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Period": {
        "type": "object",
        "x-common-model": true,
        "description": "A time period defined by a start and end date and optionally time.",
        "properties": {
          "id": {
            "description": "Unique id for the property within a resource (for internal references). This may be any string value that does not contain spaces.",
            "$ref": "#/components/schemas/v1Symbol"
          },
          "start": {
            "description": "The start of the period. The boundary is inclusive.",
            "$ref": "#/components/schemas/v1DateTime"
          },
          "end": {
            "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
            "$ref": "#/components/schemas/v1DateTime"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1Period",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Identifier": {
        "description": "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.",
        "properties": {
          "id": {
            "description": "Unique id for the property within a resource (for internal references). This may be any string value that does not contain spaces.",
            "$ref": "#/components/schemas/v1Symbol"
          },
          "system": {
            "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
            "$ref": "#/components/schemas/v1Uri"
          },
          "value": {
            "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
            "$ref": "#/components/schemas/v1Symbol"
          },
          "use": {
            "description": "The purpose of this identifier.",
            "$ref": "#/components/schemas/v1Code"
          },
          "period": {
            "description": "Time period when identifier was/is in use.",
            "$ref": "#/components/schemas/v1Period"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1Identifier",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        },
        "x-common-model": true
      },
      "v1Meta": {
        "type": "object",
        "x-common-model": true,
        "properties": {
          "createdAt": {
            "type": "string",
            "description": "Instant of creation of the resource.",
            "format": "date-time"
          },
          "identifier": {
            "type": "array",
            "description": "Identifiers of the resource.\nNote: Combination of `source`, `value` and `use` must be unique.\n",
            "items": {
              "$ref": "#/components/schemas/v1Identifier"
            }
          },
          "source": {
            "type": "string",
            "description": "The source of the resource.",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update of the resource.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1Meta",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Relationship": {
        "type": "object",
        "x-common-model": true,
        "required": [
          "id",
          "type",
          "from",
          "to"
        ],
        "properties": {
          "id": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/v1RelationshipID"
              }
            ]
          },
          "type": {
            "type": "string",
            "readOnly": true
          },
          "from": {
            "$ref": "#/components/schemas/v1RelationshipRef"
          },
          "to": {
            "$ref": "#/components/schemas/v1RelationshipRef"
          },
          "meta": {
            "$ref": "#/components/schemas/v1Meta"
          },
          "data": {
            "type": "object",
            "x-is-generic": true,
            "x-go-type": "json.RawMessage"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1Relationship",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Resource": {
        "required": [
          "id",
          "type",
          "data"
        ],
        "type": "object",
        "x-common-model": true,
        "properties": {
          "id": {
            "title": "The logical identifier",
            "type": "string"
          },
          "type": {
            "description": "Type of the resource.",
            "type": "string"
          },
          "meta": {
            "$ref": "#/components/schemas/v1Meta"
          },
          "data": {
            "title": "The dynamic attributes based on the resource type",
            "type": "object",
            "x-is-generic": true,
            "x-go-type": "json.RawMessage"
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1Resource",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1DomainResource": {
        "required": [
          "id",
          "type",
          "data"
        ],
        "type": "object",
        "x-common-model": true,
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the resource.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "description": "Type of the resource.",
            "readOnly": true
          },
          "meta": {
            "$ref": "#/components/schemas/v1Meta"
          },
          "data": {
            "type": "object",
            "x-is-generic": true,
            "x-go-type": "json.RawMessage",
            "description": "Dynamic data attributes, based on the resource type."
          },
          "contained": {
            "description": "Resources contained in this top-level resource. Contained resources exists only within the context of this top-level resource.",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/v1Resource"
              }
            }
          }
        },
        "additionalProperties": false,
        "x-go-type": "apiv1.V1DomainResource",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1RelativeIdentity": {
        "type": "object",
        "x-common-model": true,
        "required": [
          "id",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The logical identifier."
          },
          "data": {
            "type": "object",
            "x-is-generic": true,
            "x-go-type": "json.RawMessage",
            "description": "The data contains all of the differentiator properties for this relative identity.\n"
          },
          "legacyIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The legacy ids assigned to this relative identity.\nLegacy ids are old identifiers that were used in the legacy system to identity this set of differentiator values.\n"
          }
        },
        "x-go-type": "apiv1.V1RelativeIdentity",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1DomainResourceWithRelativeIdentities": {
        "x-common-model": true,
        "allOf": [
          {
            "$ref": "#/components/schemas/v1DomainResource"
          },
          {
            "type": "object",
            "properties": {
              "relativeIdentities": {
                "type": "object",
                "description": "The relative identities associated with this resource.",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/v1RelativeIdentity"
                  }
                }
              }
            }
          }
        ],
        "x-go-type": "apiv1.V1DomainResourceWithRelativeIdentities",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1PartitionRelationship": {
        "allOf": [
          {
            "$ref": "#/components/schemas/v1Relationship"
          },
          {
            "type": "object",
            "description": "The included resources.",
            "properties": {
              "includes": {
                "additionalProperties": {
                  "type": "array",
                  "description": "The included resources for this path.",
                  "items": {
                    "$ref": "#/components/schemas/v1DomainResourceWithRelativeIdentities"
                  }
                }
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "v1ErrorType": {
        "type": "string",
        "x-common-model": true,
        "enum": [
          "ALREADY_EXISTS",
          "FAILED_PRECONDITION",
          "INTERNAL",
          "INVALID_ARGUMENT",
          "NOT_FOUND",
          "OUT_OF_RANGE",
          "UNIMPLEMENTED",
          "PERMISSION_DENIED",
          "UNAUTHENTICATED",
          "CONTENT_TOO_LARGE",
          "REQUEST_TIMEOUT"
        ],
        "x-go-type": "apiv1.V1ErrorType",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      },
      "v1Error": {
        "type": "object",
        "x-common-model": true,
        "required": [
          "code",
          "message",
          "type"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "enum": [
              400,
              401,
              403,
              404,
              408,
              409,
              413,
              500,
              501
            ]
          },
          "message": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/v1ErrorType"
          },
          "details": {
            "description": "list of errors that occurred if applicable.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1Error"
            }
          }
        },
        "x-go-type": "apiv1.V1Error",
        "x-go-type-import": {
          "name": "apiv1",
          "path": "github.com/clinia/atlas/server/api/v1"
        }
      }
    }
  }
}
```