Projects API

Introduction IBM Cloud® projects are a named collection of configurations that are used to manage and deploy related resources and Infrastructure as Code IaC. Projects ensure that the IaC is always managed, secure, and compliant. Use the API to create, manage, and deploy by using projects. SDKs for Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries. For more information about using projects, see Learn about IaC deployments with projectshttps://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understanding-projects. Installing the Node SDK sh npm install @ibm-cloud/project-node-client View on GitHub https://github.com/IBM/project-node-sdkhttps://github.com/IBM/project-node-sdk Installing the Python SDK bash pip install ibm-project-sdk Then in your code, you can import the service python from ibmprojectsdk.projectv1 import View on GitHub https://github.com/IBM/project-python-sdkhttps://github.com/IBM/project-python-sdk Installing the Go SDK Go modules recommended: Add the following import in your code, and then run go build or go mod tidy go import "github.com/IBM/project-go-sdk/projectv1" Go get bash go get -u github.com/IBM/project-go-sdk/1 View on GitHub https://github.com/IBM/project-go-sdkhttps://github.com/IBM/project-go-sdk Endpoint URLs The projects API uses the following global endpoint URL for all regions. When you call the API, add the path for each method to form the complete API endpoint for your requests. In the request examples, replace the {baseurl} parameter with the endpoint URL. https://projects.api.cloud.ibm.com Example API request sh curl --request POST \ --header "content-type: application/json" \ --header "accept: application/json" \ --header "authorization: Bearer

MethodPathSummary
POST/v1/projectsCreate a project
GET/v1/projectsList projects
GET/v1/projects/{id}Get a project
PATCH/v1/projects/{id}Update a project
DELETE/v1/projects/{id}Delete a project
GET/v1/projects/{project_id}/resourcesList project resources
POST/v1/projects/{project_id}/resourcesUpdates the resources in a project
GET/v1/projects/{project_id}/available_resourcesList all project available resources
POST/v1/projects/{project_id}/environmentsCreate an environment
GET/v1/projects/{project_id}/environmentsList environments
GET/v1/projects/{project_id}/environments/{id}Get an environment
PATCH/v1/projects/{project_id}/environments/{id}Update an environment
DELETE/v1/projects/{project_id}/environments/{id}Delete an environment
POST/v1/projects/{project_id}/configsAdd a new configuration
GET/v1/projects/{project_id}/configsList all project configurations
GET/v1/projects/{project_id}/configs/{id}Get a project configuration
PATCH/v1/projects/{project_id}/configs/{id}Update a configuration
DELETE/v1/projects/{project_id}/configs/{id}Delete a configuration
POST/v1/projects/{project_id}/configs/{id}/force_approveForce approve a project configuration
POST/v1/projects/{project_id}/configs/{id}/approveApprove and merge a configuration draft
POST/v1/projects/{project_id}/configs/{id}/validateRun a validation check
POST/v1/projects/{project_id}/configs/{id}/prevalidateRun a prevalidation check
GET/v1/projects/{project_id}/configs/{id}/prevalidate/{result_id}Get prevalidate results
POST/v1/projects/{project_id}/configs/{id}/deployDeploy a configuration
POST/v1/projects/{project_id}/configs/{id}/undeployUndeploy configuration resources
POST/v1/projects/{project_id}/configs/{id}/syncSync a project configuration
GET/v1/projects/{project_id}/configs/{id}/resourcesList all deployed resources
POST/v1/projects/{project_id}/configs/{id}/stack_definitionCreate a stack definition
GET/v1/projects/{project_id}/configs/{id}/stack_definitionGet a stack definition
PATCH/v1/projects/{project_id}/configs/{id}/stack_definitionUpdate a stack definition
POST/v1/projects/{project_id}/configs/{id}/stack_definition/exportExport a deployable architecture stack to the private catalog
GET/v1/projects/{project_id}/configs/{id}/versionsGet a list of project configuration versions
GET/v1/projects/{project_id}/configs/{id}/versions/{version}Get a specific project configuration version
DELETE/v1/projects/{project_id}/configs/{id}/versions/{version}Delete a project configuration version
DELETE/v2/projects/{project_id}/configs/{id}/versions/{version}Delete a project configuration version
POST/v1/projects/{project_id}/jobsCreate a job
GET/v1/projects/{project_id}/jobsList project jobs
GET/v1/projects/{project_id}/jobs/{id}Get a project job
PATCH/v1/projects/{project_id}/jobs/{id}Update a job
DELETE/v1/projects/{project_id}/jobs/{id}Delete a job
POST/v1/projects/{project_id}/jobs/{id}/run_onceRun a job once
POST/v1/projects/{project_id}/jobs/{id}/disableDisable a job
POST/v1/projects/{project_id}/jobs/{id}/enableEnable a job
GET/v1/projects/{project_id}/jobs/{id}/runsList job runs
GET/v1/projects/{project_id}/jobs/{job_id}/runs/{id}Get a project job run
DELETE/v1/projects/{project_id}/jobs/{job_id}/runs/{id}Delete a job run