Skip to main content

Unarchive Model

Page Outline

POST/api/v1/models/{model_id}/unarchive

The Unarchive Model endpoint restores a model from archived status back to ready (or its previous non-archived status). Unarchiving a model makes it visible again in default list views across the organizational workspace and renders it eligible for further training, hyperparameter tuning, and active deployment in the inference layer.

[!TIP] Unarchiving is non-destructive. All historical configurations, version history, training metrics, and audit logs are fully retained during the archival and unarchival phases. For broad metadata retrieval, refer to the Get Model Details documentation.

Authentication Requirements

This endpoint requires robust authorization. You must include a valid Bearer token in the Authorization header.

  • Header: Authorization: Bearer <Your-JWT-Token>
  • Permissions Required: The user must belong to the organization that owns the model, and their Role-Based Access Control (RBAC) profile must include either organization:admin or model:write privileges.

Path Parameters

ParameterTypeRequiredDescription
model_idstringYesThe unique identifier (mdl-xxx) of the archived model instance you are attempting to restore.

Operational Behavior

When invoked, the unarchive operation executes a sequence of validation and state transition tasks:

  1. State Validation: The backend system verifies that the target model is currently in status: "archived". Attempting to unarchive a model that is already ready, draft, or training will trigger an HTTP 409 Conflict error.
  2. Status Restoration:
    • If the model has previously completed a successful training run, it is restored to ready status.
    • If no prior training versions exist, it is restored to draft status.
  3. Audit Trailing: A mandatory Audit Log entry is automatically generated, capturing the actor, timestamp, and action model.unarchived for compliance tracking.
  4. Ownership Check: If the model_id is invalid or belongs to a different organizational tenant, the API safely aborts and returns an HTTP 404 Not Found to prevent data leakage.

Response

Upon successful restoration, the API responds with an HTTP 200 OK status and returns the fully updated Model object JSON payload reflecting its restored state.

Example JSON Response

{
"id": "mdl-7f3a19bc92",
"name": "Customer Churn Predictor",
"status": "ready",
"organization_id": "org-29da8f11",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-03-14T10:15:30Z",
"unarchived_at": "2026-03-14T10:15:30Z",
"metadata": {
"framework": "xgboost",
"target_variable": "churn_probability"
}
}

Error Codes

Developers should gracefully handle the following error scenarios:

CodeReasonResolution
401UnauthorizedVerify your JWT token format and ensure it has not expired.
403ForbiddenEnsure the authenticated user has model:write permissions.
404Not FoundCheck the model_id for typos and verify organization access.
409ConflictThe model is not currently archived. Check its status using Get Model.
429Too Many RequestsRate limit exceeded. Standard backoff procedures apply.