Create report from showback
curl --request POST \
--url https://api.nops.io/v1/cost-allocation/{id}/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Engineering allocation — last month"
}
'import requests
url = "https://api.nops.io/v1/cost-allocation/{id}/reports"
payload = { "name": "Engineering allocation — last month" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Engineering allocation — last month'})
};
fetch('https://api.nops.io/v1/cost-allocation/{id}/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/cost-allocation/{id}/reports"
payload := strings.NewReader("{\n \"name\": \"Engineering allocation — last month\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"report": {
"id": "report-1",
"name": "Engineering allocation — last month",
"scope": "private",
"config": {
"dateRange": {
"start": "2026-05-31",
"end": "2026-06-29"
},
"groupBy": "product_product_name",
"costType": "line_item_unblended_cost",
"granularity": "day",
"filters": []
},
"organizationId": "org-1",
"nopsClientId": 42,
"creatorId": "user-1",
"createdAt": "2026-07-17T12:00:00.000Z",
"updatedAt": "2026-07-17T12:00:00.000Z",
"creator": {
"id": "user-1",
"firstName": "FinOps",
"lastName": "Analyst",
"email": "finops@example.com"
}
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Cost allocation
Create report from showback
Creates a saved Explorer report pre-scoped to this showback (groupBy and the showback overlay are derived automatically). Optional config overrides costType, granularity, date range, and filters. Defaults to the last 30 days when no date is given.
POST
https://api.nops.io
/
v1
/
cost-allocation
/
{id}
/
reports
Create report from showback
curl --request POST \
--url https://api.nops.io/v1/cost-allocation/{id}/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Engineering allocation — last month"
}
'import requests
url = "https://api.nops.io/v1/cost-allocation/{id}/reports"
payload = { "name": "Engineering allocation — last month" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Engineering allocation — last month'})
};
fetch('https://api.nops.io/v1/cost-allocation/{id}/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/cost-allocation/{id}/reports"
payload := strings.NewReader("{\n \"name\": \"Engineering allocation — last month\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"report": {
"id": "report-1",
"name": "Engineering allocation — last month",
"scope": "private",
"config": {
"dateRange": {
"start": "2026-05-31",
"end": "2026-06-29"
},
"groupBy": "product_product_name",
"costType": "line_item_unblended_cost",
"granularity": "day",
"filters": []
},
"organizationId": "org-1",
"nopsClientId": 42,
"creatorId": "user-1",
"createdAt": "2026-07-17T12:00:00.000Z",
"updatedAt": "2026-07-17T12:00:00.000Z",
"creator": {
"id": "user-1",
"firstName": "FinOps",
"lastName": "Analyst",
"email": "finops@example.com"
}
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
Headers
Body
application/json
Was this page helpful?