Unmerge entities in bulk
curl --request POST \
--url https://api.mentionlab.io/api/entities/unmerge \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '
{
"ids": [
"019daf29-0000-7000-8000-0000000000b1"
],
"survivorIds": [
"019daf29-0000-7000-8000-0000000000a1"
]
}
'import requests
url = "https://api.mentionlab.io/api/entities/unmerge"
payload = {
"ids": ["019daf29-0000-7000-8000-0000000000b1"],
"survivorIds": ["019daf29-0000-7000-8000-0000000000a1"]
}
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['019daf29-0000-7000-8000-0000000000b1'],
survivorIds: ['019daf29-0000-7000-8000-0000000000a1']
})
};
fetch('https://api.mentionlab.io/api/entities/unmerge', 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.mentionlab.io/api/entities/unmerge",
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([
'ids' => [
'019daf29-0000-7000-8000-0000000000b1'
],
'survivorIds' => [
'019daf29-0000-7000-8000-0000000000a1'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-project-id: <x-project-id>"
],
]);
$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.mentionlab.io/api/entities/unmerge"
payload := strings.NewReader("{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-project-id", "<x-project-id>")
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://api.mentionlab.io/api/entities/unmerge")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/entities/unmerge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"unmerged": 128,
"ids": [
"019daf29-0000-7000-8000-0000000000b1"
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Entities
Unmerge entities in bulk
Makes previously merged entities independent again, named either directly with ids or by survivor with survivorIds to release everything merged into them. Ids that are not currently merged are skipped, so the same list can be re-sent safely.
POST
/
api
/
entities
/
unmerge
Unmerge entities in bulk
curl --request POST \
--url https://api.mentionlab.io/api/entities/unmerge \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '
{
"ids": [
"019daf29-0000-7000-8000-0000000000b1"
],
"survivorIds": [
"019daf29-0000-7000-8000-0000000000a1"
]
}
'import requests
url = "https://api.mentionlab.io/api/entities/unmerge"
payload = {
"ids": ["019daf29-0000-7000-8000-0000000000b1"],
"survivorIds": ["019daf29-0000-7000-8000-0000000000a1"]
}
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['019daf29-0000-7000-8000-0000000000b1'],
survivorIds: ['019daf29-0000-7000-8000-0000000000a1']
})
};
fetch('https://api.mentionlab.io/api/entities/unmerge', 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.mentionlab.io/api/entities/unmerge",
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([
'ids' => [
'019daf29-0000-7000-8000-0000000000b1'
],
'survivorIds' => [
'019daf29-0000-7000-8000-0000000000a1'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-project-id: <x-project-id>"
],
]);
$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.mentionlab.io/api/entities/unmerge"
payload := strings.NewReader("{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-project-id", "<x-project-id>")
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://api.mentionlab.io/api/entities/unmerge")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/entities/unmerge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"019daf29-0000-7000-8000-0000000000b1\"\n ],\n \"survivorIds\": [\n \"019daf29-0000-7000-8000-0000000000a1\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"unmerged": 128,
"ids": [
"019daf29-0000-7000-8000-0000000000b1"
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Body
application/json