Create Entry
Create an entry within the catalog. We support a maximum of 50,000 entries per type.
If you call this API with a payload where the external_id and catalog_type_id match an existing entry, the existing entry will be updated.
POST
/
v3
/
catalog_entries
Create Entry
curl --request POST \
--url https://api.incident.io/v3/catalog_entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aliases": [
"lawrence@incident.io",
"lawrence"
],
"attribute_values": {
"abc123": {
"array_value": [
{
"literal": "SEV123"
}
],
"value": {
"literal": "SEV123"
}
}
},
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"name": "Primary On-call",
"rank": 3
}
'import requests
url = "https://api.incident.io/v3/catalog_entries"
payload = {
"aliases": ["lawrence@incident.io", "lawrence"],
"attribute_values": { "abc123": {
"array_value": [{ "literal": "SEV123" }],
"value": { "literal": "SEV123" }
} },
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"name": "Primary On-call",
"rank": 3
}
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({
aliases: ['lawrence@incident.io', 'lawrence'],
attribute_values: {abc123: {array_value: [{literal: 'SEV123'}], value: {literal: 'SEV123'}}},
catalog_type_id: '01FCNDV6P870EA6S7TK1DSYDG0',
external_id: '761722cd-d1d7-477b-ac7e-90f9e079dc33',
name: 'Primary On-call',
rank: 3
})
};
fetch('https://api.incident.io/v3/catalog_entries', 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.incident.io/v3/catalog_entries",
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([
'aliases' => [
'lawrence@incident.io',
'lawrence'
],
'attribute_values' => [
'abc123' => [
'array_value' => [
[
'literal' => 'SEV123'
]
],
'value' => [
'literal' => 'SEV123'
]
]
],
'catalog_type_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'external_id' => '761722cd-d1d7-477b-ac7e-90f9e079dc33',
'name' => 'Primary On-call',
'rank' => 3
]),
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.incident.io/v3/catalog_entries"
payload := strings.NewReader("{\n \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\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.incident.io/v3/catalog_entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v3/catalog_entries")
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 \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\n}"
response = http.request(request)
puts response.read_body{
"catalog_entry": {
"aliases": [
"lawrence@incident.io",
"lawrence"
],
"archived_at": "2021-08-17T14:28:57.801578Z",
"attribute_values": {
"abc123": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123"
}
}
},
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"created_at": "2021-08-17T13:28:57.801578Z",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Primary On-call",
"rank": 3,
"updated_at": "2021-08-17T13:28:57.801578Z"
}
}Authorizations
API key from your incident.io dashboard (Settings → API keys)
Body
application/json
Values of this entry
Show child attributes
Show child attributes
Example:
{ "abc123": { "array_value": [{ "literal": "SEV123" }], "value": { "literal": "SEV123" } } }
ID of this catalog type
Example:
"01FCNDV6P870EA6S7TK1DSYDG0"
Name is the human readable name of this entry
Example:
"Primary On-call"
Optional aliases that can be used to reference this entry
Example:
["lawrence@incident.io", "lawrence"]
An optional alternative ID for this entry, which is ensured to be unique for the type
Example:
"761722cd-d1d7-477b-ac7e-90f9e079dc33"
When catalog type is ranked, this is used to help order things
Example:
3
Response
201 - application/json
Created response.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create Entry
curl --request POST \
--url https://api.incident.io/v3/catalog_entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aliases": [
"lawrence@incident.io",
"lawrence"
],
"attribute_values": {
"abc123": {
"array_value": [
{
"literal": "SEV123"
}
],
"value": {
"literal": "SEV123"
}
}
},
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"name": "Primary On-call",
"rank": 3
}
'import requests
url = "https://api.incident.io/v3/catalog_entries"
payload = {
"aliases": ["lawrence@incident.io", "lawrence"],
"attribute_values": { "abc123": {
"array_value": [{ "literal": "SEV123" }],
"value": { "literal": "SEV123" }
} },
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"name": "Primary On-call",
"rank": 3
}
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({
aliases: ['lawrence@incident.io', 'lawrence'],
attribute_values: {abc123: {array_value: [{literal: 'SEV123'}], value: {literal: 'SEV123'}}},
catalog_type_id: '01FCNDV6P870EA6S7TK1DSYDG0',
external_id: '761722cd-d1d7-477b-ac7e-90f9e079dc33',
name: 'Primary On-call',
rank: 3
})
};
fetch('https://api.incident.io/v3/catalog_entries', 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.incident.io/v3/catalog_entries",
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([
'aliases' => [
'lawrence@incident.io',
'lawrence'
],
'attribute_values' => [
'abc123' => [
'array_value' => [
[
'literal' => 'SEV123'
]
],
'value' => [
'literal' => 'SEV123'
]
]
],
'catalog_type_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'external_id' => '761722cd-d1d7-477b-ac7e-90f9e079dc33',
'name' => 'Primary On-call',
'rank' => 3
]),
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.incident.io/v3/catalog_entries"
payload := strings.NewReader("{\n \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\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.incident.io/v3/catalog_entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v3/catalog_entries")
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 \"aliases\": [\n \"lawrence@incident.io\",\n \"lawrence\"\n ],\n \"attribute_values\": {\n \"abc123\": {\n \"array_value\": [\n {\n \"literal\": \"SEV123\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\"\n }\n }\n },\n \"catalog_type_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"external_id\": \"761722cd-d1d7-477b-ac7e-90f9e079dc33\",\n \"name\": \"Primary On-call\",\n \"rank\": 3\n}"
response = http.request(request)
puts response.read_body{
"catalog_entry": {
"aliases": [
"lawrence@incident.io",
"lawrence"
],
"archived_at": "2021-08-17T14:28:57.801578Z",
"attribute_values": {
"abc123": {
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123"
}
}
},
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"created_at": "2021-08-17T13:28:57.801578Z",
"external_id": "761722cd-d1d7-477b-ac7e-90f9e079dc33",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Primary On-call",
"rank": 3,
"updated_at": "2021-08-17T13:28:57.801578Z"
}
}