UptimeTea

API Documentation

The UptimeTea API is easy to use and free for all plans.

Update action item

Renames, reassigns or completes an action item.

PATCH https://api.uptimetea.com/incidents/:incident_id/postmortem/action_items/:id

Headers

  • AuthorizationREQUIREDSTRING
    Bearer $TOKEN
  • Content-TypeREQUIREDSTRING
    application/json

Body parameters

  • action_item.titleSTRING

    What needs to be done.

  • action_item.assignee_idSTRING

    ID of the team member who owns the task.

  • action_item.completedBOOLEAN

    true sets completed_at, false clears it.

Response body

{
  "id": "uuid",
  "title": "Alert on upstream pool size",
  "assignee_id": "uuid",
  "completed_at": "2024-01-16T09:00:00Z",
  "created_at": "2024-01-15T12:00:00Z"
}

Code examples

curl -X PATCH "https://api.uptimetea.com/incidents/$INCIDENT_ID/postmortem/action_items/$ACTION_ITEM_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action_item": {
      "completed": true
    }
  }'
// Update action item
const response = await fetch('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items/ACTION_ITEM_ID', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer ' + yourToken,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "action_item": {
      "completed": true
    }
  })
});

const data = await response.json();
console.log(data);
# Update action item
import requests

headers = {'Authorization': f'Bearer {your_token}'}

response = requests.patch(
    'https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items/ACTION_ITEM_ID',
    headers=headers,
    json={
        'action_item': {
            'completed': True
        }
    }
)

print(response.json())
// Update action item
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    body := strings.NewReader(`{
      "action_item": {
        "completed": true
      }
    }`)
    req, _ := http.NewRequest("PATCH", "https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items/ACTION_ITEM_ID", 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))
}
# Update action item
require 'net/http'
require 'uri'

uri = URI('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items/ACTION_ITEM_ID')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = <<~JSON
  {
    "action_item": {
      "completed": true
    }
  }
JSON

response = http.request(request)
puts response.code, response.body
<?php
// Update action item
$ch = curl_init('https://api.uptimetea.com/incidents/INCIDENT_ID/postmortem/action_items/ACTION_ITEM_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $yourToken,
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<'JSON'
{
  "action_item": {
    "completed": true
  }
}
JSON);

$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);