Deploying Services
This guide provides a comprehensive overview of the lifecycle of a managed service in Codesphere. It covers the practical steps for deploying, configuring, maintaining, and eventually deleting services.
Deploying Managed Services
Deploying a managed service can be done through the Codesphere UI or the public API.
A managed service can either be an independent deployment or integrated into the landscape lifecycle. This guide will cover how to deploy an independent service. For information on how to deploy services as part of a landscape, refer to the Managed Services in Landscapes section.
- UI
- API
-
Navigate: Go to the Managed Services tab.

-
Select: Choose the desired service-provider from the catalog. Services are marked with categories (e.g., Database, Cache). In this example we choose PostgreSQL. Click "Start Setup"
-
Configure: A configuration modal will appear. Set the initial parameters. You can leave non-required parameters at their default values and update them later if needed. Some parameters (like User name in this PostgreSQL example) have specific requirements. Hover over the "Info"-Icon to learn more. Click "Define Secrets" to proceed.

-
Secrets: Most services require secrets. Generate them on your machine and enter them here. Codesphere will not show you these secrets again after this step, so make sure to save them securely. If you lose them, you will need to reset the secrets which will cause downtime for the service. We recommend using a Vault like OpenBao to generate and store secrets. Click "Create Service" to proceed.

-
Deploy: After clicking "Deploy", Codesphere will begin provisioning the resources. Switch to the Managed Services tab in the left sidebar to monitor the progress. Status indicators will update as the service goes from
CreatingtoSynchronized.
Use the events log to get more details on the provisioning process. If there are any issues during deployment, the events log will provide insights into what went wrong and how to fix it.

You can create a managed service using the POST /managed-services endpoint.
curl -X POST "https://api.codesphere.com/managed-services" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"teamId": 123,
"name": "my-postgres-db",
"provider": {
"name": "postgresql",
"version": "15"
},
"plan": {
"id": 1,
"parameters": {
"storage": 10
}
},
"config": {
"max_connections": "100"
},
"secrets": {
"password": "secure-password",
"username": "admin"
}
}'
Parameters:
teamId(integer, required): The ID of the team where the service will be created.name(string, required): A unique name for your service.provider(object, required):name: The name of the service provider (e.g.,postgresql,redis).version: The version tag (e.g.,15).
plan(object, required):id: The plan ID.parameters: Plan-specific parameters (e.g., storage size in GB).
secrets(object): Key-value pairs of secret service credentials.
Refer to the API Documentation for complete schema details.
Deployment times vary by service. Complex databases may take a few minutes to become fully operational.
What's Next?
Once your service is up and running, proceed to the Connecting to Services guide to learn how to access your database or object storage from your workspace.
Update / Configure
You can modify the configuration of a running service to adapt to changing requirements.
- UI
- API
- Locate: Find the deployed service you want to update.
- Open Settings: Click on the gear icon in the right of the table row to open the service details view.
- Modify: Navigate to the Configuration tab and click Edit Configuration. This will enable editing configurable parameters. Note that not every option that was available in the creation-flow will be available for update. If you need to change a parameter that is not editable, you will need to delete and re-create the service with the desired configuration.

- Apply: Click Save to apply changes. The service Status will change from
SynchronizedtoUpdatingwhile the changes are being applied. Once complete, it will return toSynchronized. Check the event log for more details on the update process.
You can update a managed service using the PATCH /managed-services/{id} endpoint.
curl -X PATCH "https://api.codesphere.com/managed-services/YOUR_SERVICE_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"config": {
"max_connections": "200"
},
"plan": {
"id": 2,
"parameters": {
"storage": 20
}
},
"secrets": {
"password": "new-secure-password"
}
}'
Parameters:
id(string, path parameter): The UUID of the managed service to update.config(object, optional): Configuration updates.plan(object, optional):id: The new plan ID.parameters: Updated plan parameters (e.g., storage).
secrets(object, optional): Updated secrets.name(string, optional): New name for the service.pause(boolean, optional): Set totrueto pause the service.
Refer to the API Documentation for complete schema details.
Some configuration updates may trigger a restart of the service, causing brief downtime.
Pause
Codesphere allows you to pause certain managed services when they are not in active use. This is ideal for development environments or prototypes.
How it Works
Not every service supports pausing. If a service can be paused, you will see the option under the services capabilities. Capabilities can be viewed using the public API's GET providers endpoint.
- Pause: Takes the service offline and releases the compute resources (CPU & RAM). The service status changes to
PausedorStopped. - Resume: Re-provisions the compute resources and brings the service back online.
Landscapes will automatically pause their own services when they are torn down.
- UI
- API
Currently, pausing Managed Services is only supported via the Public API. Use the API tab for instructions.
You can pause a managed service by updating its pause property to true using the PATCH /managed-services/{id} endpoint.
Pause Service:
curl -X PATCH "https://api.codesphere.com/managed-services/YOUR_SERVICE_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pause": true
}'
Resume Service:
curl -X PATCH "https://api.codesphere.com/managed-services/YOUR_SERVICE_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pause": false
}'
Data Persistence
For core Codesphere services like PostgreSQL or Bucket Storage, your data stays safe during a pause. The persistent volume (disk) associated with the service is not deleted. When you resume the service, it re-attaches to the same volume, ensuring all your data is preserved.
Pausing services that are not in use is a great way to optimize your resource usage and costs.
Delete Managed Services
Deleting a service calls the deletion endpoint of a Managed Service backend. For Managed Services offered by Codesphere, this removes any resources associated with said service.
- UI
- API
- Navigate: Go to the service table page.
- Delete: Find the "Delete" button under the 3-dots menu.

- Confirm: You will be asked to confirm the action, by typing the name of the service.
You can delete a managed service using the DELETE /managed-services/{id} endpoint.
curl -X DELETE "https://api.codesphere.com/managed-services/YOUR_SERVICE_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Parameters:
id(string, path parameter): The UUID of the managed service to delete.
Refer to the API Documentation for complete schema details.
Deleting a managed service is permanent. It removes both the compute resources and the persistent data volume. This action cannot be undone. You can see recently deleted services by checking the "Show recently Deleted" checkbox, but they cannot be recovered.