For the complete documentation index, see llms.txt. This page is also available as Markdown.

Costs

Costs Service handles the API related with the costs attached to workspaces. This API is read only as all the cost are generated in the plugin side

List costs

get

List the monthly cost per each workspace

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 3
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: yj
Query parameters
start_timeinteger · int64Optional

Specify the start time for the query

Example: 1691150743950
end_timeinteger · int64Optional

Specify the end time limit for the query

Example: 1691150743950
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
workspacesstring[]Optional

Filter the workspaces to retrieve the cost

Example: ["Dolorem ullam eos.","Et doloribus et quasi dolor et.","Mollitia possimus iure ad."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: tqj
Responses
200

OK response.

application/json
pageSizeinteger · int64Required

Current page size

Example: 50
totalItemsinteger · int64Required

Total items available

Example: 1800
totalPagesinteger · int64Required

Total pages available

Example: 36
get/api/orgs/{org}/projects/{project}/costs
GET /api/orgs/{org}/projects/{project}/costs HTTP/1.1
Host: localhost:80
Harness-Account: tqj
Accept: */*
{
  "pageSize": 50,
  "totalItems": 1800,
  "totalPages": 36,
  "workspaces": [
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Unde qui ab rerum.",
      "workspace_name": "Aperiam sapiente hic."
    },
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Unde qui ab rerum.",
      "workspace_name": "Aperiam sapiente hic."
    },
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Unde qui ab rerum.",
      "workspace_name": "Aperiam sapiente hic."
    },
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Unde qui ab rerum.",
      "workspace_name": "Aperiam sapiente hic."
    }
  ]
}

List costs per workspace

get

List the cost of the workspace and correlate it with the executions

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: s
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7b
workspacestringRequired

Workspace id to retrieve the cost and the metadata associated with it

Example: Sit sunt aut.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
start_timeinteger · int64Optional

Specify the start time for the query

Example: 1691150743950
end_timeinteger · int64Optional

Specify the end time limit for the query

Example: 1691150743950
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: wqi
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/costs/{workspace}
GET /api/orgs/{org}/projects/{project}/costs/{workspace} HTTP/1.1
Host: localhost:80
Harness-Account: wqi
Accept: */*
[
  {
    "account": "dl",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "id5",
    "pipeline": "Similique consequatur veritatis id nam.",
    "pipeline_execution_id": "Debitis eos dolorem voluptatibus.",
    "pipeline_stage_id": "Omnis nesciunt fuga dolores est.",
    "project": "1c",
    "workspace": "Asperiores dolorem qui laborum est."
  },
  {
    "account": "dl",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "id5",
    "pipeline": "Similique consequatur veritatis id nam.",
    "pipeline_execution_id": "Debitis eos dolorem voluptatibus.",
    "pipeline_stage_id": "Omnis nesciunt fuga dolores est.",
    "project": "1c",
    "workspace": "Asperiores dolorem qui laborum est."
  }
]

Last updated

Was this helpful?