oCoreoCore Docs
API Reference

Environments

List all environments

Returns all environments across all projects for the organization.

GET
/environments

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

curl -X GET "//api.ocore.dev/api/environments" \
  -H "Authorization: <token>"

OK

{
  "environments": [
    null
  ],
  "total": 0
}

Get environment details

Returns a single environment by ID including instance, project, and deployment edges.

GET
/environments/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Environment UUID

curl -X GET "//api.ocore.dev/api/environments/<string>" \
  -H "Authorization: <token>"

OK

{
  "autoDestroyOnMerge": true,
  "autoSubdomain": "string",
  "branch": "string",
  "clonedFromId": "string",
  "commitBehavior": "string",
  "createdAt": "string",
  "description": "string",
  "environmentType": "string",
  "id": "string",
  "instanceId": "string",
  "instanceName": "string",
  "instanceSlug": "string",
  "instanceStatus": "string",
  "isNeutralized": true,
  "lastCommitAt": "string",
  "lastCommitAuthor": "string",
  "mailpitPort": 0,
  "name": "string",
  "odooVersion": "string",
  "pendingCommitCount": 0,
  "pendingCommitSha": "string",
  "primaryDomain": "string",
  "projectId": "string",
  "serverId": "string",
  "status": "string",
  "statusMessage": "string",
  "updatedAt": "string"
}

Delete an environment

Marks an environment for async deletion. Cannot delete production environments directly.

DELETE
/environments/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Environment UUID

curl -X DELETE "//api.ocore.dev/api/environments/<string>" \
  -H "Authorization: <token>"

Accepted

{
  "message": "string"
}

Update an environment

Updates an environment's name and description. The environment type cannot be changed.

PUT
/environments/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Updated environment fields

descriptionstring
namestring

Path Parameters

idRequiredstring

Environment UUID

curl -X PUT "//api.ocore.dev/api/environments/<string>" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "string",
    "name": "string"
  }'

OK

{
  "autoDestroyOnMerge": true,
  "autoSubdomain": "string",
  "branch": "string",
  "clonedFromId": "string",
  "commitBehavior": "string",
  "createdAt": "string",
  "description": "string",
  "environmentType": "string",
  "id": "string",
  "instanceId": "string",
  "instanceName": "string",
  "instanceSlug": "string",
  "instanceStatus": "string",
  "isNeutralized": true,
  "lastCommitAt": "string",
  "lastCommitAuthor": "string",
  "mailpitPort": 0,
  "name": "string",
  "odooVersion": "string",
  "pendingCommitCount": 0,
  "pendingCommitSha": "string",
  "primaryDomain": "string",
  "projectId": "string",
  "serverId": "string",
  "status": "string",
  "statusMessage": "string",
  "updatedAt": "string"
}

Clone an environment

Creates a clone of an existing environment on a new branch. Enqueues async database clone.

POST
/environments/{id}/clone

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Clone configuration

autoDestroyboolean
targetBranchstring
targetTypestring

Path Parameters

idRequiredstring

Source Environment UUID

curl -X POST "//api.ocore.dev/api/environments/<string>/clone" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "autoDestroy": true,
    "targetBranch": "string",
    "targetType": "string"
  }'

Accepted

{
  "autoDestroyOnMerge": true,
  "autoSubdomain": "string",
  "branch": "string",
  "clonedFromId": "string",
  "commitBehavior": "string",
  "createdAt": "string",
  "description": "string",
  "environmentType": "string",
  "id": "string",
  "instanceId": "string",
  "instanceName": "string",
  "instanceSlug": "string",
  "instanceStatus": "string",
  "isNeutralized": true,
  "lastCommitAt": "string",
  "lastCommitAuthor": "string",
  "mailpitPort": 0,
  "name": "string",
  "odooVersion": "string",
  "pendingCommitCount": 0,
  "pendingCommitSha": "string",
  "primaryDomain": "string",
  "projectId": "string",
  "serverId": "string",
  "status": "string",
  "statusMessage": "string",
  "updatedAt": "string"
}

Update commit behavior

Updates how the environment handles new commits (do_nothing, create_new_build, or update_previous_build).

PUT
/environments/{id}/commit-behavior

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Commit behavior setting

behaviorRequiredstring
Value in: "do_nothing" | "create_new_build" | "update_previous_build"

Path Parameters

idRequiredstring

Environment UUID

curl -X PUT "//api.ocore.dev/api/environments/<string>/commit-behavior" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "behavior": "do_nothing"
  }'

OK

{
  "commitBehavior": "string",
  "message": "string"
}

List environment deployments

Returns paginated deployment history for the environment's linked instance.

GET
/environments/{id}/deployments

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Environment UUID

Query Parameters

limitinteger

Results per page (default 20, max 100)

offsetinteger

Offset for pagination

curl -X GET "//api.ocore.dev/api/environments/<string>/deployments?limit=0&offset=0" \
  -H "Authorization: <token>"

