Attach bounded content-free operational measurements to the active revision
POST
/
api
/
v1
/
deployments
/
{name}
/
measurements
Attach bounded content-free operational measurements to the active revision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/measurements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"measurements": [
{
"name": "<string>",
"sample_count": 2,
"unit": "<string>",
"value": 123
}
],
"observed_at": "2023-11-07T05:31:56Z",
"source": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"replica_id": "<string>"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/measurements"
payload = {
"measurements": [
{
"name": "<string>",
"sample_count": 2,
"unit": "<string>",
"value": 123
}
],
"observed_at": "2023-11-07T05:31:56Z",
"source": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"replica_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
measurements: [{name: '<string>', sample_count: 2, unit: '<string>', value: 123}],
observed_at: '2023-11-07T05:31:56Z',
source: '<string>',
valid_until: '2023-11-07T05:31:56Z',
replica_id: '<string>'
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/measurements', 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 := "http://127.0.0.1:18000/api/v1/deployments/{name}/measurements"
payload := strings.NewReader("{\n \"measurements\": [\n {\n \"name\": \"<string>\",\n \"sample_count\": 2,\n \"unit\": \"<string>\",\n \"value\": 123\n }\n ],\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"source\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"replica_id\": \"<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": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Body
application/json
Available options:
measured, provider_reported Required array length:
1 - 32 elementsShow child attributes
Show child attributes
Required string length:
1 - 128Maximum string length:
255Response
Created
⌘I
Attach bounded content-free operational measurements to the active revision
curl --request POST \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/measurements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"measurements": [
{
"name": "<string>",
"sample_count": 2,
"unit": "<string>",
"value": 123
}
],
"observed_at": "2023-11-07T05:31:56Z",
"source": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"replica_id": "<string>"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/measurements"
payload = {
"measurements": [
{
"name": "<string>",
"sample_count": 2,
"unit": "<string>",
"value": 123
}
],
"observed_at": "2023-11-07T05:31:56Z",
"source": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"replica_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
measurements: [{name: '<string>', sample_count: 2, unit: '<string>', value: 123}],
observed_at: '2023-11-07T05:31:56Z',
source: '<string>',
valid_until: '2023-11-07T05:31:56Z',
replica_id: '<string>'
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/measurements', 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 := "http://127.0.0.1:18000/api/v1/deployments/{name}/measurements"
payload := strings.NewReader("{\n \"measurements\": [\n {\n \"name\": \"<string>\",\n \"sample_count\": 2,\n \"unit\": \"<string>\",\n \"value\": 123\n }\n ],\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"source\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"replica_id\": \"<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": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}