Dapr Jobs API

Job scheduling operations.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

dapr-jobs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Dapr Actors Jobs API
  description: The Dapr Actors API provides virtual actor capabilities for distributed applications, including actor method invocation, state management, timers, and reminders. Actors provide a single-threaded programming model with guaranteed message ordering.
  version: 1.0.0
  contact:
    name: Dapr
    url: https://dapr.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:3500
  description: Dapr Sidecar
tags:
- name: Jobs
  description: Job scheduling operations.
paths:
  /v1.0-alpha1/jobs/{name}:
    post:
      summary: Dapr Schedule Job
      description: Schedules a new job with the specified name, schedule, and data. At least one of schedule or dueTime must be provided.
      operationId: scheduleJob
      tags:
      - Jobs
      parameters:
      - name: name
        in: path
        required: true
        description: The name of the job.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobRequest'
      responses:
        '204':
          description: Job scheduled successfully.
        '400':
          description: Bad request.
        '500':
          description: Failed to schedule job.
    get:
      summary: Dapr Get Job
      description: Retrieves the details of a scheduled job by name.
      operationId: getJob
      tags:
      - Jobs
      parameters:
      - name: name
        in: path
        required: true
        description: The name of the job to retrieve.
        schema:
          type: string
      responses:
        '200':
          description: Job details retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '404':
          description: Job not found.
        '500':
          description: Failed to get job.
    delete:
      summary: Dapr Delete Job
      description: Deletes a scheduled job by name.
      operationId: deleteJob
      tags:
      - Jobs
      parameters:
      - name: name
        in: path
        required: true
        description: The name of the job to delete.
        schema:
          type: string
      responses:
        '204':
          description: Job deleted successfully.
        '404':
          description: Job not found.
        '500':
          description: Failed to delete job.
components:
  schemas:
    JobResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the job.
        schedule:
          type: string
          description: The job schedule.
        dueTime:
          type: string
          description: The due time for the job.
        repeats:
          type: integer
          description: Number of repeats.
        data:
          description: The job data payload.
    JobRequest:
      type: object
      properties:
        schedule:
          type: string
          description: The schedule for the job using a cron expression or duration (e.g., @every 5s).
        dueTime:
          type: string
          description: The time at which the job should be triggered (RFC3339 or duration).
        repeats:
          type: integer
          description: The number of times the job should be triggered.
        ttl:
          type: string
          description: Time-to-live for the job.
        data:
          description: The data payload to include with the job trigger.
externalDocs:
  description: Dapr Actors API Reference
  url: https://docs.dapr.io/reference/api/actors_api/