C4C7OPS Microservices API
OpenAPI reference for the C4C7OPS microservices API for technical integrations.
microservices-api
# C4C7OPS Microservices API
Version: 0.2.3
Specification: OpenAPI 3.0
Base Path: /b1/microservices
The C4C7OPS Microservices API is a RESTful interface developed by Codifly for technical integrations with the C4C7OPS platform. It exposes endpoints to manage services, environments, deployments, environment variables, and runtime configuration across your Codifly account.
Capabilities
- Services — Retrieve services filtered by category (microservice, frontend, app, etc.).
- Environments — List all environments provisioned for the account (development, staging, production).
- Deploys — Create deployments and query their step-by-step status.
- Environment Variables — Read and write environment-level variables scoped to a microservice.
- Runtime Settings — Read and write runtime configuration parameters without triggering a new deploy.
Authentication
Requests must include a valid Authorization: Bearer <token> header. Tokens are issued via OAuth 2.0 or API keys depending on environment configuration. Consult the security schemes in the OpenAPI contract for the exact scopes required per operation.
Environments
Each Codifly account can define multiple environments (e.g. development, staging, production). Use the correct base URL and credentials for the target environment. Never mix credentials across environments.
Rate Limits & Error Handling
- Implement retries with exponential backoff for
5xxresponses. - Validate every response against the OpenAPI schemas.
- Log latency and error-rate metrics for observability.
Best Practices
- 1Test integrations in staging before promoting to production.
- 2Treat the OpenAPI contract version (
0.2.3) as an immutable reference during your integration cycle. - 3Rotate authentication tokens on a regular schedule.
- 4Keep environment variables and runtime settings under version control outside the API when possible.
Endpoints
9
Standard
OpenAPI
services
1 operationsService listing by category
/b1/microservices/category/{service_category}List services filtered by category
List Services by Category
Returns all services that belong to the specified service category.
When to Use
Use this endpoint to discover which services of a given type (e.g. microservice, frontend, app) are registered in your account.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
service_category | path | Yes | The category to filter by. Accepted values include microservice, frontend, app, and others defined in your account. |
Responses
- `200 OK` — Returns an array of service objects matching the requested category.
Notes
- The category values are case-sensitive; use the exact identifier returned by the platform.
Parameters
service_categorypathService category (microservice, frontend, app, etc.)
Responses
200Services for categoryenvironments
1 operationsEnvironments
/b1/microservices/environment/List all environments for the account
List Environments
Returns every environment provisioned for the authenticated account.
When to Use
Call this endpoint to enumerate available environments (e.g. development, staging, production) and obtain their IDs for use in subsequent operations.
Parameters
This endpoint takes no parameters.
Responses
- `200 OK` — Returns a list of environment objects, each containing at least an
idand aname.
Notes
- Store the environment IDs locally; most deploy and configuration endpoints require
environment_idas a path parameter.
Responses
200List environments for the accountdeploys
3 operationsDeploy operations
/b1/microservices/ms/deployCreate a new deployment
Create Deploy
Triggers a new deployment for a microservice.
When to Use
Use this endpoint to initiate a deploy after updating code, configuration, or environment variables.
Request Body (application/json)
Supply a JSON payload specifying the target microservice, environment, and any deploy options defined by the schema (e.g. image tag, commit reference).
{
"microservice_id": "string",
"environment_id": "string"
}Responses
- `200 OK` — Deploy was created successfully. The response includes a
deploy_idyou can use to track progress.
Notes
- After creation, poll
GET /b1/microservices/ms/deploy/{deploy_id}/statusto monitor the deploy lifecycle. - Ensure environment variables and runtime settings are configured before deploying.
Responses
200Deploy created/b1/microservices/ms/deploy/{deploy_id}/statusGet deployment step status
Get Deploy Status
Returns a step-by-step status map for a specific deployment.
When to Use
Poll this endpoint after creating a deploy to track the progress of each stage (e.g. build, push, rollout).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
deploy_id | path | Yes | The unique identifier of the deployment. |
Responses
- `200 OK` — Returns a map of deploy step names to their current statuses (e.g.
pending,running,succeeded,failed).
Notes
- Implement polling with a reasonable interval (e.g. 5–15 seconds) to avoid rate-limiting.
- A step marked as
failedtypically indicates a build or rollout error; check platform logs for details.
Parameters
deploy_idpathDeploy id
Responses
200Deploy step status map/b1/microservices/ms/{microservice_id}/environment/{environment_id}/deploysList deploys for a microservice and environment
List Deploys
Returns the deployment history for a specific microservice in a specific environment.
When to Use
Use this endpoint to audit past deployments, compare versions, or find a deploy_id for status checks.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
microservice_id | path | Yes | The unique identifier of the microservice. |
environment_id | path | Yes | The unique identifier of the environment. |
Responses
- `200 OK` — Returns a list of deploy objects, each including at least
deploy_id, status, and timestamp.
Notes
- Results are typically ordered by creation date (newest first).
- Use this list to locate a
deploy_idbefore callingGET /b1/microservices/ms/deploy/{deploy_id}/status.
Parameters
microservice_idpathMicroservice id
environment_idpathEnvironment id
Responses
200List of deploysenv-vars
2 operationsEnvironment variables
/b1/microservices/ms/envsCreate or update environment variables
Create or Update Environment Variables
Creates or updates environment variables for a microservice using a PUT (upsert) semantic.
When to Use
Call this endpoint when you need to set or modify environment-level variables (API keys, feature flags, connection strings, etc.) before or between deployments.
Request Body (application/json)
Provide a JSON object containing the variables to upsert. The exact schema is defined in the OpenAPI contract.
{
"microservice_id": "string",
"environment_id": "string",
"variables": {
"KEY": "value"
}
}Responses
- `200 OK` — Environment variables were saved successfully.
Notes
- This operation performs an upsert: existing keys are overwritten, new keys are added.
- Changes to environment variables typically require a new deploy to take effect at runtime.
Responses
200Environment variables saved/b1/microservices/ms/{microservice_id}/environment/{environment_id}/envsGet environment variables for a microservice
Get Environment Variables
Retrieves the environment variables configured for a specific microservice and environment.
When to Use
Call this endpoint to inspect current environment variables before updating them or to verify that a recent upsert was applied correctly.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
microservice_id | path | Yes | The unique identifier of the microservice. |
environment_id | path | Yes | The unique identifier of the environment. |
Responses
- `200 OK` — Returns the environment variable key-value map for the specified scope.
Notes
- Sensitive values (secrets, API keys) may be masked in the response depending on platform security policies.
- Cross-reference with
PUT /b1/microservices/ms/envsfor the write counterpart.
Parameters
microservice_idpathMicroservice id
environment_idpathEnvironment id
Responses
200Environment variablesruntime-settings
2 operationsRuntime settings
/b1/microservices/ms/runtime-settingsCreate or update runtime settings
Create or Update Runtime Settings
Creates or updates runtime configuration for a microservice without requiring a new deployment.
When to Use
Use this endpoint to adjust operational parameters (log levels, cache TTLs, feature toggles) that the service reads at runtime.
Request Body (application/json)
Provide a JSON payload with the settings to upsert. Refer to the OpenAPI schema for the full structure.
{
"microservice_id": "string",
"environment_id": "string",
"settings": {
"log_level": "info"
}
}Responses
- `200 OK` — Runtime settings were saved successfully.
Notes
- Unlike environment variables, runtime settings are designed to be consumed without restarting the service, depending on your application architecture.
- Validate the response against the OpenAPI schema to confirm persistence.
Responses
200Runtime settings saved/b1/microservices/ms/{microservice_id}/environment/{environment_id}/settingsGet runtime settings for a microservice
Get Runtime Settings
Retrieves the runtime configuration for a specific microservice and environment.
When to Use
Call this endpoint to inspect the current runtime settings — such as log levels, cache configuration, or feature toggles — before updating them or to verify a recent change.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
microservice_id | path | Yes | The unique identifier of the microservice. |
environment_id | path | Yes | The unique identifier of the environment. |
Responses
- `200 OK` — Returns the runtime settings object for the specified scope.
Notes
- Runtime settings are distinct from environment variables and are designed to take effect without a redeploy.
- Use
PUT /b1/microservices/ms/runtime-settingsas the write counterpart.
Parameters
microservice_idpathMicroservice id
environment_idpathEnvironment id
Responses
200Runtime settings