# List resources

List resources associated with this workspace.

Endpoint: GET /iacm/api/orgs/{org}/projects/{project}/workspaces/{identifier}/resources
Version: 1.0
Security: x-api-key

## Query parameters:

  - `limit` (integer)
    Limit is the number of records to return for a page. When omitted, all records are returned.
    Example: 30

  - `page` (integer)
    Page is the page number to return relative to the page 'limit'. When omitted, all records are returned.
    Example: 1

  - `resource_types` (array)
    Resource types to filter by.
    Example: ["aws_instance","google_compute_instance"]

## Path parameters:

  - `org` (string, required)
    Org is the organisation identifier.
    Example: "n"

  - `project` (string, required)
    Project is the project identifier.
    Example: "u9"

  - `identifier` (string, required)
    Workspace identifier.
    Example: "mt"

## Header parameters:

  - `Harness-Account` (string, required)
    Account is the internal customer account ID.
    Example: "b"

## Response 200 fields (application/json):

  - `data_sources` (array, required)
    Example: [{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"}]

  - `data_sources.attributes` (object, required)
    A map of values related to the resource
    Example: {"ami":"ami-830c94ec","instance_type":"t2.micro"}

  - `data_sources.createdAt` (integer)
    Timestamp when the resource was created.
    Example: 1627590400

  - `data_sources.drift_attributes` (object, required)
    A map of values related to the resource
    Example: {"instance_type":"t2.nano"}

  - `data_sources.drift_status` (string, required)
    Indicates if this resource is experiencing drift.
    Enum: "changed", "deleted", "unchanged"

  - `data_sources.lastSyncedAt` (integer)
    Timestamp when the resource was last updated.
    Example: 1627686800

  - `data_sources.mode` (string, required)
    Mode associated with the resource.
    Enum: "resource", "data", "output"

  - `data_sources.module` (string, required)
    Module associated with the resource.
    Example: "full_stack"

  - `data_sources.monthly_cost` (number)
    Current period cost from CCM (null if no cost data).
    Example: 0.5497077503678112

  - `data_sources.monthly_saving` (number)
    Monthly potential saving from CCM (null if no cost data).
    Example: 0.8619061769391817

  - `data_sources.name` (string, required)
    Name associated with the resource.
    Example: "app_server"

  - `data_sources.path_id` (string, required)
    Path associated with the resource. Could be namespace, environment or stack id.
    Example: "namespace"

  - `data_sources.provider` (string, required)
    Cloud provider associated with the resource.
    Example: "AWS"

  - `data_sources.recommendation_count` (integer)
    Number of CCM recommendations for this resource (null if no cost data).
    Example: 7888905466721955000

  - `data_sources.resource_id` (string, required)
    Unique identifier for the resource from the cloud provider.
    Example: "arn:aws:s3:::my-bucket"

  - `data_sources.sensitive_attributes` (array, required)
    A list of the sensitive attribute keys
    Example: ["instance_type"]

  - `data_sources.type` (string, required)
    Type of the provisioned resource.
    Example: "S3 Bucket"

  - `outputs` (array, required)
    Example: [{"expression":"<+outputs.instance_id>","name":"instance_public_ip","sensitive":true,"stack_path":"IaCM/TGOverride/environments/dev/ec2","value":"Ipsam occaecati nihil id recusandae modi."},{"expression":"<+outputs.instance_id>","name":"instance_public_ip","sensitive":true,"stack_path":"IaCM/TGOverride/environments/dev/ec2","value":"Ipsam occaecati nihil id recusandae modi."},{"expression":"<+outputs.instance_id>","name":"instance_public_ip","sensitive":true,"stack_path":"IaCM/TGOverride/environments/dev/ec2","value":"Ipsam occaecati nihil id recusandae modi."},{"expression":"<+outputs.instance_id>","name":"instance_public_ip","sensitive":true,"stack_path":"IaCM/TGOverride/environments/dev/ec2","value":"Ipsam occaecati nihil id recusandae modi."}]

  - `outputs.expression` (string)
    JEXL expression for dynamic output resolution
    Example: "<+outputs.instance_id>"

  - `outputs.name` (string, required)
    Name associated with the output.
    Example: "instance_public_ip"

  - `outputs.sensitive` (boolean, required)
    Indicates whether this value is sensitive
    Example: true

  - `outputs.stack_path` (string)
    Stack path for Terragrunt workspaces
    Example: "IaCM/TGOverride/environments/dev/ec2"

  - `outputs.value` (string, required)
    Value associated with the output.
    Example: "Omnis culpa et ex rerum eligendi."

  - `resources` (array, required)
    Example: [{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"createdAt":1627590400,"drift_attributes":{"instance_type":"t2.nano"},"drift_status":"changed","lastSyncedAt":1627686800,"mode":"resource","module":"full_stack","monthly_cost":0.32546890397784883,"monthly_saving":0.35814372810159073,"name":"app_server","path_id":"namespace","provider":"AWS","recommendation_count":8335073474648751000,"resource_id":"arn:aws:s3:::my-bucket","sensitive_attributes":["instance_type"],"type":"S3 Bucket"}]

  - `stack_outputs` (object)
    Outputs grouped by stack path for Terragrunt workspaces
    Example: {"IaCM/TGOverride/environments/dev/ec2":[{"name":"instance_id","sensitive":false,"stack_path":"IaCM/TGOverride/environments/dev/ec2","value":"i-1234567890abcdef0"}]}

  - `total_resources` (integer, required)
    Total number of resources managed by this workspace
    Example: 42

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?

  - `timeout` (boolean, required)
    Is the error a timeout?
    Example: true


