SetDefinition
curl --request PUT \
--url https://developer.synq.io/api/dataproducts/v2/{id}/definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"parts": [
{
"entityId": "<string>",
"id": "<string>"
}
]
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/dataproducts/v2/{id}/definition"
payload = {
"definition": { "parts": [
{
"entityId": "<string>",
"id": "<string>"
}
] },
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {parts: [{entityId: '<string>', id: '<string>'}]},
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/dataproducts/v2/{id}/definition', 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/dataproducts/v2/{id}/definition",
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([
'definition' => [
'parts' => [
[
'entityId' => '<string>',
'id' => '<string>'
]
]
],
'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/dataproducts/v2/{id}/definition"
payload := strings.NewReader("{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://developer.synq.io/api/dataproducts/v2/{id}/definition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\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/dataproducts/v2/{id}/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\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{
"dataproduct": {
"id": "<string>",
"entityId": "<string>",
"title": "<string>",
"description": "<string>",
"folder": "<string>",
"definition": {
"parts": [
{
"entityId": "<string>",
"id": "<string>"
}
]
},
"etag": "<string>",
"createdBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
}synq.dataproducts.v2.DataproductsService
SetDefinition
Replace the entire membership definition of a data product.
PUT
/
api
/
dataproducts
/
v2
/
{id}
/
definition
SetDefinition
curl --request PUT \
--url https://developer.synq.io/api/dataproducts/v2/{id}/definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"parts": [
{
"entityId": "<string>",
"id": "<string>"
}
]
},
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/dataproducts/v2/{id}/definition"
payload = {
"definition": { "parts": [
{
"entityId": "<string>",
"id": "<string>"
}
] },
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {parts: [{entityId: '<string>', id: '<string>'}]},
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/dataproducts/v2/{id}/definition', 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/dataproducts/v2/{id}/definition",
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([
'definition' => [
'parts' => [
[
'entityId' => '<string>',
'id' => '<string>'
]
]
],
'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/dataproducts/v2/{id}/definition"
payload := strings.NewReader("{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://developer.synq.io/api/dataproducts/v2/{id}/definition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\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/dataproducts/v2/{id}/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"parts\": [\n {\n \"entityId\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\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{
"dataproduct": {
"id": "<string>",
"entityId": "<string>",
"title": "<string>",
"description": "<string>",
"folder": "<string>",
"definition": {
"parts": [
{
"entityId": "<string>",
"id": "<string>"
}
]
},
"etag": "<string>",
"createdBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "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 product whose definition to replace.
Body
application/json
The new membership definition (replaces the existing one entirely).
Show child attributes
Show child attributes
Optional optimistic-concurrency guard.
Who is performing this write. Optional — identity is completed from the calling credentials; set it to attribute the change on behalf of a user.
- Actor
- Actor
- Actor
Show child attributes
Show child attributes
Response
200 - application/json
Success
The stored product after the definition write.
Show child attributes
Show child attributes
⌘I