Assign an annotation configuration to a project
curl --request PUT \
--url https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}import requests
url = "https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}', 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.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"type": "CATEGORICAL",
"optimization_direction": "MINIMIZE",
"values": [
{
"label": "<string>",
"score": 123
}
],
"id": "<string>",
"description": "<string>"
}
}"<string>""<string>""<string>"Annotation Configs
Assign an annotation configuration to a project
Assign an annotation configuration to a project. This operation is idempotent: re-assigning a config that is already assigned is a no-op that returns the config. Both the project and the config are identified by either ID or name.
PUT
/
v1
/
projects
/
{project_identifier}
/
annotation_configs
/
{config_identifier}
Assign an annotation configuration to a project
curl --request PUT \
--url https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}import requests
url = "https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}', 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.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_identifier}/annotation_configs/{config_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"type": "CATEGORICAL",
"optimization_direction": "MINIMIZE",
"values": [
{
"label": "<string>",
"score": 123
}
],
"id": "<string>",
"description": "<string>"
}
}"<string>""<string>""<string>"Path Parameters
The project identifier: either project ID or project name.
The annotation configuration identifier: either ID or name.
Response
The annotation configuration assigned to the project
- CategoricalAnnotationConfig
- ContinuousAnnotationConfig
- FreeformAnnotationConfig
Show child attributes
Show child attributes
Was this page helpful?

