Add an attribute definition to an entity
curl --request POST \
--url http://localhost:3000/v1/entities/{id}/attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', label: '<string>'})
};
fetch('http://localhost:3000/v1/entities/{id}/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3000/v1/entities/{id}/attributes"
payload = {
"name": "<string>",
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v1/entities/{id}/attributes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"label\": \"<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))
}{
"data": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}Entities
Add an attribute definition to an entity
POST
/
v1
/
entities
/
{id}
/
attributes
Add an attribute definition to an entity
curl --request POST \
--url http://localhost:3000/v1/entities/{id}/attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', label: '<string>'})
};
fetch('http://localhost:3000/v1/entities/{id}/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3000/v1/entities/{id}/attributes"
payload = {
"name": "<string>",
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v1/entities/{id}/attributes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"label\": \"<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))
}{
"data": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"suggestion": "<string>",
"request_id": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"retry_after_seconds": 123,
"validation_errors": [
{
"param": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
}Authorizations
API key (ml_live_* or ml_test_*)
Path Parameters
Resource ID
Body
application/json
Response
Default Response