OK

{
  "deployments": [
    {
      "activeColor": "string",
      "branch": "string",
      "commitAuthor": "string",
      "commitAuthorAvatar": "string",
      "commitMessage": "string",
      "commitSha": "string",
      "completedAt": "string",
      "createdAt": "string",
      "durationMs": 0,
      "errorMessage": "string",
      "evidence": [
        {
          "artifactRefs": [
            "string"
          ],
          "completedAt": "string",
          "durationMs": 0,
          "gateKey": "string",
          "logRefs": [
            "string"
          ],
          "name": "string",
          "outcome": "string",
          "required": true,
          "startedAt": "string",
          "status": "string",
          "summary": "string",
          "validation": {
            "artifactRefs": [
              "string"
            ],
            "durationMs": 0,
            "exitCode": 0,
            "failureCard": {},
            "logExcerpt": "string",
            "mode": "string",
            "profile": "string"
          },
          "waiver": {
            "actor": "string",
            "auditStatus": "string",
            "confirmation": "string",
            "expiresAt": "string",
            "id": "string",
            "reason": "string",
            "scope": "string"
          }
        }
      ],
      "findings": [
        {
          "class": "string",
          "confidence": 0,
          "evidenceExcerpt": "string",
          "gateAction": "string",
          "metadata": {},
          "severity": "string"
        }
      ],
      "id": "string",
      "imageTag": "string",
      "instanceId": "string",
      "previousCommitSha": "string",
      "previousDeploymentId": "string",
      "projectId": "string",
      "risk": {
        "level": "string",
        "score": 0
      },
      "snapshotId": "string",
      "startedAt": "string",
      "status": "string",
      "steps": [
        {
          "completedAt": "string",
          "durationMs": 0,
          "id": "string",
          "name": "string",
          "output": "string",
          "sortOrder": 0,
          "startedAt": "string",
          "status": "string",
          "version": 0
        }
      ],
      "successVerdict": {
        "clean": true,
        "label": "string",
        "legacy": true,
        "reason": "string",
        "status": "string",
        "waived": true
      },
      "triggerType": "string",
      "updatedAt": "string"
    }
  ],
  "limit": 0,
  "offset": 0,
  "total": 0
}

Proxy Mailpit web UI

Reverse-proxies requests to the environment's Mailpit email testing interface via SSH tunnel.

GET
/environments/{id}/mail

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Environment UUID

curl -X GET "//api.ocore.dev/api/environments/<string>/mail" \
  -H "Authorization: <token>"

Proxied response

Promote or demote an environment

Changes an environment's stage (e.g., development to staging). Supports role gating, test gating, and force promotion.

POST
/environments/{id}/promote

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Promotion configuration

demotionDbOptionstring

"fresh" or "clone", only for demotion

forcePromoteboolean

admin-only, skips test gating

targetStageRequiredstring
Value in: "production" | "staging" | "development"

Path Parameters

idRequiredstring

Environment UUID

curl -X POST "//api.ocore.dev/api/environments/<string>/promote" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "demotionDbOption": "string",
    "forcePromote": true,
    "targetStage": "production"
  }'

Accepted

{
  "message": "string",
  "newStage": "string",
  "promotionId": "string"
}

Trigger a manual build

Manually triggers a build for pending commits on environments with "do_nothing" commit behavior.

POST
/environments/{id}/trigger-build

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Environment UUID

curl -X POST "//api.ocore.dev/api/environments/<string>/trigger-build" \
  -H "Authorization: <token>"

Accepted

{
  "activeColor": "string",
  "branch": "string",
  "commitAuthor": "string",
  "commitAuthorAvatar": "string",
  "commitMessage": "string",
  "commitSha": "string",
  "completedAt": "string",
  "createdAt": "string",
  "durationMs": 0,
  "errorMessage": "string",
  "evidence": [
    {
      "artifactRefs": [
        "string"
      ],
      "completedAt": "string",
      "durationMs": 0,
      "gateKey": "string",
      "logRefs": [
        "string"
      ],
      "name": "string",
      "outcome": "string",
      "required": true,
      "startedAt": "string",
      "status": "string",
      "summary": "string",
      "validation": {
        "artifactRefs": [
          "string"
        ],
        "durationMs": 0,
        "exitCode": 0,
        "failureCard": {},
        "logExcerpt": "string",
        "mode": "string",
        "profile": "string"
      },
      "waiver": {
        "actor": "string",
        "auditStatus": "string",
        "confirmation": "string",
        "expiresAt": "string",
        "id": "string",
        "reason": "string",
        "scope": "string"
      }
    }
  ],
  "findings": [
    {
      "class": "string",
      "confidence": 0,
      "evidenceExcerpt": "string",
      "gateAction": "string",
      "metadata": {},
      "severity": "string"
    }
  ],
  "id": "string",
  "imageTag": "string",
  "instanceId": "string",
  "previousCommitSha": "string",
  "previousDeploymentId": "string",
  "projectId": "string",
  "risk": {
    "level": "string",
    "score": 0
  },
  "snapshotId": "string",
  "startedAt": "string",
  "status": "string",
  "steps": [
    {
      "completedAt": "string",
      "durationMs": 0,
      "id": "string",
      "name": "string",
      "output": "string",
      "sortOrder": 0,
      "startedAt": "string",
      "status": "string",
      "version": 0
    }
  ],
  "successVerdict": {
    "clean": true,
    "label": "string",
    "legacy": true,
    "reason": "string",
    "status": "string",
    "waived": true
  },
  "triggerType": "string",
  "updatedAt": "string"
}

