RankPilot API

Send an API key as a Bearer token. Every response carries data_through, coverage and rate-limit headers; limits are shared by every key of a workspace.

Work loop

GET/findings

Findings from the latest detector runs

Parameters of GET /findings
NameInTypeRequired
limitqueryinteger 1-1000no
cursorquerystringno
property_idquerystring (uuid)no
kindquerystringno

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/findings"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/findings", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/findings/{id}

One finding

Parameters of GET /findings/{id}
NameInTypeRequired
idpathstringyes

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/findings/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/findings/<property-id>", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/investigations

Investigations

Parameters of GET /investigations
NameInTypeRequired
limitqueryinteger 1-1000no
cursorquerystringno
property_idquerystring (uuid)no
statusquerystringno

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/investigations"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/investigations", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/investigations/{id}

One investigation with hypotheses, tier language and calibrated confidence

Parameters of GET /investigations/{id}
NameInTypeRequired
idpathstringyes

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/investigations/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/investigations/<property-id>", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/tasks

Tasks

Parameters of GET /tasks
NameInTypeRequired
limitqueryinteger 1-1000no
cursorquerystringno
property_idquerystring (uuid)no
statusquerystringno
kindquerystringno

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/tasks"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/tasks", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

POST/tasksWrite key, Pro

Create a task; risky kinds wait for a person to approve them

Parameters of POST /tasks
NameInTypeRequired
Idempotency-Keyheaderstringno

curl

curl -X POST -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"property_id":"<property_id>","kind":"<kind>","title":"<title>","priority":"<priority>","summary_md":"<summary_md>","instructions_md":"<instructions_md>","urls":[],"finding_id":"<finding_id>","investigation_id":"<investigation_id>"}' \
  "https://rank.hanzla.com/api/v1/tasks"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/tasks", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"property_id":"<property_id>","kind":"<kind>","title":"<title>","priority":"<priority>","summary_md":"<summary_md>","instructions_md":"<instructions_md>","urls":[],"finding_id":"<finding_id>","investigation_id":"<investigation_id>"}),
});
console.log(await res.json());

GET/tasks/{id}

One task

Parameters of GET /tasks/{id}
NameInTypeRequired
idpathstringyes

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/tasks/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/tasks/<property-id>", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

PATCH/tasks/{id}Write key, Pro

Move a task to in_progress or deployed, or comment

Parameters of PATCH /tasks/{id}
NameInTypeRequired
idpathstringyes

curl

curl -X PATCH -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"<status>","note":"<note>","evidence_url":"<evidence_url>","attestation":true,"expected_rev":0}' \
  "https://rank.hanzla.com/api/v1/tasks/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/tasks/<property-id>", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"status":"<status>","note":"<note>","evidence_url":"<evidence_url>","attestation":true,"expected_rev":0}),
});
console.log(await res.json());

GET/outcomes

Measured outcomes and the track record

Parameters of GET /outcomes
NameInTypeRequired
property_idquerystring (uuid)no
kindquerystringno

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/outcomes"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/outcomes", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/outcomes/{id}

The outcome of one task

Parameters of GET /outcomes/{id}
NameInTypeRequired
idpathstringyes

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/outcomes/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/outcomes/<property-id>", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/goals

The business goal of every readable property

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/goals"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/goals", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

GET/goals/{id}

The goal of one property (id is the property id)

Parameters of GET /goals/{id}
NameInTypeRequired
idpathstringyes

curl

curl -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  "https://rank.hanzla.com/api/v1/goals/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/goals/<property-id>", {
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
  },
});
console.log(await res.json());

PUT/goals/{id}Write key, Pro

Set the goal of one property (id is the property id)

Parameters of PUT /goals/{id}
NameInTypeRequired
idpathstringyes

curl

curl -X PUT -H "Authorization: Bearer $RANKPILOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"<kind>","unitsPerClick":"<unitsPerClick>","unitsPerClickSource":"<unitsPerClickSource>","valuePerUnit":"<valuePerUnit>","currency":"<currency>","effortCapacityHoursWeek":"<effortCapacityHoursWeek>","hourValue":"<hourValue>","visibilityWeights":"<visibilityWeights>","portfolioWeights":"<portfolioWeights>"}' \
  "https://rank.hanzla.com/api/v1/goals/<property-id>"

Node

const res = await fetch("https://rank.hanzla.com/api/v1/goals/<property-id>", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.RANKPILOT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"kind":"<kind>","unitsPerClick":"<unitsPerClick>","unitsPerClickSource":"<unitsPerClickSource>","valuePerUnit":"<valuePerUnit>","currency":"<currency>","effortCapacityHoursWeek":"<effortCapacityHoursWeek>","hourValue":"<hourValue>","visibilityWeights":"<visibilityWeights>","portfolioWeights":"<portfolioWeights>"}),
});
console.log(await res.json());