Create a data partition
curl --request PUT \
--url https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey} \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"source": {
"sources": [
"<string>"
],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": {
"rules": {}
},
"contained": {},
"traversedProperties": [
"<string>"
]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": {
"rules": {}
}
}
]
}
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}"
payload = { "source": {
"sources": ["<string>"],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": { "rules": {} },
"contained": {},
"traversedProperties": ["<string>"]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": { "rules": {} }
}
]
} }
headers = {
"X-Clinia-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Clinia-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: {
sources: ['<string>'],
collections: [
{
properties: {},
mappings: [{source: '<string>', type: '<string>', propertyMappings: {}}],
key: '<string>',
reconciliationRules: {rules: {}},
contained: {},
traversedProperties: ['<string>']
}
],
relationships: [
{
from: {profileKey: '<string>', includeKey: '<string>'},
to: {profileKey: '<string>', includeKey: '<string>'},
relationshipType: '<string>',
properties: {},
mappings: [{source: '<string>', type: '<string>', propertyMappings: {}}],
reconciliationRules: {rules: {}}
}
]
}
})
};
fetch('https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => [
'sources' => [
'<string>'
],
'collections' => [
[
'properties' => [
],
'mappings' => [
[
'source' => '<string>',
'type' => '<string>',
'propertyMappings' => [
]
]
],
'key' => '<string>',
'reconciliationRules' => [
'rules' => [
]
],
'contained' => [
],
'traversedProperties' => [
'<string>'
]
]
],
'relationships' => [
[
'from' => [
'profileKey' => '<string>',
'includeKey' => '<string>'
],
'to' => [
'profileKey' => '<string>',
'includeKey' => '<string>'
],
'relationshipType' => '<string>',
'properties' => [
],
'mappings' => [
[
'source' => '<string>',
'type' => '<string>',
'propertyMappings' => [
]
]
],
'reconciliationRules' => [
'rules' => [
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Clinia-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}"
payload := strings.NewReader("{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Clinia-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"source": {
"sources": [
"<string>"
],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": {
"rules": {}
},
"contained": {},
"traversedProperties": [
"<string>"
]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": {
"rules": {}
}
}
]
},
"key": "<string>"
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Partitions
Create a data partition
Create a data partition.
PUT
/
catalog
/
v1
/
partitions
/
{partitionKey}
Create a data partition
curl --request PUT \
--url https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey} \
--header 'Content-Type: application/json' \
--header 'X-Clinia-API-Key: <api-key>' \
--data '
{
"source": {
"sources": [
"<string>"
],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": {
"rules": {}
},
"contained": {},
"traversedProperties": [
"<string>"
]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": {
"rules": {}
}
}
]
}
}
'import requests
url = "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}"
payload = { "source": {
"sources": ["<string>"],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": { "rules": {} },
"contained": {},
"traversedProperties": ["<string>"]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": { "rules": {} }
}
]
} }
headers = {
"X-Clinia-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Clinia-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source: {
sources: ['<string>'],
collections: [
{
properties: {},
mappings: [{source: '<string>', type: '<string>', propertyMappings: {}}],
key: '<string>',
reconciliationRules: {rules: {}},
contained: {},
traversedProperties: ['<string>']
}
],
relationships: [
{
from: {profileKey: '<string>', includeKey: '<string>'},
to: {profileKey: '<string>', includeKey: '<string>'},
relationshipType: '<string>',
properties: {},
mappings: [{source: '<string>', type: '<string>', propertyMappings: {}}],
reconciliationRules: {rules: {}}
}
]
}
})
};
fetch('https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => [
'sources' => [
'<string>'
],
'collections' => [
[
'properties' => [
],
'mappings' => [
[
'source' => '<string>',
'type' => '<string>',
'propertyMappings' => [
]
]
],
'key' => '<string>',
'reconciliationRules' => [
'rules' => [
]
],
'contained' => [
],
'traversedProperties' => [
'<string>'
]
]
],
'relationships' => [
[
'from' => [
'profileKey' => '<string>',
'includeKey' => '<string>'
],
'to' => [
'profileKey' => '<string>',
'includeKey' => '<string>'
],
'relationshipType' => '<string>',
'properties' => [
],
'mappings' => [
[
'source' => '<string>',
'type' => '<string>',
'propertyMappings' => [
]
]
],
'reconciliationRules' => [
'rules' => [
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Clinia-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}"
payload := strings.NewReader("{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Clinia-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}")
.header("X-Clinia-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{workspaceId}.clinia.cloud/catalog/v1/partitions/{partitionKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Clinia-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": {\n \"sources\": [\n \"<string>\"\n ],\n \"collections\": [\n {\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"key\": \"<string>\",\n \"reconciliationRules\": {\n \"rules\": {}\n },\n \"contained\": {},\n \"traversedProperties\": [\n \"<string>\"\n ]\n }\n ],\n \"relationships\": [\n {\n \"from\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"to\": {\n \"profileKey\": \"<string>\",\n \"includeKey\": \"<string>\"\n },\n \"relationshipType\": \"<string>\",\n \"properties\": {},\n \"mappings\": [\n {\n \"source\": \"<string>\",\n \"type\": \"<string>\",\n \"propertyMappings\": {}\n }\n ],\n \"reconciliationRules\": {\n \"rules\": {}\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"source": {
"sources": [
"<string>"
],
"collections": [
{
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"key": "<string>",
"reconciliationRules": {
"rules": {}
},
"contained": {},
"traversedProperties": [
"<string>"
]
}
],
"relationships": [
{
"from": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"to": {
"profileKey": "<string>",
"includeKey": "<string>"
},
"relationshipType": "<string>",
"properties": {},
"mappings": [
{
"source": "<string>",
"type": "<string>",
"propertyMappings": {}
}
],
"reconciliationRules": {
"rules": {}
}
}
]
},
"key": "<string>"
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}{
"message": "<string>",
"details": "<array>",
"additionalContext": {}
}Authorizations
apiKeybasicHttpAuthbearerHttpAuth
Path Parameters
Key of the data partition
it must follow pattern: ^[a-zA-Z0-9-][\w-]{0,61}$.
Query Parameters
If true, the partition will be created as a staged partition. Staged partitions are mutable and can be modified.
If false, the partition will be created directly. This is the default behaviour and will make the data partition are immutable.
As of now, staged partitions are not fully supported and it is recommended to directly create
ready partitions.
Body
application/json
Show child attributes
Show child attributes
Response
A successful response when the data partition was created.
Show child attributes
Show child attributes
The status of the data partition.
- STATUS_STAGE: The data partition configuration is mutable. You can still query it as normal.
- STATUS_READY: The data partition configuration is immutable.
Available options:
STATUS_READY, STATUS_STAGE Was this page helpful?
⌘I