Przejdź do treści

DarhimLabs API

Migration guide: v2 to v3

Pre-release guide dla deprecations API v2, w tym agent runs postmortem.

Migration guide: v2 to v3

Ten guide jest pre-release. Zbieramy tu zmiany, ktore maja naglowki Deprecation, Sunset i Link.

Runs postmortem

GET /agents/{id}/runs?include=postmortem jest deprecated od v2.4.0 i zostanie usuniete w v3.0.0.

Zamiast laczyc liste runow z ciezkim postmortem, pobierz liste, a potem szczegoly wybranego runa:

curl "https://api.darhimlabs.pl/api/v2/agents/agent_123/runs?limit=20" \
  -H "Authorization: Bearer $DARHIMLABS_API_KEY"

curl "https://api.darhimlabs.pl/api/v2/agents/agent_123/runs/run_456" \
  -H "Authorization: Bearer $DARHIMLABS_API_KEY"

Before

const runs = await fetch(
  "https://api.darhimlabs.pl/api/v2/agents/agent_123/runs?include=postmortem",
  { headers: { Authorization: `Bearer ${apiKey}` } }
);

After

const page = await client.agents.runs.list("agent_123", { limit: 20 });
const run = await client.agents.runs.get("agent_123", page.data[0].id);

Headers returned by deprecated calls

Deprecation: true
Sunset: Wed, 31 Dec 2026 23:59:59 GMT
Link: </docs/migration/v2-to-v3#runs-postmortem>; rel="deprecation"

FAQ

Czy zwykle GET /agents/{id}/runs znika?

Nie. Deprecated jest tylko wzorzec z include=postmortem. Lista runow zostaje.

Dlaczego to zmieniacie?

Postmortem potrafi byc duze. Rozdzielenie listy i szczegolow zmniejsza latency i koszt payloadow w dashboardach oraz cronach.

Kiedy musze zmigrowac?

Najpozniej do 2026-12-31. Po tej dacie v3 moze nie obslugiwac include=postmortem.