Batch resolve observations
curl --request POST \
--url https://api.metal.ai/v1/data/observations/batch \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"requests": [
{
"resource": "<string>",
"key": "<string>",
"dealContext": "<string>",
"policy": "<string>"
}
]
}
'import requests
url = "https://api.metal.ai/v1/data/observations/batch"
payload = { "requests": [
{
"resource": "<string>",
"key": "<string>",
"dealContext": "<string>",
"policy": "<string>"
}
] }
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requests: [
{
resource: '<string>',
key: '<string>',
dealContext: '<string>',
policy: '<string>'
}
]
})
};
fetch('https://api.metal.ai/v1/data/observations/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/data/observations/batch"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"resource\": \"<string>\",\n \"key\": \"<string>\",\n \"dealContext\": \"<string>\",\n \"policy\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
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": [
{
"resource": "<string>",
"key": "<string>",
"value": "<unknown>",
"provenance": {}
}
]
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Batch resolve observations
Resolves up to 32 observations in a single request.
POST
/
v1
/
data
/
observations
/
batch
Batch resolve observations
curl --request POST \
--url https://api.metal.ai/v1/data/observations/batch \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"requests": [
{
"resource": "<string>",
"key": "<string>",
"dealContext": "<string>",
"policy": "<string>"
}
]
}
'import requests
url = "https://api.metal.ai/v1/data/observations/batch"
payload = { "requests": [
{
"resource": "<string>",
"key": "<string>",
"dealContext": "<string>",
"policy": "<string>"
}
] }
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requests: [
{
resource: '<string>',
key: '<string>',
dealContext: '<string>',
policy: '<string>'
}
]
})
};
fetch('https://api.metal.ai/v1/data/observations/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/data/observations/batch"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"resource\": \"<string>\",\n \"key\": \"<string>\",\n \"dealContext\": \"<string>\",\n \"policy\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
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": [
{
"resource": "<string>",
"key": "<string>",
"value": "<unknown>",
"provenance": {}
}
]
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Authorizations
The Client ID of your API key.
The secret value of your API key.
Body
application/json
Required array length:
1 - 32 elementsShow child attributes
Show child attributes
Response
Resolved observations.
Show child attributes
Show child attributes
⌘I

