> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/iacm-api-reference/costs/list-costs-per-workspace.md).

# List costs per workspace

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

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"costs","description":"Costs Service handles the API related with the costs attached to workspaces.\nThis API is read only as all the cost are generated in the plugin side"}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/costs/{workspace}":{"get":{"tags":["costs"],"summary":"List costs per workspace","description":"List the cost of the workspace and correlate it with the executions","operationId":"costs#list-costs-per-workspace","parameters":[{"name":"limit","in":"query","description":"Limit is the number of records to return for a page.","allowEmptyValue":true,"schema":{"type":"integer","description":"Limit is the number of records to return for a page.","default":30,"format":"int64","minimum":1,"maximum":1000}},{"name":"page","in":"query","description":"Page is the page number to return relative to the page 'limit'.","allowEmptyValue":true,"schema":{"type":"integer","description":"Page is the page number to return relative to the page 'limit'.","default":1,"format":"int64","minimum":1}},{"name":"start_time","in":"query","description":"Specify the start time for the query","allowEmptyValue":true,"schema":{"type":"integer","description":"Specify the start time for the query","format":"int64"}},{"name":"end_time","in":"query","description":"Specify the end time limit for the query","allowEmptyValue":true,"schema":{"type":"integer","description":"Specify the end time limit for the query","format":"int64"}},{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace id to retrieve the cost and the metadata associated with it","required":true,"schema":{"type":"string","description":"Workspace id to retrieve the cost and the metadata associated with it"}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostResourceCollection"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CostResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmCostsresources"}},"HarnessIacmCostsresources":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"activity_type":{"type":"string","description":"The type of activity that generated this cost (e.g. apply, plan, destroy)"},"cost":{"type":"string","description":"The cost associated to the execution metadata"},"created":{"type":"integer","description":"The epoch time for the cost","format":"int64"},"currency":{"type":"string","description":"The currency for the cost"},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"pipeline":{"type":"string","description":"The unique identifier for the associated pipeline"},"pipeline_execution_id":{"type":"string","description":"The unique identifier for the associated pipeline execution"},"pipeline_stage_id":{"type":"string","description":"The unique identifier for the associated pipeline stage"},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"workspace":{"type":"string","description":"The unique identifier for the associated workspace"}},"description":"CostResource is the representation for a single workspace of the cost and metadata that ties the cost to an execution.","required":["account","org","project","pipeline_execution_id","pipeline_stage_id","workspace","pipeline","workspace_id","workspace_name","currency","cost","created"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
