読者項目作成
curl --request POST \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"data_type": "text",
"field_group": "scenario_fields"
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items"
payload = {
"name": "<string>",
"data_type": "text",
"field_group": "scenario_fields"
}
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({name: '<string>', data_type: 'text', field_group: 'scenario_fields'})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'data_type' => 'text',
'field_group' => 'scenario_fields'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\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))
}HttpResponse<String> response = Unirest.post("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"reserved_word": "<string>",
"data_type": "text",
"field_group": "scenario_fields",
"is_deletable": true,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"name": [
"管理用タイトルは必須です"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}登録フォーム・読者項目
読者項目作成
読者項目を作成します。キー(reserved_word)は free + 連番で自動採番されます(指定できません)。
field_group=common_fields(他シナリオ連携: する)で作成した項目は全シナリオで使えます。他シナリオ連携は作成後に変更できません。
読者項目作成
curl --request POST \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"data_type": "text",
"field_group": "scenario_fields"
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items"
payload = {
"name": "<string>",
"data_type": "text",
"field_group": "scenario_fields"
}
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({name: '<string>', data_type: 'text', field_group: 'scenario_fields'})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'data_type' => 'text',
'field_group' => 'scenario_fields'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\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))
}HttpResponse<String> response = Unirest.post("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"data_type\": \"text\",\n \"field_group\": \"scenario_fields\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"reserved_word": "<string>",
"data_type": "text",
"field_group": "scenario_fields",
"is_deletable": true,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"name": [
"管理用タイトルは必須です"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}POST
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/reader-items
Body
application/json