curl --request PATCH \
--url https://api.mentionlab.io/api/v1/execution-tags/{id} \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '
{
"name": "important",
"color": "#3B82F6",
"matchingMode": "exact",
"description": "Checked baggage rules, weight limits and extra bag fees.",
"exclusion": "Cabin bags.",
"confirmVectorization": true,
"groupId": "018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42"
}
'import requests
url = "https://api.mentionlab.io/api/v1/execution-tags/{id}"
payload = {
"name": "important",
"color": "#3B82F6",
"matchingMode": "exact",
"description": "Checked baggage rules, weight limits and extra bag fees.",
"exclusion": "Cabin bags.",
"confirmVectorization": True,
"groupId": "018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42"
}
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'important',
color: '#3B82F6',
matchingMode: 'exact',
description: 'Checked baggage rules, weight limits and extra bag fees.',
exclusion: 'Cabin bags.',
confirmVectorization: true,
groupId: '018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42'
})
};
fetch('https://api.mentionlab.io/api/v1/execution-tags/{id}', 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/v1/execution-tags/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'important',
'color' => '#3B82F6',
'matchingMode' => 'exact',
'description' => 'Checked baggage rules, weight limits and extra bag fees.',
'exclusion' => 'Cabin bags.',
'confirmVectorization' => true,
'groupId' => '018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42'
]),
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/v1/execution-tags/{id}"
payload := strings.NewReader("{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.mentionlab.io/api/v1/execution-tags/{id}")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v1/execution-tags/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Update an execution tag
Updates an execution tag; rejected if no matching tag exists in the project. For an exact tag, a rename or a mode change recomputes all of its execution links, manual links included. For a semantic tag, new answers use the new definition at once and past answers change on the next history re-sync.
curl --request PATCH \
--url https://api.mentionlab.io/api/v1/execution-tags/{id} \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '
{
"name": "important",
"color": "#3B82F6",
"matchingMode": "exact",
"description": "Checked baggage rules, weight limits and extra bag fees.",
"exclusion": "Cabin bags.",
"confirmVectorization": true,
"groupId": "018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42"
}
'import requests
url = "https://api.mentionlab.io/api/v1/execution-tags/{id}"
payload = {
"name": "important",
"color": "#3B82F6",
"matchingMode": "exact",
"description": "Checked baggage rules, weight limits and extra bag fees.",
"exclusion": "Cabin bags.",
"confirmVectorization": True,
"groupId": "018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42"
}
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'important',
color: '#3B82F6',
matchingMode: 'exact',
description: 'Checked baggage rules, weight limits and extra bag fees.',
exclusion: 'Cabin bags.',
confirmVectorization: true,
groupId: '018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42'
})
};
fetch('https://api.mentionlab.io/api/v1/execution-tags/{id}', 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/v1/execution-tags/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'important',
'color' => '#3B82F6',
'matchingMode' => 'exact',
'description' => 'Checked baggage rules, weight limits and extra bag fees.',
'exclusion' => 'Cabin bags.',
'confirmVectorization' => true,
'groupId' => '018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42'
]),
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/v1/execution-tags/{id}"
payload := strings.NewReader("{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.mentionlab.io/api/v1/execution-tags/{id}")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v1/execution-tags/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"important\",\n \"color\": \"#3B82F6\",\n \"matchingMode\": \"exact\",\n \"description\": \"Checked baggage rules, weight limits and extra bag fees.\",\n \"exclusion\": \"Cabin bags.\",\n \"confirmVectorization\": true,\n \"groupId\": \"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Headers
Project ID to specify the project context
Path Parameters
UUID of the execution tag to update.
Body
Name of the tag. Must not start or end with a quote or apostrophe.
"important"
Color of the tag in hex format
"#3B82F6"
How the tag is matched to responses: exact links only responses whose text contains the tag name (default), semantic links responses by meaning, using the name, description and exclusion.
exact, semantic "exact"
Semantic tags: what the tag covers. Changing it marks the tag for a history re-sync.
300"Checked baggage rules, weight limits and extra bag fees."
Semantic tags: what the tag does not cover. Changing it marks the tag for a history re-sync.
200"Cabin bags."
Ignored. Semantic tags no longer index the project responses, so there is nothing to confirm.
true
ID of the execution-taxonomy tag group to file the tag under, or null for ungrouped. Group assignment never triggers tag re-matching or re-embedding.
"018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42"