Files
2026-06-04 12:09:45 -03:00

39 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Planview Adaptive Work — REST API V2 (reference)
Official guide: [REST API Guide Version 2](https://success.planview.com/Planview_AdaptiveWork/API/REST_API_Guide_Version_2)
Live operation/type reference: [https://api.clarizen.com/V2.0/services/](https://api.clarizen.com/V2.0/services/) (requires `Accept: text/html` or API auth)
## Auth flow (password)
1. `POST authentication/getServerDefinition``serverLocation` (org datacenter, e.g. `https://api2.clarizen.com/V2.0/services`)
2. `POST authentication/login` on that base URL → `sessionId`
3. Subsequent calls: `Authorization: Session {sessionId}`
API keys use `Authorization: ApiKey {token}` on the orgs API host (often discoverable via `getServerDefinition` with the key).
## Entity CRUD
`/V2.0/services/data/objects/{typeName}` — PUT create
`/V2.0/services/data/objects/{typeName}/{id}` — GET retrieve, POST update, DELETE remove
Field selection on GET: `?fields=CreatedOn,CreatedBy.Name`
## Queries
- `data/entityQuery` — structured `where` (`Condition`), `orders`, `paging` (`from` / `limit`)
- `data/query` — CZQL (`?q=SELECT ...`)
- Conditions may include `_type: 'Compare'` (optional; see guide examples)
## Operations notes
- Prefer `Accept-Encoding: gzip` on requests
- Errors: HTTP 500 body with `errorCode`, `message`, `referenceId`
- Session idle timeout ~10 minutes; max 2 concurrent sessions per user
- Rate limit: ~25 requests/second per organization (bulk inner calls count separately)
## Related Planview articles (same site)
- [API Keys Support](https://success.planview.com/Planview_AdaptiveWork/API/API_Keys_Support) (sibling under API)
- CZQL — linked from the v2 guide “New Features” section