> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/api-documentation/api-reference/api--cloud-security/queries/get-cloud-items.md).

# getCloudItems

Retrieves cloud security items including cloud resources, containers, and their security posture.

### Examples

{% tabs %}
{% tab title="GraphQL" %}

```graphql
query GetCloudItems($cloudItemsInput: CloudItemsInput) {
  getCloudItems(cloudItemsInput: $cloudItemsInput) {
    cloudItems {
      id
      assetName
      service
      resourceId
      cbomId
      cbomProvider
      resourceType
      resourceName
      accountId
      firstSeen
      cloudProvider
      serviceCategory
      applications {
        id
        name
        type
      }
      isExposed
      isPermissiveIdentity
      isHighPrivilege
      isSensitiveData
      contextFactors
      imageSource
      registryType
      registryName
      imageScanStatus
      exposurePath {
        type
        name
        cbomId
      }
      accountName
      subService
      region
      resourceTags
      authenticationRequired
      reachability {
        confirmed
        responseCode
        authTagValue
        conclusion
        playbook
        steps
        manualCheck
        response
      }
      resourceArn
      images {
        name
        hashes {
          hash
          isFromRegistry
        }
        tags
      }
      relatedIssues {
        info
        low
        medium
        high
        critical
        appox
      }
      issueSeverityBreakdown {
        name
        severities {
          info
          low
          medium
          high
          critical
          appox
        }
      }
      issuesStats {
        totalIssues
        sourceTools {
          name
          total
        }
        categories {
          name
          total
        }
        severities {
          name
          total
        }
      }
      cluster
      link
      imageHash
      workloads {
        type
        namespace
        name
        cluster
        region
        isExposed
        consoleLink
        exposurePath {
          type
          name
          cbomId
        }
      }
      artifactIds
      attachedIdentities {
        users
        groups
        servicePrincipals
        serviceAccounts
        iamPolicies
        attachedResources
        trustedBy
      }
      compliance {
        checkId
        status
        frameworks
      }
      usageSeries {
        source
        countMetric
        tokenMetric
        windowDays
        daily {
          day
          count
          tokens
          countBuckets
          tokenBuckets
        }
      }
      isAiAsset
      isTrainingData
      modelInfo {
        moduleName
        moduleVersion
        vendor
        family
        modelClass
        where
        matched
      }
      trainingDataInfo {
        dataType
        location
        locationType
        locationPath
        storageType
      }
      tools {
        name
        type
        target
        where
        matched
        args
      }
      dataAccess {
        name
        where
        matched
      }
      probeResults {
        url
        type
        statusCode
        curl
        connectedAsset {
          name
          cbomId
        }
      }
    }
    offset
    topOffset
    total
    totalFiltered
    selectedPosition
  }
}
```

#### Variables

This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.

```json
{
  "cloudItemsInput": {
    "limit": 100,
    "offset": 0,
    "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
    "dateRange": {
      "from": 1749000000000,
      "to": 1749900000000
    },
    "filters": {
      "apps": ["example"],
      "service": ["example"],
      "type": ["example"],
      "cloudProvider": ["example"],
      "assetName": ["example"],
      "accountId": ["example"],
      "region": ["example"],
      "serviceCategory": ["example"],
      "cluster": ["example"],
      "severities": ["example"],
      "isExposed": ["example"],
      "reachability": ["example"],
      "authentication": ["example"],
      "verdict": ["example"],
      "reachabilityResponseCode": ["example"],
      "imageSource": ["example"],
      "registryType": ["example"],
      "registryName": ["example"],
      "imageScanStatus": ["example"],
      "artifactIds": ["example"]
    },
    "filterSearch": [
      {
        "fieldName": "example",
        "value": ["example"]
      }
    ],
    "owners": ["example"],
    "tagIds": ["example"],
    "search": "example",
    "openItems": ["digest"],
    "orderBy": {
      "field": "example",
      "direction": "ASC"
    },
    "topOffset": 42,
    "scrollDirection": "example",
    "cbomId": "example",
    "cbomIds": ["example"]
  }
}
```

{% endtab %}

{% tab title="cURL" %}

