---
title: "Release a held job"
method: POST
path: "/jobs/{uuid}/release"
tags: ["Jobs"]
---

# Release a held job

`POST /jobs/{uuid}/release`

## Request

- Base URL: `https://localhost/index.php/api`
- URL: `https://localhost/index.php/api/jobs/{uuid}/release`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/worldbank/apis/metadata-editor-jobs-api/docs/jobs/:uuid/release/post.ts> (a function with typed inputs; its response is checked against the schema)

Admin only. Restores a held job to pending status.

## Path parameters

- `uuid` string, required

## Response `200`

Job released

- JobDetailResponse
  - `status` string
  - `job` Job: Job object
    - `uuid` string
    - `job_type` 'generate_pdf' | 'generate_microdata_resource' | 'import_microdata' | 'import_indicator_data' | 'publish_project' | 'hello_world': Registered background job type identifier
    - `status` 'pending' | 'held' | 'processing' | 'completed' | 'failed': Current job status
    - `priority` integer: Job priority
    - `user_id` integer: User who initiated the job (NULL for system jobs)
    - `payload` union: Job-specific parameters; shape depends on job_type (see *JobPayload schemas)
      - GeneratePdfJobPayload: Payload for PDF generation job (used in generic /jobs endpoint)
        - `project_id` integer, required: Project ID for which to generate the PDF
        - `options` object: Optional PDF generation options
          - `template` string: PDF template to use (optional)
          - `format` string: PDF format options (optional)
      - GenerateMicrodataResourceJobPayload: Payload for generate_microdata_resource job (used in generic /jobs endpoint)
        - `project_id` integer, required: Project ID (sid)
        - `export_format` string, required: csv, dta, sav, xpt, or json
        - `export_version` string: Stata version when export_format is dta
        - `file_ids` string[]
        - `zip` boolean
        - `overwrite` boolean
        - `resource_id` integer: Regenerate an existing generated resource
        - `refresh_description` boolean
        - `max_wait_seconds` integer
      - ImportMicrodataJobPayload: Payload for microdata import job
        - `file_id` string, required: File ID of the uploaded data file to import
        - `project_id` string, required: Project ID where the data will be imported
      - ImportIndicatorDataJobPayload: Payload for import_indicator_data job (used in generic /jobs endpoint)
        - `project_id` integer, required: Project sid
        - `upload_id` string, required: Completed resumable upload ID
        - `indicator_value` string, required
        - `delimiter` string
        - `keep_extra_csv_columns` boolean
      - PublishProjectJobPayload: Payload for publish_project job (used in generic /jobs endpoint)
        - `project_id` union, required
          - integer
          - string
        - `catalog_connection_id` integer, required
        - `user_id` integer, required: User performing the publish (set automatically by convenience endpoint)
        - `publish_metadata` boolean
        - `publish_thumbnail` boolean
        - `publish_resources` boolean
        - `publish_dsd` boolean
        - `dsd_overwrite` boolean
        - `publish_indicator_data` boolean
        - `delete_nada_resources` boolean
        - `options` object
      - HelloWorldJobPayload: Payload for hello_world job (testing/demo; POST /jobs only)
        - `message` string: Optional greeting message
    - `result` union: Job result when completed; shape depends on job_type (see *JobResult schemas)
      - GeneratePdfJobResult: Result returned when PDF generation job completes successfully
        - `pdf_path` string: File path to the generated PDF
        - `project_id` integer: Project ID for which the PDF was generated
        - `generated_at` string, date-time: Timestamp when PDF was generated
      - GenerateMicrodataResourceJobResult: Result returned when microdata resource generation job completes
        - `status` 'success' | 'skipped'
        - `project_id` integer
        - `export_format` string
        - `resource_id` integer
        - `filename` string
        - `links_count` integer
        - `message` string: Present when status is skipped (resource already exists)
      - ImportMicrodataJobResult: Result returned when microdata import job completes successfully
        - `fastapi_job_id` string: FastAPI processing job ID
        - `file_id` string: File ID that was imported
        - `project_id` union: Project ID where data was imported
          - string
          - integer
        - `datafile_path` string: Path to the processed data file
        - `variables_imported` integer: Number of variables imported from the data dictionary
        - `case_count` integer, nullable: Row count from the data dictionary
        - `csv_file` string, nullable: Basename of the CSV file after cleanup
        - `fastapi_status` string
        - `message` string
      - ImportIndicatorDataJobResult: Result returned when indicator data import job completes successfully
        - `status` string
        - `indicator_value` string
        - `job_id` string: FastAPI replace-from-csv job ID
      - PublishProjectJobResult: Result returned when publish_project job completes
        - `results` object: Per-step publish outcomes (metadata, thumbnail, resources, dsd, etc.)
        - `errors` object: Non-fatal step errors keyed by step name
        - `project_id` union
          - integer
          - string
        - `catalog_connection_id` integer
        - `published_at` string, date-time
      - HelloWorldJobResult: Result returned when hello_world job completes
        - `message` string
        - `processed_at` string, date-time
        - `job_id` integer: Internal job queue ID
    - `error_message` string: Error details if job failed
    - `attempts` integer: Number of processing attempts
    - `max_attempts` integer: Maximum retry attempts
    - `created_at` string, date-time: Job creation timestamp
    - `started_at` string, date-time: Job processing start timestamp (null if not started)
    - `completed_at` string, date-time: Job completion timestamp (null if not completed)
    - `worker_id` string: Worker identifier processing this job (null if not processing)
  - `worker_status` WorkerStatus
    - `is_running` boolean: Whether the worker process is running
    - `is_alive` boolean: Whether the worker is alive (based on heartbeat)
    - `pid_file_exists` boolean: Whether PID file exists
    - `heartbeat_file_exists` boolean: Whether heartbeat file exists
    - `heartbeat_age_seconds` integer: Age of last heartbeat in seconds
    - `pid_data` object: PID file data
      - `pid` integer
      - `worker_id` string
      - `started_at` string
      - `poll_interval` integer
    - `heartbeat_data` object: Heartbeat file data
      - `worker_id` string
      - `pid` integer
      - `timestamp` integer
      - `datetime` string
    - `active_worker_count` integer: Number of active workers (jobs currently being processed)
    - `active_worker_ids` string[]: List of active worker IDs

