BatchCreateChannelSchemas
curl --request POST \
--url https://api.siftstack.com/api/v2/channel-schemas:batch-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": true
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
]
}
],
"assetName": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/channel-schemas:batch-create"
payload = {
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": True
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
]
}
],
"assetName": "<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/v2/channel-schemas:batch-create"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"channel\": \"<string>\",\n \"dataType\": \"CHANNEL_DATA_TYPE_UNSPECIFIED\",\n \"assetName\": \"<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 }\n ],\n \"assetName\": \"<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>"
}
]
}ChannelSchemaService
BatchCreateChannelSchemas
Create a batch of channel schemas
POST
/
api
/
v2
/
channel-schemas:batch-create
BatchCreateChannelSchemas
curl --request POST \
--url https://api.siftstack.com/api/v2/channel-schemas:batch-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": true
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
]
}
],
"assetName": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/channel-schemas:batch-create"
payload = {
"requests": [
{
"channel": "<string>",
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
"assetName": "<string>",
"unit": "<string>",
"enumTypes": [
{
"name": "<string>",
"key": 123,
"isSigned": True
}
],
"bitFieldElements": [
{
"name": "<string>",
"index": 123,
"bitCount": 123
}
]
}
],
"assetName": "<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/v2/channel-schemas:batch-create"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"channel\": \"<string>\",\n \"dataType\": \"CHANNEL_DATA_TYPE_UNSPECIFIED\",\n \"assetName\": \"<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 }\n ],\n \"assetName\": \"<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
application/json
The request for a call to ChannelSchemaService_BatchCreateChannelSchemas.
The request for a call to ChannelSchemaService_BatchCreateChannelSchemas.
Response
A successful response.
The response of a call to ChannelSchemaService_BatchCreateChannelSchemas.
Was this page helpful?
⌘I