Get margin by project type
curl --request GET \ --url https://example.com/api/v1/reports/capacity-type-margin \ --header 'Authorization: Bearer <token>'Median margin percentage per project type (R17), over the same closed-project sample as the Profile by type report. Requires both reports.view and reports.costs.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”One margin row per project type.
object
Median margin percentage by project type, over the same closed-project sample.
object
Example generated
{ "data": [ { "medianMarginPercent": 1, "minimumSampleSize": 1, "n": 1, "typeId": "example", "typeName": "example", "unbilledCount": 1 } ]}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Missing the reports.costs permission.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC