Search Cloud Accounts

POST {{cb_url}}/public-cloud/account-management/v1/orgs/{{cb_org_key}}/accounts/_search

Search Cloud Accounts

Permissions Required

Permission (.notation name)Operation(s)
public.cloud.accountsREAD

Request Schema

{
  "start": <integer>,
  "rows": <integer>,
  "query": "<string>",
  "criteria": {
    "name": [ "<string>" ],
    "cloud_provider": [ "<string>" ],
    "cloud_provider_account_id": [ "<string>" ],
    "credential.verification_status": [ "<string>" ],
    "environment": [ "<string>" ],
    "parent_account_id": ["<string>"],
    "is_onboarded": <boolean>
  },
  "sort": [
    {
      "field": "<string>",
      "order": "<string>"
    }
  ]
}

See Documentation

Request Body

{"start"=>0, "rows"=>0, "criteria"=>{"name"=>["AWS Account 1"], "cloud_provider"=>["AWS"], "cloud_provider_account_id"=>["1234567890"], "credential.verification_status"=>["IN_PROGRESS", "SUCCESS", "FAIL"], "environment"=>["DEV", "PROD"]}, "sort"=>[{"field"=>"credential.last_verified_time", "order"=>"ASC"}]}

RESPONSES

status: OK

{&quot;num_found&quot;:1,&quot;results&quot;:[{&quot;name&quot;:&quot;AWS Account 1&quot;,&quot;owner_name&quot;:&quot;Test&quot;,&quot;owner_email&quot;:&quot;test@testorg.com&quot;,&quot;environment&quot;:&quot;DEV&quot;,&quot;credential&quot;:{&quot;verification_status&quot;:&quot;FAIL&quot;,&quot;verification_code&quot;:&quot;CREDENTIAL_ERROR&quot;,&quot;verification_message&quot;:&quot;User: arn:aws:sts::1111111:assumed-role/mcs-psc-dev-cwp-pc-aws-collector-us-east-1-pod/694be2a6-mcs-psc-dev-cwp-pc-aws-collector-us-east-1-pod is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::1234567890:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleForEC2Spot (Service: Sts, Status Code: 403, Request ID: ac3f0cbc-099a-4657-a6bf-9f2ccc115be2, Extended Request ID: null)&quot;,&quot;last_verified_time&quot;:&quot;2023-09-01T12:09:34.338372Z&quot;,&quot;role_arn&quot;:&quot;arn:aws:iam::1234567890:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleForEC2Spot&quot;,&quot;external_id&quot;:&quot;afd5813b-e3c6-471a-b30e-3a8577f89111&quot;,&quot;application_id&quot;:null,&quot;tenant_id&quot;:null,&quot;secret_id&quot;:null,&quot;secret&quot;:null,&quot;secret_expiry&quot;:null,&quot;identity_provider_project_no&quot;:null,&quot;service_account_email&quot;:null,&quot;identity_pool_id&quot;:null,&quot;identity_provider_id&quot;:null},&quot;last_updated_time&quot;:&quot;2023-09-01T12:09:33.873423Z&quot;,&quot;created_by&quot;:&quot;ABCD1234&quot;,&quot;updated_by&quot;:&quot;ABCD1234&quot;,&quot;event_stream_status&quot;:&quot;DISABLED&quot;,&quot;ssm_document_status&quot;:&quot;DISABLED&quot;,&quot;parent_id&quot;:null,&quot;aws_account_joined_method&quot;:null,&quot;new_accounts_discovered&quot;:false,&quot;aws_account_type&quot;:&quot;INDEPENDENT&quot;,&quot;is_onboarded&quot;:true,&quot;account_discovery_status&quot;:null,&quot;parent_account_id&quot;:null,&quot;cloud_provider_account_id&quot;:&quot;1234567890&quot;,&quot;cloud_provider&quot;:&quot;AWS&quot;}]}