List commits since a SHA

Returns commits between a given SHA and the current HEAD of a branch via the Git provider API.

GET
/projects/{projectId}/commits-since

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

projectIdRequiredstring

Project UUID

Query Parameters

sinceRequiredstring

Starting commit SHA

branchRequiredstring

Branch name

curl -X GET "//api.ocore.dev/api/projects/<string>/commits-since?since=%3Cstring%3E&branch=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "commits": [
    null
  ],
  "totalCount": 0
}

List project environments

Returns all environments for a project, scoped to the current organization.

GET
/projects/{projectId}/environments

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

projectIdRequiredstring

Project UUID

curl -X GET "//api.ocore.dev/api/projects/<string>/environments" \
  -H "Authorization: <token>"

OK

[
  {
    "autoDestroyOnMerge": true,
    "autoSubdomain": "string",
    "branch": "string",
    "clonedFromId": "string",
    "commitBehavior": "string",
    "createdAt": "string",
    "description": "string",
    "environmentType": "string",
    "id": "string",
    "instanceId": "string",
    "instanceName": "string",
    "instanceSlug": "string",
    "instanceStatus": "string",
    "isNeutralized": true,
    "lastCommitAt": "string",
    "lastCommitAuthor": "string",
    "mailpitPort": 0,
    "name": "string",
    "odooVersion": "string",
    "pendingCommitCount": 0,
    "pendingCommitSha": "string",
    "primaryDomain": "string",
    "projectId": "string",
    "serverId": "string",
    "status": "string",
    "statusMessage": "string",
    "updatedAt": "string"
  }
]

Create an environment

Creates a new environment linking a project to an instance with a specific type and branch.

POST
/projects/{projectId}/environments

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Environment details

branchstring
environmentTypestring
instanceIdstring

Path Parameters

projectIdRequiredstring

Project UUID

curl -X POST "//api.ocore.dev/api/projects/<string>/environments" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "branch": "string",
    "environmentType": "string",
    "instanceId": "string"
  }'

Created

{
  "autoDestroyOnMerge": true,
  "autoSubdomain": "string",
  "branch": "string",
  "clonedFromId": "string",
  "commitBehavior": "string",
  "createdAt": "string",
  "description": "string",
  "environmentType": "string",
  "id": "string",
  "instanceId": "string",
  "instanceName": "string",
  "instanceSlug": "string",
  "instanceStatus": "string",
  "isNeutralized": true,
  "lastCommitAt": "string",
  "lastCommitAuthor": "string",
  "mailpitPort": 0,
  "name": "string",
  "odooVersion": "string",
  "pendingCommitCount": 0,
  "pendingCommitSha": "string",
  "primaryDomain": "string",
  "projectId": "string",
  "serverId": "string",
  "status": "string",
  "statusMessage": "string",
  "updatedAt": "string"
}

Get pipeline data

Returns combined pipeline view data with environments, deployments, and test statuses grouped by stage.

GET
/projects/{projectId}/pipeline

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

projectIdRequiredstring

Project UUID

Query Parameters

recentDeploymentsinteger

Number of recent deployments per environment (default 1, max 10)

curl -X GET "//api.ocore.dev/api/projects/<string>/pipeline?recentDeployments=0" \
  -H "Authorization: <token>"

OK

{
  "stages": {}
}

Get test gate settings

Returns the current test gate settings for staging and production promotions.

GET
/projects/{projectId}/test-gates

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

projectIdRequiredstring

Project UUID

curl -X GET "//api.ocore.dev/api/projects/<string>/test-gates" \
  -H "Authorization: <token>"

OK

{
  "testGateProduction": "string",
  "testGateStaging": "string"
}

Update test gate settings

Updates the test gate requirements for staging and production promotions on a project.

PUT
/projects/{projectId}/test-gates

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Test gate settings

testGateProductionRequiredstring
Value in: "block" | "warn"
testGateStagingRequiredstring
Value in: "block" | "warn"

Path Parameters

projectIdRequiredstring

Project UUID

curl -X PUT "//api.ocore.dev/api/projects/<string>/test-gates" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "testGateProduction": "block",
    "testGateStaging": "block"
  }'

OK

{
  "message": "string",
  "testGateProduction": "string",
  "testGateStaging": "string"
}

Was this page helpful?