```shell
curl -X POST \
https://api.cloud.ox.security/api/apollo-gateway \
-H 'Content-Type: application/json' \
-H 'Authorization: YOUR_API_TOKEN' \
-d '{
 "query": "query GetCloudItems($cloudItemsInput: CloudItemsInput) { getCloudItems(cloudItemsInput: $cloudItemsInput) { cloudItems { id assetName service resourceId cbomId cbomProvider resourceType resourceName accountId firstSeen cloudProvider serviceCategory applications { id name type } isExposed isPermissiveIdentity isHighPrivilege isSensitiveData contextFactors imageSource registryType registryName imageScanStatus exposurePath { type name cbomId } accountName subService region resourceTags authenticationRequired reachability { confirmed responseCode authTagValue conclusion playbook steps manualCheck response } resourceArn images { name hashes { hash isFromRegistry } tags } relatedIssues { info low medium high critical appox } issueSeverityBreakdown { name severities { info low medium high critical appox } } issuesStats { totalIssues sourceTools { name total } categories { name total } severities { name total } } cluster link imageHash workloads { type namespace name cluster region isExposed consoleLink exposurePath { type name cbomId } } artifactIds attachedIdentities { users groups servicePrincipals serviceAccounts iamPolicies attachedResources trustedBy } compliance { checkId status frameworks } usageSeries { source countMetric tokenMetric windowDays daily { day count tokens countBuckets tokenBuckets } } isAiAsset isTrainingData modelInfo { moduleName moduleVersion vendor family modelClass where matched } trainingDataInfo { dataType location locationType locationPath storageType } tools { name type target where matched args } dataAccess { name where matched } probeResults { url type statusCode curl connectedAsset { name cbomId } } } offset topOffset total totalFiltered selectedPosition } }",
 "variables": {
    "cloudItemsInput": {
      "limit": 100,
      "offset": 0,
      "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
      "dateRange": {
        "from": 1749000000000,
        "to": 1749900000000
      },
      "filters": {
        "apps": ["example"],
        "service": ["example"],
        "type": ["example"],
        "cloudProvider": ["example"],
        "assetName": ["example"],
        "accountId": ["example"],
        "region": ["example"],
        "serviceCategory": ["example"],
        "cluster": ["example"],
        "severities": ["example"],
        "isExposed": ["example"],
        "reachability": ["example"],
        "authentication": ["example"],
        "verdict": ["example"],
        "reachabilityResponseCode": ["example"],
        "imageSource": ["example"],
        "registryType": ["example"],
        "registryName": ["example"],
        "imageScanStatus": ["example"],
        "artifactIds": ["example"]
      },
      "filterSearch": [
        {
          "fieldName": "example",
          "value": ["example"]
        }
      ],
      "owners": ["example"],
      "tagIds": ["example"],
      "search": "example",
      "openItems": ["digest"],
      "orderBy": {
        "field": "example",
        "direction": "ASC"
      },
      "topOffset": 42,
      "scrollDirection": "example",
      "cbomId": "example",
      "cbomIds": ["example"]
    }
  }
}'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const query = 'query GetCloudItems($cloudItemsInput: CloudItemsInput) { getCloudItems(cloudItemsInput: $cloudItemsInput) { cloudItems { id assetName service resourceId cbomId cbomProvider resourceType resourceName accountId firstSeen cloudProvider serviceCategory applications { id name type } isExposed isPermissiveIdentity isHighPrivilege isSensitiveData contextFactors imageSource registryType registryName imageScanStatus exposurePath { type name cbomId } accountName subService region resourceTags authenticationRequired reachability { confirmed responseCode authTagValue conclusion playbook steps manualCheck response } resourceArn images { name hashes { hash isFromRegistry } tags } relatedIssues { info low medium high critical appox } issueSeverityBreakdown { name severities { info low medium high critical appox } } issuesStats { totalIssues sourceTools { name total } categories { name total } severities { name total } } cluster link imageHash workloads { type namespace name cluster region isExposed consoleLink exposurePath { type name cbomId } } artifactIds attachedIdentities { users groups servicePrincipals serviceAccounts iamPolicies attachedResources trustedBy } compliance { checkId status frameworks } usageSeries { source countMetric tokenMetric windowDays daily { day count tokens countBuckets tokenBuckets } } isAiAsset isTrainingData modelInfo { moduleName moduleVersion vendor family modelClass where matched } trainingDataInfo { dataType location locationType locationPath storageType } tools { name type target where matched args } dataAccess { name where matched } probeResults { url type statusCode curl connectedAsset { name cbomId } } } offset topOffset total totalFiltered selectedPosition } }';

fetch("https://api.cloud.ox.security/api/apollo-gateway", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_TOKEN"
  },
  body: JSON.stringify({
    query: query,
    // This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.
    variables: {
      cloudItemsInput: {
        limit: 100,
        offset: 0,
        scanId: "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
        dateRange: {
          from: 1749000000000,
          to: 1749900000000
        },
        filters: {
          apps: ["example"],
          service: ["example"],
          type: ["example"],
          cloudProvider: ["example"],
          assetName: ["example"],
          accountId: ["example"],
          region: ["example"],
          serviceCategory: ["example"],
          cluster: ["example"],
          severities: ["example"],
          isExposed: ["example"],
          reachability: ["example"],
          authentication: ["example"],
          verdict: ["example"],
          reachabilityResponseCode: ["example"],
          imageSource: ["example"],
          registryType: ["example"],
          registryName: ["example"],
          imageScanStatus: ["example"],
          artifactIds: ["example"]
        },
        filterSearch: [
          {
            fieldName: "example",
            value: ["example"]
          }
        ],
        owners: ["example"],
        tagIds: ["example"],
        search: "example",
        openItems: ["digest"],
        orderBy: {
          field: "example",
          direction: "ASC"
        },
        topOffset: 42,
        scrollDirection: "example",
        cbomId: "example",
        cbomIds: ["example"]
      }
    }
  })
})
.then(response => response.json())
.then(result => console.log(JSON.stringify(result, null, 2)))
.catch(error => console.error('Error:', error));
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

query = 'query GetCloudItems($cloudItemsInput: CloudItemsInput) { getCloudItems(cloudItemsInput: $cloudItemsInput) { cloudItems { id assetName service resourceId cbomId cbomProvider resourceType resourceName accountId firstSeen cloudProvider serviceCategory applications { id name type } isExposed isPermissiveIdentity isHighPrivilege isSensitiveData contextFactors imageSource registryType registryName imageScanStatus exposurePath { type name cbomId } accountName subService region resourceTags authenticationRequired reachability { confirmed responseCode authTagValue conclusion playbook steps manualCheck response } resourceArn images { name hashes { hash isFromRegistry } tags } relatedIssues { info low medium high critical appox } issueSeverityBreakdown { name severities { info low medium high critical appox } } issuesStats { totalIssues sourceTools { name total } categories { name total } severities { name total } } cluster link imageHash workloads { type namespace name cluster region isExposed consoleLink exposurePath { type name cbomId } } artifactIds attachedIdentities { users groups servicePrincipals serviceAccounts iamPolicies attachedResources trustedBy } compliance { checkId status frameworks } usageSeries { source countMetric tokenMetric windowDays daily { day count tokens countBuckets tokenBuckets } } isAiAsset isTrainingData modelInfo { moduleName moduleVersion vendor family modelClass where matched } trainingDataInfo { dataType location locationType locationPath storageType } tools { name type target where matched args } dataAccess { name where matched } probeResults { url type statusCode curl connectedAsset { name cbomId } } } offset topOffset total totalFiltered selectedPosition } }'

response = requests.post(
  "https://api.cloud.ox.security/api/apollo-gateway",
  headers={
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_TOKEN"
  },
  json={
    "query": query,
    # This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.
    "variables": {
      "cloudItemsInput": {
        "limit": 100,
        "offset": 0,
        "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
        "dateRange": {
          "from": 1749000000000,
          "to": 1749900000000
        },
        "filters": {
          "apps": ["example"],
          "service": ["example"],
          "type": ["example"],
          "cloudProvider": ["example"],
          "assetName": ["example"],
          "accountId": ["example"],
          "region": ["example"],
          "serviceCategory": ["example"],
          "cluster": ["example"],
          "severities": ["example"],
          "isExposed": ["example"],
          "reachability": ["example"],
          "authentication": ["example"],
          "verdict": ["example"],
          "reachabilityResponseCode": ["example"],
          "imageSource": ["example"],
          "registryType": ["example"],
          "registryName": ["example"],
          "imageScanStatus": ["example"],
          "artifactIds": ["example"]
        },
        "filterSearch": [
          {
            "fieldName": "example",
            "value": ["example"]
          }
        ],
        "owners": ["example"],
        "tagIds": ["example"],
        "search": "example",
        "openItems": ["digest"],
        "orderBy": {
          "field": "example",
          "direction": "ASC"
        },
        "topOffset": 42,
        "scrollDirection": "example",
        "cbomId": "example",
        "cbomIds": ["example"]
      }
    }
  }
)

if response.status_code == 200:
    result = response.json()
    print(result)
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

{% endtab %}
{% endtabs %}

### Arguments

You can use the following argument(s) to customize your `getCloudItems` query.

| Argument                                                                                                                    | Description                                                  | Supported fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cloudItemsInput [`CloudItemsInput`](/api-documentation/api-reference/api--cloud-security/types/inputs/cloud-items-input.md) | Parameters for filtering and paginating cloud security items | <p>limit <code>Int</code><br>offset <code>Int</code><br>scanId <code>String</code><br>dateRange <a href="/pages/ttgam4SI9scLHqwZwgrD"><code>DateRange</code></a><br>filters <a href="/pages/jHGtARZ825ojDx6BGzW7"><code>CloudItemsFilters</code></a><br>filterSearch <a href="/pages/501RBby5Vj4iETTOR8n2"><code>\[AutoCompleteSearch]</code></a><br>owners <code>\[String]</code><br>tagIds <code>\[String]</code><br>search <code>String</code><br>openItems <a href="/pages/43jgm6P5kcKgBM8FmTho"><code>\[FilterTypes]</code></a><br>orderBy <a href="/pages/dqPw5hyxWWZ5UnGP7Tvc"><code>CloudItemsOrderBy</code></a><br>topOffset <code>Int</code><br>scrollDirection <code>String</code><br>cbomId <code>String</code><br>cbomIds <code>\[String]</code></p> |

### Fields

Return type: [`CloudItemsResponse`](/api-documentation/api-reference/api--cloud-security/types/objects/cloud-items-response.md)

You can use the following field(s) to specify what information your `getCloudItems` query will return. Please note that some fields may have their own subfields.

| Field                                                                                                        | Description                                        | Supported fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cloudItems [`[CloudItem]`](/api-documentation/api-reference/api--cloud-security/types/objects/cloud-item.md) | List of cloud security items found                 | <p>id <code>String</code><br>assetName <code>String</code><br>service <code>String</code><br>resourceId <code>String</code><br>cbomId <code>String</code><br>cbomProvider <code>String</code><br>resourceType <code>String</code><br>resourceName <code>String</code><br>accountId <code>String</code><br>firstSeen <code>String</code><br>cloudProvider <code>String</code><br>serviceCategory <code>String</code><br>applications <a href="/pages/O9DNUj4g2dTVv5dxqRiJ"><code>\[AppInfo]</code></a><br>isExposed <code>String</code><br>isPermissiveIdentity <code>Boolean</code><br>isHighPrivilege <code>Boolean</code><br>isSensitiveData <code>Boolean</code><br>contextFactors <code>\[String]</code><br>imageSource <code>String</code><br>registryType <code>String</code><br>registryName <code>String</code><br>imageScanStatus <code>String</code><br>exposurePath <a href="/pages/tMlpo6zYA5V8UBvv4IyM"><code>\[ExposurePathItem]</code></a><br>accountName <code>String</code><br>subService <code>String</code><br>region <code>String</code><br>resourceTags <code>JSON</code><br>authenticationRequired <code>Boolean</code><br>reachability <a href="/pages/nRMdYDGqNyd5wZe4n5Hp"><code>CloudItemReachability</code></a><br>resourceArn <code>String</code><br>images <a href="/pages/G08wEXT9Z19jJIw8jYkK"><code>\[CloudItemImage]</code></a><br>relatedIssues <a href="/pages/slO1MlaqzcbcMdp3yvLW"><code>Severities</code></a><br>issueSeverityBreakdown <a href="/pages/OyB5YkxP13m8VSv5JXX2"><code>\[CloudIssueSeverityBreakdown]</code></a><br>issuesStats <a href="/pages/8dx8dOE8GDooRAwf1L19"><code>IssuesStats</code></a><br>cluster <code>String</code><br>link <code>String</code><br>imageHash <code>String</code><br>workloads <a href="/pages/kkwdcwYXQQO1QgkdnkIf"><code>\[Workload]</code></a><br>artifactIds <code>\[String]</code><br>attachedIdentities <a href="/pages/R37iBf1VHE6t9L7HpfIv"><code>CbomAttachedIdentities</code></a><br>compliance <a href="/pages/GCja6oCEO0TuOQnF5TFD"><code>\[CloudItemCompliance]</code></a><br>usageSeries <a href="/pages/7SRzwVJWjhvJA6uE0oCj"><code>CloudUsageSeries</code></a><br>isAiAsset <code>Boolean</code><br>isTrainingData <code>Boolean</code><br>modelInfo <a href="/pages/dTbmGBxODBBv4mtySVeH"><code>CloudModelInfo</code></a><br>trainingDataInfo <a href="/pages/WxbuIUPP598kRNcc59On"><code>CloudTrainingDataInfo</code></a><br>tools <a href="/pages/QciZnGAV0HUi0HOYXnKi"><code>\[CloudTool]</code></a><br>dataAccess <a href="/pages/f3JgZYxjSoHp5aL39vSX"><code>\[CloudDataAccess]</code></a><br>probeResults <a href="/pages/ZkJK5lb18Pn6q1tZwo3f"><code>\[CloudProbeResult]</code></a></p> |
| offset `Int`                                                                                                 | Current pagination offset                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| topOffset `Int`                                                                                              | Top offset for advanced pagination                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| total `Int`                                                                                                  | Total number of cloud items available              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| totalFiltered `Int`                                                                                          | Total number of cloud items after applying filters |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| selectedPosition `Int`                                                                                       | Position of the selected item in the results       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ox.security/api-documentation/api-reference/api--cloud-security/queries/get-cloud-items.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
