curl --request POST \
--url https://api.ionworks.com/protocol_groups \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_id": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.ionworks.com/protocol_groups"
payload = {
"name": "<string>",
"project_id": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', project_id: '<string>', description: '<string>'})
};
fetch('https://api.ionworks.com/protocol_groups', 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.ionworks.com/protocol_groups",
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>',
'project_id' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.ionworks.com/protocol_groups"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ionworks.com/protocol_groups")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/protocol_groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"organization_id": "<string>",
"project_id": "<string>",
"id": "<string>",
"description": "<string>",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"protocol_count": 123,
"created_by_email": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Protocol Group
Create a protocol group in a project.
Parameters
body : CreateProtocolGroupBody Group creation data.
Returns
ProtocolGroup The created group.
Raises
ConflictError If the project already has a group with this name (case-insensitive). AppError If the insert returns no row.
curl --request POST \
--url https://api.ionworks.com/protocol_groups \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_id": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.ionworks.com/protocol_groups"
payload = {
"name": "<string>",
"project_id": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', project_id: '<string>', description: '<string>'})
};
fetch('https://api.ionworks.com/protocol_groups', 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.ionworks.com/protocol_groups",
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>',
'project_id' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.ionworks.com/protocol_groups"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ionworks.com/protocol_groups")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/protocol_groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"project_id\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"organization_id": "<string>",
"project_id": "<string>",
"id": "<string>",
"description": "<string>",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"protocol_count": 123,
"created_by_email": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
Response
Successful Response
Database entity for a protocol group.
Name of the group, unique within the project
ID of the organization that owns this group
ID of the project that owns this group
Unique identifier for the group
Optional note on what relates the protocols in this group
User ID of the user who created this group
When the group was created
When the group was last updated
Number of protocols in this group. Present on list responses, None when the group is fetched on its own.
Email of the user who created this group
Was this page helpful?