API Documentation
The UptimeTea API is easy to use and free for all plans.
Create action item
Adds a follow-up task to the incident's postmortem, saving the draft postmortem first if needed.
POST
https://api.uptimetea.com/incidents/:incident_id/postmortem/action_items
Headers
-
AuthorizationREQUIREDSTRINGBearer $TOKEN -
Content-TypeREQUIREDSTRINGapplication/json
Body parameters
-
action_item.titleREQUIREDSTRINGWhat needs to be done.
-
action_item.assignee_idSTRINGID of the team member who owns the task.
-
action_item.completedBOOLEANMarks the task done; completed_at is set the first time it turns true.
Response body
{
"id": "uuid",
"title": "Alert on upstream pool size",
"assignee_id": "uuid",
"completed_at": null,
"created_at": "2024-01-15T12:00:00Z"
}
Code examples
curl -X POST "https://api.uptimetea.com/incidents/$INCIDENT_ID/postmortem/action_items" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action_item": {
"title": "Alert on upstream pool size",
"assignee_id": "uuid"
}
}'
// Create action item
const response = await fetch('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + yourToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"action_item": {
"title": "Alert on upstream pool size",
"assignee_id": "uuid"
}
})
});
const data = await response.json();
console.log(data);
# Create action item
import requests
headers = {'Authorization': f'Bearer {your_token}'}
response = requests.post(
'https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items',
headers=headers,
json={
'action_item': {
'title': 'Alert on upstream pool size',
'assignee_id': 'uuid'
}
}
)
print(response.json())
// Create action item
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"action_item": {
"title": "Alert on upstream pool size",
"assignee_id": "uuid"
}
}`)
req, _ := http.NewRequest("POST", "https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items", body)
req.Header.Set("Authorization", "Bearer "+yourToken)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}
# Create action item
require 'net/http'
require 'uri'
uri = URI('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = <<~JSON
{
"action_item": {
"title": "Alert on upstream pool size",
"assignee_id": "uuid"
}
}
JSON
response = http.request(request)
puts response.code, response.body
<?php
// Create action item
$ch = curl_init('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
"action_item": {
"title": "Alert on upstream pool size",
"assignee_id": "uuid"
}
}
JSON);
$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);