C4C7OPS Microservices API
OpenAPI reference for the C4C7OPS microservices API for technical integrations.
microservices-apiC4C7OPS Microservices API
The C4C7OPS microservices API (version 0.2.3) exposes a set of RESTful endpoints to programmatically manage the microservice lifecycle. It is designed for engineering teams integrating C4C7OPS into CI/CD pipelines, orchestration platforms, or internal automation tools.
C4C7OPS is a Codifly product and provides centralized control over services, environments, deploys, environment variables, and runtime parameters.
Core capabilities
- Services: query microservices grouped by category.
- Environments: list of environments available for the account.
- Deploys: creation and tracking of deploys per microservice and environment.
- Environment variables: read and write configuration variables per microservice and environment.
- Runtime settings: read and write parameters that can be modified live, without a redeploy.
Authentication
Authentication depends on the configuration defined in the securitySchemes field of the OpenAPI specification. It generally uses a Bearer token in the Authorization header or OAuth2 credentials depending on the environment. See the full specification for supported mechanisms and per-endpoint requirements.
Base URL
All routes are prefixed with /b1/microservices.
Common error codes
| Code | Meaning |
|---|---|
400 | Invalid or malformed input parameters. |
401 | Missing or invalid authentication. |
403 | Insufficient permissions for the requested resource. |
404 | Resource not found (microservice, environment, or deploy not found). |
5xx | Internal service error. |
Every error includes a JSON body with code, message, and additional details to help with debugging.
Difference between environments and deploys
An environment defines the isolated context where a set of services runs (development, staging, production). A deploy is the concrete action of shipping a version of a microservice to a specific environment. The API lets you manage both resources independently and traceably.
Environment variables vs. runtime settings
- Environment variables: values that don't change between service restarts, such as connection strings or external keys.
- Runtime settings: parameters that can be modified live without a redeploy, such as configuration thresholds or feature flags.
The API lets you read and write both types independently.
Services
1 operations/b1/microservices/category/{service_category}List services filtered by category
GET /b1/microservices/category/{service_category}
Returns all registered services that belong to a specific category, such as microservice, frontend, app, and others.
| Name | Location | Required | Description |
|---|---|---|---|
service_category | path | yes | Service category (microservice, frontend, app, etc.). |
Responses
200: List of services matching the requested category.
Implementation notes
- Use this endpoint to discover which services exist within a category before operating on a specific service.
- The category is a text value that must exactly match the categories registered in C4C7OPS.
- Validate that the category exists before calling this endpoint; a nonexistent value returns an empty list instead of an error.
Environments
1 operations/b1/microservices/environment/List available environments
GET /b1/microservices/environment/
Returns all environments configured for the authenticated account (for example development, staging, or production), along with their unique identifier.
No parameters
Responses
200: List of environments available for the account.
Implementation notes
- Use the environment_id returned here to filter deploys, environment variables, and runtime settings in the other endpoints.
- Environments are account-specific; they are not shared across organizations.
Deploys
3 operations/b1/microservices/ms/deployCreate a new deploy
POST /b1/microservices/ms/deploy
Creates a deploy for a microservice in a specific environment, from a repository tag or branch. It can optionally provision new infrastructure.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | body | yes | ID of the microservice to deploy. |
environment_id | body | yes | ID of the target environment. |
tag | body | yes | Repository tag or branch to deploy. |
create_new_infrastructure | body | no | If true, provisions new infrastructure for the deploy. |
Responses
200: Deploy created, includes the generated deploy_id.
Implementation notes
- Only microservice_id, environment_id, and tag are required; the rest of the fields are optional.
- Use the deploy_id from the response to check the status with the status endpoint.
/b1/microservices/ms/deploy/{deploy_id}/statusCheck a deploy's status
GET /b1/microservices/ms/deploy/{deploy_id}/status
Returns the status map for each step of the deploy pipeline (for example build, provisioning, publishing).
| Name | Location | Required | Description |
|---|---|---|---|
deploy_id | path | yes | Deploy ID. |
Responses
200: Status map per deploy step.
Implementation notes
- Ideal for polling from a CI/CD pipeline until the deploy finishes.
/b1/microservices/ms/{microservice_id}/environment/{environment_id}/deploysDeploy history
GET /b1/microservices/ms/{microservice_id}/environment/{environment_id}/deploys
Returns the deploy history for a microservice in a specific environment.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | path | yes | Microservice ID. |
environment_id | path | yes | Environment ID. |
Responses
200: List of deploys for the microservice in that environment.
Implementation notes
- Useful for auditing which versions were deployed and when.
Env-vars
2 operations/b1/microservices/ms/envsCreate or update environment variables
PUT /b1/microservices/ms/envs
Creates or updates a microservice's environment variables for a specific environment. These values don't change between service restarts.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | body | yes | Microservice ID. |
environment_id | body | yes | Environment ID. |
variables | body | yes | Key-value map with the environment variables. |
Responses
200: Environment variables saved.
Implementation notes
- This operation replaces the existing set of variables for the given microservice and environment.
- Requires a redeploy of the microservice for the new values to take effect.
/b1/microservices/ms/{microservice_id}/environment/{environment_id}/envsGet environment variables
GET /b1/microservices/ms/{microservice_id}/environment/{environment_id}/envs
Returns the environment variables configured for a microservice in a specific environment.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | path | yes | Microservice ID. |
environment_id | path | yes | Environment ID. |
Responses
200: Configured environment variables.
Implementation notes
- Sensitive values may appear masked depending on the account's security configuration.
Runtime-settings
2 operations/b1/microservices/ms/runtime-settingsCreate or update runtime settings
PUT /b1/microservices/ms/runtime-settings
Creates or updates a microservice's runtime settings for a specific environment. These parameters can be modified live, without a redeploy.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | body | yes | Microservice ID. |
environment_id | body | yes | Environment ID. |
settings | body | yes | Key-value map with the runtime settings. |
Responses
200: Runtime settings saved.
Implementation notes
- Changes are applied dynamically, without restarting the microservice.
- Useful for feature flags or configuration thresholds that change frequently.
/b1/microservices/ms/{microservice_id}/environment/{environment_id}/settingsGet runtime settings
GET /b1/microservices/ms/{microservice_id}/environment/{environment_id}/settings
Returns the runtime settings configured for a microservice in a specific environment.
| Name | Location | Required | Description |
|---|---|---|---|
microservice_id | path | yes | Microservice ID. |
environment_id | path | yes | Environment ID. |
Responses
200: Configured runtime settings.
Implementation notes
- Combine this lookup with the update endpoint to build live configuration panels.