## Other responses

- `400`: Bad request
- `403`: Access denied

## Changes

- **2026-06-06** `7f334b22fc50`: 4 breaking, 6 warning
  - added `#/components/schemas/GeneratePdfJobPayload, #/components/schemas/GenerateMicrodataResourceJobPayload, #/components/schemas/ImportMicrodataJobPayload, #/components/schemas/ImportIndicatorDataJobPayload, #/components/schemas/PublishProjectJobPayload, #/components/schemas/HelloWorldJobPayload` to the `job/payload` response property `oneOf` list for the response status `200`
  - added `#/components/schemas/GeneratePdfJobResult, #/components/schemas/GenerateMicrodataResourceJobResult, #/components/schemas/ImportMicrodataJobResult, #/components/schemas/ImportIndicatorDataJobResult, #/components/schemas/PublishProjectJobResult, #/components/schemas/HelloWorldJobResult` to the `job/result` response property `oneOf` list for the response status `200`
  - the `job/payload` response's property type changed from `object` to no type for status `200`
  - the `job/result` response's property type changed from `object` to no type for status `200`
  - …6 more
- **2026-05-24** `1ff58dcd71a4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/worldbank/apis/metadata-editor-jobs-api/changes/jobs/:uuid/release/post.md)

---

[API](https://skmtc.dev/worldbank/apis/metadata-editor-jobs-api.md) - [All operations](https://skmtc.dev/worldbank/apis/metadata-editor-jobs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/worldbank/apis/metadata-editor-jobs-api/revisions/755536b6492e?raw)
