Adding Google Cloud Projects
Use the post /v1/cckm/google/projects API to add a Google Cloud project to the linked Google Cloud account.
Syntax
curl -k '<IP>/api/v1/cckm/google/projects' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n  "project_id": "<project1_id>",\n  "connection": "<connection_name>",\n  "enable_success_audit_event":  <true|false>\n}' --compressed
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
| AUTHTOKEN | string | Authorization token. | 
| projects | array of strings | List of projects to be added. Specify project_idof the desired projects. | 
| project_id | string | ID of the Google Cloud project. | 
| connection | string | Name of the connection associated with the project. This field is applicable only if the connection is used to add the project. | 
| enable_success_audit_event | boolean | Indicates whether audit recording of successful operations for a Google Cloud project is enabled or disabled. This field is optional. Default value is true. | 
Example Request
curl -k 'https:/127.0.0.1/api/v1/cckm/google/projects' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiIyNTMxZjhhMC01NmRmLTQ3YmQtODg4Ny1iZmQ5NmRiYjU3YmQiLCJzdWIiOiJsb2NhbHw3MTM2NzUxZC1kNWIwLTQzZTgtYjY4ZS04YjkzOTE3MzU3ZDIiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsby82NDYwYmY2ZS02Mzk2LTQ0ZTUtODcxOC0yYmE0N2MxYmZiOTUiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhZG1pbiIsImN1c3QiOnsiY2xpZW50X3R5cGUiOiJ1bnJlZ2lzdGVyZWQiLCJkb21haW5faWQiOiI2NDYwYmY2ZS02Mzk2LTQ0ZTUtODcxOC0yYmE0N2MxYmZiOTUiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiN2FkZGZjN2ItM2Y0YS00YWM0LTg1ODItMDNhMGZhYzY1ZDQ3Iiwiem9uZV9pZCI6IjA5OWVlODAwLWY5YzctNGM5MC1iMDM1LTNjOTFhMWVmMDkwNiJ9LCJqd3RpZCI6IjY2NmJiYjNmLTc4NWMtNGY2My1hZmZkLTkyMWMxY2UzM2ZkNCIsImlhdCI6MTY4MDgxMDA0MCwiZXhwIjoxNjgwODEwMzQwfQ.FRfpyeOevSmpledWMBGn9eV39IOE5k5E8erKIA_JLm0' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n  "project_id": "gemalto-kyloeng2",\n  "connection": "newcloudgoogle7",\n  "enable_success_audit_event": true\n}' --compressed
Example Response
{
      "id": "cb718b4d-1b26-4866-82c4-4e35cc94d2cc",
      "uri": "kylo:kylo-6460bf6e-6396-44e5-8718-2ba47c1bfb95:cckm:gcp-project:cb718b4d-1b26-4866-82c4-4e35cc94d2cc",
      "account": "kylo:kylo-6460bf6e-6396-44e5-8718-2ba47c1bfb95:admin:accounts:kylo-6460bf6e-6396-44e5-8718-2ba47c1bfb95",
      "application": "ncryptify:gemalto:admin:apps:kylo",
      "devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
      "createdAt": "2023-04-06T19:43:03.98549303Z",
      "updatedAt": "2023-04-06T19:43:03.992851Z",
      "name": "gemalto-kyloeng2",
      "project_id": "gemalto-kyloeng2",
      "connection": "newcloudgoogle7",
      "cloud_name": "gcp",
      "organization_name": "",
      "organization_display_name": "",
      "enable_audit_event": true
}
The output shows that a new Google Cloud project with the specified ID is added to the CipherTrust Manager.
Response Codes
| Response Code | Description | 
|---|---|
| 2xx | Success | 
| 4xx | Client errors | 
| 5xx | Server errors | 
Refer to HTTP status codes for details.