List Target Accounts API

GET/flexscan-api/rest/v1/target-accounts

This API lists target accounts belonging to the authenticated customer. Always scoped to the JWT tenant - you cannot access another customer's data. Supports optional filters.

Input parametersInput parameters

Parameter Mandatory/Optional Data Type Description
serviceAccountId Optional String Filter by parent service account ID
cloudType Optional String Filter by cloud type: AWS, AZURE, GCP, or OCI (case-insensitive)
state Optional String Filter by parent service account state: REGISTERED, ACTIVE, INACTIVE, ERROR
page Optional Integer Page number (1-based). Default: 1
limit Optional Integer Items per page. Range: 1–100. Default: 25
sort Optional String Sort field and direction. Default: createdAt,desc

Sample - List Target Accounts Filtered by Service AccountSample - List Target Accounts Filtered by Service Account

API Request

curl -X GET \
  '<qualys_gateway_url>/flexscan-api/rest/v1/target-accounts?serviceAccountId=my-gcp-project-123&page=1&limit=25' \
  -H 'Authorization: Bearer <qas-jwt-token>'

API Response

{
  "data": [
    {
      "accountId": "target-xxxxxxx",
      "serviceAccountId": "my-gcp-project-xxxxxxx",
      "cloudType": "GCP",
      "customerUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "connectorUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "portalUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "regions": ["us-east1", "us-west1"],
      "serviceAccountState": "REGISTERED",
      "createdAt": "2026-05-01T10:00:00",
      "updatedAt": "2026-05-28T11:30:00"
    }
  ],
  "errors": [],
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 3,
    "timestamp": "2026-05-28T11:30:00Z"
  }
}