curl --request POST \
--url https://developer.synq.io/api/owners/v1/{owner_id}/ownerships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert": {
"severities": [],
"notifyUpstream": true,
"ongoing": {
"disabled": {}
},
"allowSqlTestAuditLink": true,
"isDisabled": true
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/owners/v1/{owner_id}/ownerships"
payload = {
"selection": { "dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert": {
"severities": [],
"notifyUpstream": True,
"ongoing": { "disabled": {} },
"allowSqlTestAuditLink": True,
"isDisabled": True
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selection: {dataproductId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
alert: {
severities: [],
notifyUpstream: true,
ongoing: {disabled: {}},
allowSqlTestAuditLink: true,
isDisabled: true
},
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/owners/v1/{owner_id}/ownerships', 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://developer.synq.io/api/owners/v1/{owner_id}/ownerships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selection' => [
'dataproductId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'alert' => [
'severities' => [
],
'notifyUpstream' => true,
'ongoing' => [
'disabled' => [
]
],
'allowSqlTestAuditLink' => true,
'isDisabled' => true
],
'etag' => '<string>',
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://developer.synq.io/api/owners/v1/{owner_id}/ownerships"
payload := strings.NewReader("{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://developer.synq.io/api/owners/v1/{owner_id}/ownerships")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/owners/v1/{owner_id}/ownerships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"ownership": {
"id": "<string>",
"ownerId": "<string>",
"selection": {
"dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"alert": {
"severities": [],
"notifyUpstream": true,
"ongoing": {
"disabled": {}
},
"allowSqlTestAuditLink": true,
"isDisabled": true
},
"etag": "<string>",
"createdBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
}UpsertOwnership
Create or update an ownership under an owner. The ownership id is supplied by the caller (a UUID). Assigning a data product that is already owned by a different ownership moves it (the previous ownership of that product is removed), matching the app.
curl --request POST \
--url https://developer.synq.io/api/owners/v1/{owner_id}/ownerships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert": {
"severities": [],
"notifyUpstream": true,
"ongoing": {
"disabled": {}
},
"allowSqlTestAuditLink": true,
"isDisabled": true
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/owners/v1/{owner_id}/ownerships"
payload = {
"selection": { "dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert": {
"severities": [],
"notifyUpstream": True,
"ongoing": { "disabled": {} },
"allowSqlTestAuditLink": True,
"isDisabled": True
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selection: {dataproductId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
alert: {
severities: [],
notifyUpstream: true,
ongoing: {disabled: {}},
allowSqlTestAuditLink: true,
isDisabled: true
},
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/owners/v1/{owner_id}/ownerships', 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://developer.synq.io/api/owners/v1/{owner_id}/ownerships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selection' => [
'dataproductId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'alert' => [
'severities' => [
],
'notifyUpstream' => true,
'ongoing' => [
'disabled' => [
]
],
'allowSqlTestAuditLink' => true,
'isDisabled' => true
],
'etag' => '<string>',
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://developer.synq.io/api/owners/v1/{owner_id}/ownerships"
payload := strings.NewReader("{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://developer.synq.io/api/owners/v1/{owner_id}/ownerships")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/owners/v1/{owner_id}/ownerships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selection\": {\n \"dataproductId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alert\": {\n \"severities\": [],\n \"notifyUpstream\": true,\n \"ongoing\": {\n \"disabled\": {}\n },\n \"allowSqlTestAuditLink\": true,\n \"isDisabled\": true\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"ownership": {
"id": "<string>",
"ownerId": "<string>",
"selection": {
"dataproductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"alert": {
"severities": [],
"notifyUpstream": true,
"ongoing": {
"disabled": {}
},
"allowSqlTestAuditLink": true,
"isDisabled": true
},
"etag": "<string>",
"createdBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Id of the owner this ownership belongs to.
Body
Which assets this ownership covers.
- dataproduct_id
- query
Show child attributes
Show child attributes
Opaque id of the ownership (a UUID). The same id updates the same ownership; a new id creates a new one.
How alerts fire for the covered assets. Optional.
Show child attributes
Show child attributes
Optional optimistic-concurrency guard.
Who is performing this write. Optional.
- Actor
- Actor
- Actor
Show child attributes
Show child attributes
Response
Success
The stored ownership after the upsert.
Show child attributes
Show child attributes