Create

  • POST
  • /workspaces
  • /:workspace
  • /targets

Creates a new Google Kubernetes Engine target in the project.

Request

REQUIRED SCOPES
WORKSPACE, TARGET_ADD
URL PARAMETERS
workspacerequired string
The workspace name.
POST PARAMETERS
namerequired string
The name of the target
identifierrequired string
Readable ID for target. It can consist of uppercase and lowercase letters, numbers, and underscores. It must start with a letter.
typerequired String
The type of the target. For GKE use GKE.
integrationrequired string
Identifier of the integration.
clusterrequired string
Address of the cluster.
project_idrequired string
GKE project identifier.
zonerequired string
GKE zone. E.g., europe-west3-a
projectproject
Set this if you want to add the target to a project. Must contain field name (string).
pipelinepipeline
Set this if you want to add the target to a pipeline. Must contain field id (integer).
environmentenvironment
Set this if you want to add the target to an environment. Must contain field id (string).
permissionsPipelinePermissions
Define to set permissions for the target.
pathstring
Path on the server defined in the target.
disabledboolean
When set to true the target is disabled. By default it is set to false.
tagsstring[]
A list of tags associated with the target.

Last modified on Sep 9, 2025

Example:

curl -X POST "https://api.buddy.works/workspaces/:workspace/targets" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "id": "tg-rjqupxybacvld",
  "identifier": "gke_workspace",
  "tags": [
    "orange",
    "rabsperry",
    "olive"
  ],
  "name": "GKE WORKSPACE",
  "integration": "GOOGLE_SERVICE_ACCOUNT_DEFAULT",
  "cluster": "buddy-tests",
  "project_id": "tests-buddy",
  "zone": "europe-west3-a",
  "type": "GKE"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/targets/tg-qm20i6qafqpwa", "html_url": "https://app.buddy.works/buddy/-/targets/tg-qm20i6qafqpwa/edit", "id": "tg-qm20i6qafqpwa", "identifier": "gke_workspace", "permissions": { "others": "USE_ONLY", "users": [ { "id": 1, "access_level": "MANAGE" } ] }, "tags": [ "orange", "rabsperry", "olive" ], "name": "GKE WORKSPACE", "integration": "GOOGLE_SERVICE_ACCOUNT_DEFAULT", "cluster": "buddy-tests", "project_id": "tests-buddy", "zone": "europe-west3-a", "type": "GKE" }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999