Skip to content
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: ui9
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: pv
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: ["Expedita qui.","Facilis rem ipsam et aut."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: c
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: c
Accept: */*
{
  "pageSize": 50,
  "totalItems": 1800,
  "totalPages": 36,
  "workspaces": [
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Modi iure tenetur iusto.",
      "workspace_name": "Rem consequuntur repellat sit ex velit."
    },
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Modi iure tenetur iusto.",
      "workspace_name": "Rem consequuntur repellat sit ex velit."
    },
    {
      "cost": "12.13",
      "created": 1672531200,
      "currency": "USD",
      "workspace_id": "Modi iure tenetur iusto.",
      "workspace_name": "Rem consequuntur repellat sit ex velit."
    }
  ]
}

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: 6
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: xjg
workspacestringRequired

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

Example: Praesentium vel ipsum dolorum.
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: jk7
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: jk7
Accept: */*
[
  {
    "account": "p",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "m",
    "pipeline": "Ab consequatur soluta iure ea.",
    "pipeline_execution_id": "Velit inventore.",
    "pipeline_stage_id": "Ea voluptatem minus assumenda atque.",
    "project": "ryg",
    "workspace": "Reprehenderit distinctio quis unde quasi aut nihil."
  },
  {
    "account": "p",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "m",
    "pipeline": "Ab consequatur soluta iure ea.",
    "pipeline_execution_id": "Velit inventore.",
    "pipeline_stage_id": "Ea voluptatem minus assumenda atque.",
    "project": "ryg",
    "workspace": "Reprehenderit distinctio quis unde quasi aut nihil."
  },
  {
    "account": "p",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "m",
    "pipeline": "Ab consequatur soluta iure ea.",
    "pipeline_execution_id": "Velit inventore.",
    "pipeline_stage_id": "Ea voluptatem minus assumenda atque.",
    "project": "ryg",
    "workspace": "Reprehenderit distinctio quis unde quasi aut nihil."
  },
  {
    "account": "p",
    "activity_type": "apply",
    "cost": "12.13",
    "created": 1672531200,
    "currency": "USD",
    "org": "m",
    "pipeline": "Ab consequatur soluta iure ea.",
    "pipeline_execution_id": "Velit inventore.",
    "pipeline_stage_id": "Ea voluptatem minus assumenda atque.",
    "project": "ryg",
    "workspace": "Reprehenderit distinctio quis unde quasi aut nihil."
  }
]

Last updated

Was this helpful?