Skip to main content
POST
/
analysis
/
gcp
/
analyze
curl --request POST \
--url https://{host}/analysis/gcp/analyze \
--header 'Content-Type: application/json' \
--data '{
"connectionName": "gcp-testing",
"policyInstanceId": "583e0068-45a3-4c4e-baec-473d4daa4095",
"projectId": "pm-testing-608378",
"credential": {
"type": "service_account",
"project_id": "engineering-183318",
"private_key_id": "REDACTED",
"private_key": "-----BEGIN PRIVATE KEY-----\n…\n-----END PRIVATE KEY-----",
"client_email": "[email protected]",
"client_id": "28884131006232124",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/…"
},
"webHook": {
"uri": "http://mywebhookserver/webhook/results",
"authType": "basic",
"authValue": "tester:testerpassword"
}
}'
{
  "href": "Not available",
  "message": "Analysis in progress",
  "status": 200
}

Body

application/json
projectId
string
required

GCP project ID to analyze (required even if the credential maps to multiple projects).

credential
required

GCP service account credential (inline JSON). Docs show both string and object usage. Raw JSON string of the .json keyfile

connectionName
string

Unique within GCP connections; defaults to the project ID.

Maximum length: 32
policyInstanceId
string

Policy instance to use for analysis (optional, shown in example).

webHook
object

Response

Accepted / analysis initiated or in progress

message
string
required
status
integer
required

One of 200, 400, 401, 404, 500.

href
string

Link to recommendations (if available).