---
title: "Create a data partition"
method: PUT
path: "/catalog/v1/partitions/{partitionKey}"
tags: ["Partitions"]
---

# Create a data partition

`PUT /catalog/v1/partitions/{partitionKey}`

## Request

- Base URL: `https://.clinia.cloud`
- URL: `https://.clinia.cloud/catalog/v1/partitions/{partitionKey}`
- Auth: API key in header `X-Clinia-API-Key`

Create a data partition.

## Path parameters

- `partitionKey` string, required

## Query parameters

- `stage` boolean

## Request body

- V1DataPartition
  - `key` string
  - `modules` V1DataPartitionModules, required
    - `search` 'STANDARD' | 'HEALTH_GRADE_SEARCH', required
  - `source` union, required
    - V1MDMPartitionConfig
      - `type` 'MDM' | 'DATA_SOURCE', required
      - `sources` string[], required
      - `collections` V1MDMPartitionCollectionConnection[], required
        - `traversedProperties` string[]: The properties from the relationships or adjacent records that can be queried in the data partition with one of the following formats: - `@{includeKey}.{propertyKey}` (e.g. `@worksAt.startDate`). This allows to query on the property 'startDate' of the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{propertyKey}` (e.g. `@worksAt.@clinic.name`). This allows to query on the property 'name' of the resource 'clinic' that is related to the record with the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{containedKey}.{propertyKey}` (e.g. `@worksAt.@clinic.location.address`). This allows to query on the property 'address' of the contained resource 'location' of the resource 'clinic' that is related to the record with the relationship 'worksAt' Traversed Properties support only primitive and general-purpose complex Clinia Datatypes, nested properties of a custom datatype can be queried using the dot notation.
        - `properties` object, required: The properties of the partition collection. The property key must follow the pattern: `^[a-zA-Z0-9-][\w-]{0,61}$`.
        - `mappings` V1MDMPartitionPropertiesMapping[], required: The partition collection properties mappings from the mdm collection source profile's.
          - `source` string, required: The source from which the properties are mapped.
          - `type` string, required: The type of the resource (analogous to the profile key) from which the properties are mapped.
          - `propertyMappings` object, required: This is used to map the partition collection properties from the source profile properties. The key is the partition property key and the value can be one of the following: - For a simple mapping between properties of a well-known datatype, the value is the source profile property key The value can be a simple property key or a nested property key ``` { simple_partition_property: simple_source_property, other_simple_partition_property: source_object_property.sub-property } ``` - For a mapping to a property of type 'OBJECT' in the partition, the value is an object with one of the following types: - OBJECT: To create a custom object in the partition from a single object or properties in the source profile ``` { partition_object_property: { mappingType: OBJECT propertyMappings: { sub-property: simple_source_property other_sub-property: source_object_property.sub-property } } } ``` - OBJECT_ARRAY: To create an array of custom objects from an array of custom objects in the source profile The path to the source array must be specified in the 'fromSourceArray' property ``` { partition_object_array_property: { mappingType: OBJECT_ARRAY propertyMappings: { fromSourceArray: source_object_array_property propertyMappings: { sub-property: source_object_array_property_sub-property other_sub-property: source_object_array_property_object_sub-property.sub-property } } } } ```.
        - `reconciliationRules` union
          - V1SystemReconciliationRules
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
            - `rules` object, required
          - V1PartitionCliniaFunctionReference
            - `name` string, required: The name of the function to be applied.
            - `version` string, required: Version of the clinia function. Should be a valid semver.
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
        - `contained` object: The contained resources of the partition collection.
        - `key` string, required: The key of the mdm collection (analogous to its UnifiedProfile key).
      - `relationships` V1MDMPartitionRelationshipConnection[], required
        - `from` V1RelationshipRefDefinition, required
          - `profileKey` string, required
          - `includeKey` string, required: key must follow pattern `^[a-zA-Z0-9-][\w-]$`.
        - `to` V1RelationshipRefDefinition, required
          - `profileKey` string, required
          - `includeKey` string, required: key must follow pattern `^[a-zA-Z0-9-][\w-]$`.
        - `properties` object: The properties of the partition relationship. The property key must follow the pattern: `^[a-zA-Z0-9-][\w-]{0,61}$`.
        - `mappings` V1MDMPartitionPropertiesMapping[]: The partition relationship properties mappings from the source relationship profile's.
          - `source` string, required: The source from which the properties are mapped.
          - `type` string, required: The type of the resource (analogous to the profile key) from which the properties are mapped.
          - `propertyMappings` object, required: This is used to map the partition collection properties from the source profile properties. The key is the partition property key and the value can be one of the following: - For a simple mapping between properties of a well-known datatype, the value is the source profile property key The value can be a simple property key or a nested property key ``` { simple_partition_property: simple_source_property, other_simple_partition_property: source_object_property.sub-property } ``` - For a mapping to a property of type 'OBJECT' in the partition, the value is an object with one of the following types: - OBJECT: To create a custom object in the partition from a single object or properties in the source profile ``` { partition_object_property: { mappingType: OBJECT propertyMappings: { sub-property: simple_source_property other_sub-property: source_object_property.sub-property } } } ``` - OBJECT_ARRAY: To create an array of custom objects from an array of custom objects in the source profile The path to the source array must be specified in the 'fromSourceArray' property ``` { partition_object_array_property: { mappingType: OBJECT_ARRAY propertyMappings: { fromSourceArray: source_object_array_property propertyMappings: { sub-property: source_object_array_property_sub-property other_sub-property: source_object_array_property_object_sub-property.sub-property } } } } ```.
        - `reconciliationRules` union
          - V1SystemReconciliationRules
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
            - `rules` object, required
          - V1PartitionCliniaFunctionReference
            - `name` string, required: The name of the function to be applied.
            - `version` string, required: Version of the clinia function. Should be a valid semver.
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
        - `relationshipType` string, required: The type of the mdm relationship.
    - V1DataSourcePartitionConfig
      - `type` 'MDM' | 'DATA_SOURCE', required
      - `key` string, required: The key of the target data source.
      - `collections` V1DataSourcePartitionCollectionConnection[]: The subset of collections from the target data source to which the data partition is connected, if not specified, the data partition is connected to all collections in the data source.
        - `traversedProperties` string[]: The properties from the relationships or adjacent records that can be queried in the data partition with one of the following formats: - `@{includeKey}.{propertyKey}` (e.g. `@worksAt.startDate`). This allows to query on the property 'startDate' of the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{propertyKey}` (e.g. `@worksAt.@clinic.name`). This allows to query on the property 'name' of the resource 'clinic' that is related to the record with the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{containedKey}.{propertyKey}` (e.g. `@worksAt.@clinic.location.address`). This allows to query on the property 'address' of the contained resource 'location' of the resource 'clinic' that is related to the record with the relationship 'worksAt' Traversed Properties support only primitive and general-purpose complex Clinia Datatypes, nested properties of a custom datatype can be queried using the dot notation.
        - `key` string, required: The key of the data source collection (analogous to its profile key).
      - `relationships` string[]: The subset of relationship definitions from the target data source used in the data partition, If the relationships are not specified, the data partition uses all the relationships of the data source that are between two collections in the data partition.
  - `status` 'STATUS_READY' | 'STATUS_STAGE' | 'STATUS_STALE': The status of the data partition. Stale means that the data partition can no longer receive updates, but still has data (readonly).

