SetDistinctMetrics
curl --request POST \
--url https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field": {
"entityId": "<string>",
"fieldName": "<string>"
},
"otherField": {
"entityId": "<string>",
"fieldName": "<string>"
},
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"reason": "<string>"
}
'import requests
url = "https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct"
payload = {
"field": {
"entityId": "<string>",
"fieldName": "<string>"
},
"otherField": {
"entityId": "<string>",
"fieldName": "<string>"
},
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
},
"reason": "<string>"
}
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({
field: {entityId: '<string>', fieldName: '<string>'},
otherField: {entityId: '<string>', fieldName: '<string>'},
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}},
reason: '<string>'
})
};
fetch('https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct', 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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct",
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([
'field' => [
'entityId' => '<string>',
'fieldName' => '<string>'
],
'otherField' => [
'entityId' => '<string>',
'fieldName' => '<string>'
],
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
],
'reason' => '<string>'
]),
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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct"
payload := strings.NewReader("{\n \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct")
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 \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}synq.entities.semantic_models.v1alpha.MetricDuplicatesService
SetDistinctMetrics
Say that two fields are not one metric. The groups change on the next pass, which starts at once. Saying it again records the new person and time.
A user with SCOPE_ENTITY_MARKS_EDIT says it of any two fields. Any other user says it only of two fields whose entities both have an owner that lists the user as a contact.
POST
/
api
/
entities
/
semantic-models
/
v1alpha
/
duplicate-groups
/
set-distinct
SetDistinctMetrics
curl --request POST \
--url https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field": {
"entityId": "<string>",
"fieldName": "<string>"
},
"otherField": {
"entityId": "<string>",
"fieldName": "<string>"
},
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"reason": "<string>"
}
'import requests
url = "https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct"
payload = {
"field": {
"entityId": "<string>",
"fieldName": "<string>"
},
"otherField": {
"entityId": "<string>",
"fieldName": "<string>"
},
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
},
"reason": "<string>"
}
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({
field: {entityId: '<string>', fieldName: '<string>'},
otherField: {entityId: '<string>', fieldName: '<string>'},
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}},
reason: '<string>'
})
};
fetch('https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct', 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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct",
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([
'field' => [
'entityId' => '<string>',
'fieldName' => '<string>'
],
'otherField' => [
'entityId' => '<string>',
'fieldName' => '<string>'
],
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
],
'reason' => '<string>'
]),
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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct"
payload := strings.NewReader("{\n \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\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/entities/semantic-models/v1alpha/duplicate-groups/set-distinct")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/semantic-models/v1alpha/duplicate-groups/set-distinct")
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 \"field\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"otherField\": {\n \"entityId\": \"<string>\",\n \"fieldName\": \"<string>\"\n },\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n },\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Authorizations
Body
application/json
distinct_fields // field and other_field must be two different fields
Response
200 - application/json
Success
The response is of type SetDistinctMetricsResponse · object.