---
title: "Connect GCP cloud"
method: POST
path: "/clouds/gcp"
---

# Connect GCP cloud

`POST /clouds/gcp`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/clouds/gcp`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `clouds:write`

Connect a new Gcp cloud environment. https://help.aikido.dev/cloud-scanning/connect-your-cloud/gcp/get-required-values-+-set-up-configuration-to-connect-gcp-cloud-via-public-api

## Request body

- object
  - `name` string, required: A name for this cloud environment.
  - `project_id` string, required: ID of the GCP Project that should be used for aikido scanning
  - `access_key` string, required: Stringified JSON value of the service account access key or Workload Identity Federation config file
  - `environment` 'production' | 'staging' | 'development' | 'mixed', required: Indicates for what environment this cloud is responsible.

## Response `200`

The cloud environment has been successfully connected

- object
  - `id` integer: The ID of the newly connected cloud environment in Aikido.

## Other responses

- `400`: Could not create GCP cloud

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