## Response `201`

A successful response when the data partition was created.

- V1DataPartition
  - `key` string
  - `modules` V1DataPartitionModules, required
    - `search` 'STANDARD' | 'HEALTH_GRADE_SEARCH', required
  - `source` union, required
    - V1MDMPartitionConfig
      - `type` 'MDM' | 'DATA_SOURCE', required
      - `sources` string[], required
      - `collections` V1MDMPartitionCollectionConnection[], required
        - `traversedProperties` string[]: The properties from the relationships or adjacent records that can be queried in the data partition with one of the following formats: - `@{includeKey}.{propertyKey}` (e.g. `@worksAt.startDate`). This allows to query on the property 'startDate' of the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{propertyKey}` (e.g. `@worksAt.@clinic.name`). This allows to query on the property 'name' of the resource 'clinic' that is related to the record with the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{containedKey}.{propertyKey}` (e.g. `@worksAt.@clinic.location.address`). This allows to query on the property 'address' of the contained resource 'location' of the resource 'clinic' that is related to the record with the relationship 'worksAt' Traversed Properties support only primitive and general-purpose complex Clinia Datatypes, nested properties of a custom datatype can be queried using the dot notation.
        - `properties` object, required: The properties of the partition collection. The property key must follow the pattern: `^[a-zA-Z0-9-][\w-]{0,61}$`.
        - `mappings` V1MDMPartitionPropertiesMapping[], required: The partition collection properties mappings from the mdm collection source profile's.
          - `source` string, required: The source from which the properties are mapped.
          - `type` string, required: The type of the resource (analogous to the profile key) from which the properties are mapped.
          - `propertyMappings` object, required: This is used to map the partition collection properties from the source profile properties. The key is the partition property key and the value can be one of the following: - For a simple mapping between properties of a well-known datatype, the value is the source profile property key The value can be a simple property key or a nested property key ``` { simple_partition_property: simple_source_property, other_simple_partition_property: source_object_property.sub-property } ``` - For a mapping to a property of type 'OBJECT' in the partition, the value is an object with one of the following types: - OBJECT: To create a custom object in the partition from a single object or properties in the source profile ``` { partition_object_property: { mappingType: OBJECT propertyMappings: { sub-property: simple_source_property other_sub-property: source_object_property.sub-property } } } ``` - OBJECT_ARRAY: To create an array of custom objects from an array of custom objects in the source profile The path to the source array must be specified in the 'fromSourceArray' property ``` { partition_object_array_property: { mappingType: OBJECT_ARRAY propertyMappings: { fromSourceArray: source_object_array_property propertyMappings: { sub-property: source_object_array_property_sub-property other_sub-property: source_object_array_property_object_sub-property.sub-property } } } } ```.
        - `reconciliationRules` union
          - V1SystemReconciliationRules
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
            - `rules` object, required
          - V1PartitionCliniaFunctionReference
            - `name` string, required: The name of the function to be applied.
            - `version` string, required: Version of the clinia function. Should be a valid semver.
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
        - `contained` object: The contained resources of the partition collection.
        - `key` string, required: The key of the mdm collection (analogous to its UnifiedProfile key).
      - `relationships` V1MDMPartitionRelationshipConnection[], required
        - `from` V1RelationshipRefDefinition, required
          - `profileKey` string, required
          - `includeKey` string, required: key must follow pattern `^[a-zA-Z0-9-][\w-]$`.
        - `to` V1RelationshipRefDefinition, required
          - `profileKey` string, required
          - `includeKey` string, required: key must follow pattern `^[a-zA-Z0-9-][\w-]$`.
        - `properties` object: The properties of the partition relationship. The property key must follow the pattern: `^[a-zA-Z0-9-][\w-]{0,61}$`.
        - `mappings` V1MDMPartitionPropertiesMapping[]: The partition relationship properties mappings from the source relationship profile's.
          - `source` string, required: The source from which the properties are mapped.
          - `type` string, required: The type of the resource (analogous to the profile key) from which the properties are mapped.
          - `propertyMappings` object, required: This is used to map the partition collection properties from the source profile properties. The key is the partition property key and the value can be one of the following: - For a simple mapping between properties of a well-known datatype, the value is the source profile property key The value can be a simple property key or a nested property key ``` { simple_partition_property: simple_source_property, other_simple_partition_property: source_object_property.sub-property } ``` - For a mapping to a property of type 'OBJECT' in the partition, the value is an object with one of the following types: - OBJECT: To create a custom object in the partition from a single object or properties in the source profile ``` { partition_object_property: { mappingType: OBJECT propertyMappings: { sub-property: simple_source_property other_sub-property: source_object_property.sub-property } } } ``` - OBJECT_ARRAY: To create an array of custom objects from an array of custom objects in the source profile The path to the source array must be specified in the 'fromSourceArray' property ``` { partition_object_array_property: { mappingType: OBJECT_ARRAY propertyMappings: { fromSourceArray: source_object_array_property propertyMappings: { sub-property: source_object_array_property_sub-property other_sub-property: source_object_array_property_object_sub-property.sub-property } } } } ```.
        - `reconciliationRules` union
          - V1SystemReconciliationRules
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
            - `rules` object, required
          - V1PartitionCliniaFunctionReference
            - `name` string, required: The name of the function to be applied.
            - `version` string, required: Version of the clinia function. Should be a valid semver.
            - `type` 'SYSTEM' | 'CLINIA_FUNCTION', required
        - `relationshipType` string, required: The type of the mdm relationship.
    - V1DataSourcePartitionConfig
      - `type` 'MDM' | 'DATA_SOURCE', required
      - `key` string, required: The key of the target data source.
      - `collections` V1DataSourcePartitionCollectionConnection[]: The subset of collections from the target data source to which the data partition is connected, if not specified, the data partition is connected to all collections in the data source.
        - `traversedProperties` string[]: The properties from the relationships or adjacent records that can be queried in the data partition with one of the following formats: - `@{includeKey}.{propertyKey}` (e.g. `@worksAt.startDate`). This allows to query on the property 'startDate' of the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{propertyKey}` (e.g. `@worksAt.@clinic.name`). This allows to query on the property 'name' of the resource 'clinic' that is related to the record with the relationship 'worksAt'. - `@{includeKey}.@{resourcetype}.{containedKey}.{propertyKey}` (e.g. `@worksAt.@clinic.location.address`). This allows to query on the property 'address' of the contained resource 'location' of the resource 'clinic' that is related to the record with the relationship 'worksAt' Traversed Properties support only primitive and general-purpose complex Clinia Datatypes, nested properties of a custom datatype can be queried using the dot notation.
        - `key` string, required: The key of the data source collection (analogous to its profile key).
      - `relationships` string[]: The subset of relationship definitions from the target data source used in the data partition, If the relationships are not specified, the data partition uses all the relationships of the data source that are between two collections in the data partition.
  - `status` 'STATUS_READY' | 'STATUS_STAGE' | 'STATUS_STALE': The status of the data partition. Stale means that the data partition can no longer receive updates, but still has data (readonly).

## Other responses

- `400`: Returned when the request is malformed or invalid.
- `404`: Returned when a collection targeted by the request does not exist.
- `409`: Returned when the data partition already exists.
- `413`: Returned when the payload exceeds the max content size (100kB).

---

[API](https://skmtc.dev/clinia/apis/data-catalog-api.md) - [All operations](https://skmtc.dev/clinia/apis/data-catalog-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clinia/apis/data-catalog-api/revisions/ddae6856276c?raw)
