oCoreoCore Docs
API Reference

Snapshots

Stream rollback progress

Streams server-sent events with rollback progress until the rollback completes or fails.

GET
/deployments/{deploymentId}/rollback/progress

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

deploymentIdRequiredstring

Deployment ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback/progress" \
  -H "Authorization: <token>"

SSE stream of rollback-progress events

"string"

Rollback to snapshot

Initiates a rollback to a specific snapshot, optionally to a different environment within the same project.

POST
/environments/{environmentId}/rollback

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Rollback parameters

createSafetySnapshotboolean
snapshotIdstring
targetEnvironmentIdstring

if set, rollback into this env instead

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X POST "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "createSafetySnapshot": true,
    "snapshotId": "string",
    "targetEnvironmentId": "string"
  }'

Accepted

{
  "deploymentId": "string",
  "environmentId": "string",
  "message": "string",
  "snapshotId": "string"
}

List rollback logs

Returns all rollback log entries for an environment, ordered by most recent.

GET
/environments/{environmentId}/rollback-logs

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback-logs" \
  -H "Authorization: <token>"

OK

{
  "rollbackLogs": [
    {
      "completedAt": "string",
      "createdAt": "string",
      "deploymentId": "string",
      "environmentId": "string",
      "errorMessage": "string",
      "id": "string",
      "neutralizationTriggered": true,
      "performedBy": "string",
      "recoveryEvidence": {
        "artifactChecksums": {
          "property1": "string",
          "property2": "string"
        },
        "artifactPaths": {
          "property1": "string",
          "property2": "string"
        },
        "blockingSteps": [
          "string"
        ],
        "canWriteCleanSuccess": true,
        "missingEvidence": [
          "string"
        ],
        "missingSteps": [
          "string"
        ],
        "operation": "string",
        "optionalFailedSteps": [
          "string"
        ],
        "progress": {},
        "reason": "string",
        "remoteCopyState": "string",
        "requiredSteps": [
          "string"
        ],
        "status": "string",
        "whyGreen": [
          "string"
        ],
        "whyNotGreen": [
          "string"
        ]
      },
      "rollbackDeploymentId": "string",
      "safetySnapshotCreated": true,
      "safetySnapshotId": "string",
      "snapshotId": "string",
      "startedAt": "string",
      "status": "string"
    }
  ],
  "total": 0
}

Get snapshot settings

Returns the snapshot settings for an environment, creating defaults if none exist.

GET
/environments/{environmentId}/snapshot-settings

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshot-settings" \
  -H "Authorization: <token>"

OK

{
  "autoEnabled": true,
  "createdAt": "string",
  "environmentId": "string",
  "failurePolicy": "string",
  "id": "string",
  "maxPinned": 0,
  "retentionDays": 0,
  "timeoutSeconds": 0,
  "updatedAt": "string"
}

Update snapshot settings

Updates snapshot settings for an environment (auto-enable, retention, timeout, etc.).

PUT
/environments/{environmentId}/snapshot-settings

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Snapshot settings

autoEnabledboolean
failurePolicystring
maxPinnedinteger
retentionDaysinteger
timeoutSecondsinteger

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X PUT "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshot-settings" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "autoEnabled": true,
    "failurePolicy": "string",
    "maxPinned": 0,
    "retentionDays": 0,
    "timeoutSeconds": 0
  }'

OK

{
  "autoEnabled": true,
  "createdAt": "string",
  "environmentId": "string",
  "failurePolicy": "string",
  "id": "string",
  "maxPinned": 0,
  "retentionDays": 0,
  "timeoutSeconds": 0,
  "updatedAt": "string"
}

Estimate snapshot size

Returns estimated database and filestore sizes for a potential snapshot.

GET
/environments/{environmentId}/snapshot-size

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshot-size" \
  -H "Authorization: <token>"

OK

{
  "dbSizeBytes": 0,
  "filestoreSizeBytes": 0,
  "totalSizeBytes": 0
}

List environment snapshots

Returns a paginated list of snapshots for an environment.

GET
/environments/{environmentId}/snapshots

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"

Query Parameters

limitinteger

Page size (max 100)

Default: 20
offsetinteger

Offset

Default: 0
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots?limit=20&offset=0" \
  -H "Authorization: <token>"

OK

{
  "limit": 0,
  "offset": 0,
  "snapshots": [
    {
      "commitSha": "string",
      "completedAt": "string",
      "configPath": "string",
      "createdAt": "string",
      "dbDumpPath": "string",
      "dbSizeBytes": 0,
      "deploymentId": "string",
      "durationMs": 0,
      "environmentId": "string",
      "environmentName": "string",
      "environmentType": "string",
      "errorMessage": "string",
      "expiresAt": "string",
      "filestorePath": "string",
      "filestoreSizeBytes": 0,
      "id": "string",
      "imageTag": "string",
      "isFullFilestore": true,
      "isPinned": true,
      "pinLabel": "string",
      "recoveryEvidence": {
        "artifactChecksums": {
          "property1": "string",
          "property2": "string"
        },
        "artifactPaths": {
          "property1": "string",
          "property2": "string"
        },
        "blockingSteps": [
          "string"
        ],
        "canWriteCleanSuccess": true,
        "missingEvidence": [
          "string"
        ],
        "missingSteps": [
          "string"
        ],
        "operation": "string",
        "optionalFailedSteps": [
          "string"
        ],
        "progress": {},
        "reason": "string",
        "remoteCopyState": "string",
        "requiredSteps": [
          "string"
        ],
        "status": "string",
        "whyGreen": [
          "string"
        ],
        "whyNotGreen": [
          "string"
        ]
      },
      "remoteStatus": "string",
      "startedAt": "string",
      "status": "string",
      "totalSizeBytes": 0,
      "trigger": "string"
    }
  ],
  "total": 0
}

