CreateTestMeasurements
curl --request POST \
--url https://api.siftstack.com/api/v1/test-measurements:batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"testMeasurements": [
{
"measurementId": "<string>",
"measurementType": "TEST_MEASUREMENT_TYPE_UNSPECIFIED",
"name": "<string>",
"testStepId": "<string>",
"testReportId": "<string>",
"passed": true,
"timestamp": "2023-11-07T05:31:56Z",
"numericValue": 123,
"stringValue": "<string>",
"booleanValue": true,
"numericBounds": {
"min": 123,
"max": 123
},
"description": "<string>",
"channelNames": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/test-measurements:batch"
payload = { "testMeasurements": [
{
"measurementId": "<string>",
"measurementType": "TEST_MEASUREMENT_TYPE_UNSPECIFIED",
"name": "<string>",
"testStepId": "<string>",
"testReportId": "<string>",
"passed": True,
"timestamp": "2023-11-07T05:31:56Z",
"numericValue": 123,
"stringValue": "<string>",
"booleanValue": True,
"numericBounds": {
"min": 123,
"max": 123
},
"description": "<string>",
"channelNames": ["<string>"],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
}
] }
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 := "https://api.siftstack.com/api/v1/test-measurements:batch"
payload := strings.NewReader("{\n \"testMeasurements\": [\n {\n \"measurementId\": \"<string>\",\n \"measurementType\": \"TEST_MEASUREMENT_TYPE_UNSPECIFIED\",\n \"name\": \"<string>\",\n \"testStepId\": \"<string>\",\n \"testReportId\": \"<string>\",\n \"passed\": true,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"numericValue\": 123,\n \"stringValue\": \"<string>\",\n \"booleanValue\": true,\n \"numericBounds\": {\n \"min\": 123,\n \"max\": 123\n },\n \"description\": \"<string>\",\n \"channelNames\": [\n \"<string>\"\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n }\n ]\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))
}{
"measurementsCreatedCount": 123,
"measurementIds": [
"<string>"
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}TestReportService
CreateTestMeasurements
Creates multiple test measurements in a single request
POST
/
api
/
v1
/
test-measurements:batch
CreateTestMeasurements
curl --request POST \
--url https://api.siftstack.com/api/v1/test-measurements:batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"testMeasurements": [
{
"measurementId": "<string>",
"measurementType": "TEST_MEASUREMENT_TYPE_UNSPECIFIED",
"name": "<string>",
"testStepId": "<string>",
"testReportId": "<string>",
"passed": true,
"timestamp": "2023-11-07T05:31:56Z",
"numericValue": 123,
"stringValue": "<string>",
"booleanValue": true,
"numericBounds": {
"min": 123,
"max": 123
},
"description": "<string>",
"channelNames": [
"<string>"
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/test-measurements:batch"
payload = { "testMeasurements": [
{
"measurementId": "<string>",
"measurementType": "TEST_MEASUREMENT_TYPE_UNSPECIFIED",
"name": "<string>",
"testStepId": "<string>",
"testReportId": "<string>",
"passed": True,
"timestamp": "2023-11-07T05:31:56Z",
"numericValue": 123,
"stringValue": "<string>",
"booleanValue": True,
"numericBounds": {
"min": 123,
"max": 123
},
"description": "<string>",
"channelNames": ["<string>"],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
}
] }
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 := "https://api.siftstack.com/api/v1/test-measurements:batch"
payload := strings.NewReader("{\n \"testMeasurements\": [\n {\n \"measurementId\": \"<string>\",\n \"measurementType\": \"TEST_MEASUREMENT_TYPE_UNSPECIFIED\",\n \"name\": \"<string>\",\n \"testStepId\": \"<string>\",\n \"testReportId\": \"<string>\",\n \"passed\": true,\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"numericValue\": 123,\n \"stringValue\": \"<string>\",\n \"booleanValue\": true,\n \"numericBounds\": {\n \"min\": 123,\n \"max\": 123\n },\n \"description\": \"<string>\",\n \"channelNames\": [\n \"<string>\"\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n }\n ]\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))
}{
"measurementsCreatedCount": 123,
"measurementIds": [
"<string>"
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Was this page helpful?
⌘I