Select GCP projects for a connection
curl --request POST \
--url https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId} \
--header 'Content-Type: application/json' \
--data '
{
"projectIds": [
"acme-prod-1234"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({projectIds: ['acme-prod-1234']})
};
fetch('https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId}"
payload = { "projectIds": ["acme-prod-1234"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Cloud Security
Select GCP projects for a connection | Comp AI API
Select GCP projects for a connection in Comp AI. Run AWS, Azure, and GCP cloud security scans, detect enabled services, review findings, and connect cloud.
POST
/
v1
/
cloud-security
/
select-gcp-projects
/
{connectionId}
Select GCP projects for a connection
curl --request POST \
--url https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId} \
--header 'Content-Type: application/json' \
--data '
{
"projectIds": [
"acme-prod-1234"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({projectIds: ['acme-prod-1234']})
};
fetch('https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/cloud-security/select-gcp-projects/{connectionId}"
payload = { "projectIds": ["acme-prod-1234"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Path Parameters
Body
application/json
GCP projects to scan on this connection
Project IDs to scan, from the connection's discovered projects.
Minimum array length:
1Example:
["acme-prod-1234"]
Display name per project ID, for the UI.
Show child attributes
Show child attributes
Example:
{ "acme-prod-1234": "Acme Production" }
GCP organization the projects belong to. Saved on the connection when provided.
Example:
"123456789012"
Response
201 - undefined
Was this page helpful?