Create manual snapshot

Enqueues a manual snapshot creation job for the environment.

POST
/environments/{environmentId}/snapshots

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
curl -X POST "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots" \
  -H "Authorization: <token>"

Accepted

{
  "environmentId": "string",
  "message": "string"
}

Get snapshot details

Returns a single snapshot by ID including rollback logs.

GET
/environments/{environmentId}/snapshots/{snapshotId}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
snapshotIdRequiredstring

Snapshot ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: <token>"

OK

{
  "commitSha": "string",
  "completedAt": "string",
  "configPath": "string",
  "createdAt": "string",
  "dbDumpPath": "string",
  "dbSizeBytes": 0,
  "deploymentId": "string",
  "durationMs": 0,
  "environmentId": "string",
  "environmentName": "string",
  "environmentType": "string",
  "errorMessage": "string",
  "expiresAt": "string",
  "filestorePath": "string",
  "filestoreSizeBytes": 0,
  "id": "string",
  "imageTag": "string",
  "isFullFilestore": true,
  "isPinned": true,
  "pinLabel": "string",
  "recoveryEvidence": {
    "artifactChecksums": {
      "property1": "string",
      "property2": "string"
    },
    "artifactPaths": {
      "property1": "string",
      "property2": "string"
    },
    "blockingSteps": [
      "string"
    ],
    "canWriteCleanSuccess": true,
    "missingEvidence": [
      "string"
    ],
    "missingSteps": [
      "string"
    ],
    "operation": "string",
    "optionalFailedSteps": [
      "string"
    ],
    "progress": {},
    "reason": "string",
    "remoteCopyState": "string",
    "requiredSteps": [
      "string"
    ],
    "status": "string",
    "whyGreen": [
      "string"
    ],
    "whyNotGreen": [
      "string"
    ]
  },
  "remoteStatus": "string",
  "startedAt": "string",
  "status": "string",
  "totalSizeBytes": 0,
  "trigger": "string"
}

Delete a snapshot

Deletes a snapshot. Pinned snapshots and snapshots referenced by differentials cannot be deleted.

DELETE
/environments/{environmentId}/snapshots/{snapshotId}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
snapshotIdRequiredstring

Snapshot ID

Format: "uuid"
curl -X DELETE "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: <token>"

No Content

Unpin a snapshot

Removes the pin from a snapshot, allowing automatic deletion.

DELETE
/environments/{environmentId}/snapshots/{snapshotId}/pin

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
snapshotIdRequiredstring

Snapshot ID

Format: "uuid"
curl -X DELETE "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/pin" \
  -H "Authorization: <token>"

OK

{
  "message": "string"
}

Pin a snapshot

Pins a snapshot to prevent automatic deletion, with an optional label.

PUT
/environments/{environmentId}/snapshots/{snapshotId}/pin

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Pin request with optional label

labelstring

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
snapshotIdRequiredstring

Snapshot ID

Format: "uuid"
curl -X PUT "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/pin" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "string"
  }'

OK

{
  "message": "string"
}

Stream snapshot progress

Streams server-sent events with snapshot creation progress until the snapshot completes or fails.

GET
/environments/{environmentId}/snapshots/{snapshotId}/progress

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

environmentIdRequiredstring

Environment ID

Format: "uuid"
snapshotIdRequiredstring

Snapshot ID

Format: "uuid"
curl -X GET "//api.ocore.dev/api/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/progress" \
  -H "Authorization: <token>"

SSE stream of snapshot-progress events

"string"

List project snapshots

Returns all snapshots across all environments in a project with optional filtering by environment type and status.

GET
/projects/{projectId}/snapshots

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

projectIdRequiredstring

Project ID

Format: "uuid"

Query Parameters

environmentTypestring

Filter by environment type

statusstring

Filter by snapshot status

limitinteger

Page size (max 100)

Default: 20
offsetinteger

Offset

Default: 0
curl -X GET "//api.ocore.dev/api/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots?environmentType=%3Cstring%3E&status=%3Cstring%3E&limit=20&offset=0" \
  -H "Authorization: <token>"

OK

{
  "snapshots": [
    {
      "commitSha": "string",
      "completedAt": "string",
      "configPath": "string",
      "createdAt": "string",
      "dbDumpPath": "string",
      "dbSizeBytes": 0,
      "deploymentId": "string",
      "durationMs": 0,
      "environmentId": "string",
      "environmentName": "string",
      "environmentType": "string",
      "errorMessage": "string",
      "expiresAt": "string",
      "filestorePath": "string",
      "filestoreSizeBytes": 0,
      "id": "string",
      "imageTag": "string",
      "isFullFilestore": true,
      "isPinned": true,
      "pinLabel": "string",
      "recoveryEvidence": {
        "artifactChecksums": {
          "property1": "string",
          "property2": "string"
        },
        "artifactPaths": {
          "property1": "string",
          "property2": "string"
        },
        "blockingSteps": [
          "string"
        ],
        "canWriteCleanSuccess": true,
        "missingEvidence": [
          "string"
        ],
        "missingSteps": [
          "string"
        ],
        "operation": "string",
        "optionalFailedSteps": [
          "string"
        ],
        "progress": {},
        "reason": "string",
        "remoteCopyState": "string",
        "requiredSteps": [
          "string"
        ],
        "status": "string",
        "whyGreen": [
          "string"
        ],
        "whyNotGreen": [
          "string"
        ]
      },
      "remoteStatus": "string",
      "startedAt": "string",
      "status": "string",
      "totalSizeBytes": 0,
      "trigger": "string"
    }
  ],
  "total": 0
}

Was this page helpful?