curl --request POST \
--url https://api.siftstack.com/api/v1/channel-schemas:batch-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"component": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": true
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
],
"organizationId": "<string>"
}
],
"assetName": "<string>",
"organizationId": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/channel-schemas:batch-create"
payload = {
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"component": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": True
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
],
"organizationId": "<string>"
}
],
"assetName": "<string>",
"organizationId": "<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 := "https://api.siftstack.com/api/v1/channel-schemas:batch-create"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"channel\": \"<string>\",\n \"dataType\": \"CHANNEL_DATA_TYPE_UNSPECIFIED\",\n \"assetName\": \"<string>\",\n \"component\": \"<string>\",\n \"unit\": \"<string>\",\n \"enumTypes\": [\n {\n \"name\": \"<string>\",\n \"key\": 123,\n \"isSigned\": true\n }\n ],\n \"bitFieldElements\": [\n {\n \"name\": \"<string>\",\n \"index\": 123,\n \"bitCount\": 123\n }\n ],\n \"organizationId\": \"<string>\"\n }\n ],\n \"assetName\": \"<string>\",\n \"organizationId\": \"<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))
}{}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}BatchCreateChannelSchemas v1
Create a batch of channel schemas
curl --request POST \
--url https://api.siftstack.com/api/v1/channel-schemas:batch-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"component": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": true
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
],
"organizationId": "<string>"
}
],
"assetName": "<string>",
"organizationId": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/channel-schemas:batch-create"
payload = {
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"component": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": True
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
],
"organizationId": "<string>"
}
],
"assetName": "<string>",
"organizationId": "<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 := "https://api.siftstack.com/api/v1/channel-schemas:batch-create"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"channel\": \"<string>\",\n \"dataType\": \"CHANNEL_DATA_TYPE_UNSPECIFIED\",\n \"assetName\": \"<string>\",\n \"component\": \"<string>\",\n \"unit\": \"<string>\",\n \"enumTypes\": [\n {\n \"name\": \"<string>\",\n \"key\": 123,\n \"isSigned\": true\n }\n ],\n \"bitFieldElements\": [\n {\n \"name\": \"<string>\",\n \"index\": 123,\n \"bitCount\": 123\n }\n ],\n \"organizationId\": \"<string>\"\n }\n ],\n \"assetName\": \"<string>\",\n \"organizationId\": \"<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))
}{}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The request for a call to ChannelSchemaService_BatchCreateChannelSchemas.
The request for a call to ChannelSchemaService_BatchCreateChannelSchemas.
Show child attributes
Show child attributes
The asset to which the channel schemas belong (case-insensitive). If this field, and any of the child requests specify an asset, the assets must match.
The organization to which the channel schemas belong. If this field, and any of the child requests specify an organization_id, the organization_ids must match. This field is optional if the caller belongs to a single organization.
Response
A successful response.
The response of a call to ChannelSchemaService_BatchCreateChannelSchemas.
Was this page helpful?