Register Service Accounts API

POST/flexscan-api/rest/v1/service-accounts/register

A service account represents a cloud provider account (e.g.,a GCP project,AWS account,or Azure subscription) that Flexscan is authorized to scan. You must register a service account before configuring or scanning it.

This API registers a service account with the Qualys connector service and enables it for snapshot-based scanning.

Input parametersInput parameters

Parameter Mandatory/Optional Data Type Description
accountId Mandatory String Cloud account identifier - GCP project ID, AWS account ID, or Azure subscription ID
cloudType Mandatory String Cloud provider: GCP, AWS, or AZURE (case-insensitive)

Sample - Register a GCP Service AccountSample - Register a GCP Service Account

API Request

curl -X POST \
  '<qualys_gateway_url>/flexscan-api/rest/v1/service-accounts/register' \
  -H 'Authorization: Bearer <qas-jwt-token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "accountId": "my-gcp-project-123",
    "cloudType": "GCP"
  }'

API Response

{
  "data": {
    "accountId": "my-gcp-project-XXX",
    "status": "REGISTERED",
    "registeredAt": "2026-05-28T11:30:00"
  },
  "errors": [],
  "meta": {
    "timestamp": "2026-05-28T11:30:00Z"
  }
}

Sample - Register an Azure Service AccountSample - Register an Azure Service Account

API Request

curl -X POST \
  '<qualys_gateway_url>/flexscan-api/rest/v1/service-accounts/register' \
  -H 'Authorization: Bearer <qas-jwt-token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "cloudType": "AZURE"
  }'

API Response

{
  "data": {
    "accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "status": "REGISTERED",
    "registeredAt": "2026-05-28T11:30:00"
  },
  "errors": [],
  "meta": {
    "timestamp": "2026-05-28T11:30:00Z"
  }
}