---
title: "List all jobs"
method: GET
path: "/sqlserver/v1/orgs/{OrgID}/reports/jobs"
tags: ["SQLServer"]
---

# List all jobs

`GET /sqlserver/v1/orgs/{OrgID}/reports/jobs`

## Request

- Base URL: `//apis.druva.com/phoenix` (relative, and the document’s source URL is not known)
- URL: `//apis.druva.com/phoenix/sqlserver/v1/orgs/{OrgID}/reports/jobs`
- Auth: API key in header `Authorization`

Returns all jobs for SQL.

## Path parameters

- `OrgID` integer, required

## Query parameters

- `jobType` string
- `resourceName` string
- `resourceType` string
- `status` string
- `pageToken` string
- `fromTime` string, date-time
- `toTime` string, date-time
- `sortOrder` string

## Response `200`

Success

- SQLGetAllJobsReportResponse: GetAllJobsReportResponse is the response schema for GetAllJobsReport
  - `Jobs` SQLGetAllJobsReport[]
    - `backupContent` JSONMap: Returns the data for the current job.
    - `endTime` string: The time when the job completes. The time is specified in the UTC timezone. The format is YYYY-MM-DDTHH:MM:SSZ.
    - `errorCode` string: The error code for the failed jobs. The possible values are: \"0\": If the job is successful <error_number>: If the job has failed
    - `errorMessage` string: The error message for failed jobs. This field is empty if the job is successful.
    - `jobID` integer: The unique identification number associated with the job.
    - `jobType` string: The type of the job. The job type can be "Backup", "Restore", "Log Request", and "Defreeze".
    - `organizationName` string: The name of the organization.
    - `resourceID` integer: The unique identification number associated with the resource.
    - `resourceName` string: The name of the SQL resource.
    - `resourceType` string: The type of SQL resource. The resource type can be "SA" or "AG".
    - `scheduleTime` string: The date and time when the job starts or is scheduled to start. The time is specified in UTC in the format YYYY-MM-DDTHH:MM:SSZ.
    - `startTime` string: The time when the job starts. The time is specified in the UTC timezone. The format is YYYY-MM-DDTHH:MM:SSZ.
    - `status` 'Queued' | 'Running' | 'Successful' | 'Successful with errors' | 'Failed': The status of the job.
  - `nextPageToken` string: The token to access the next page of results. This parameter will be empty for the last page of results.

## Other responses

- `400`: Bad Request
- `404`: The requested resource was not found.
- `500`: The request was not processed due to an internal error in the Cloud.

---

[API](https://skmtc.dev/druva/apis/enterprise-workloads.md) - [All operations](https://skmtc.dev/druva/apis/enterprise-workloads/llms.txt) - [OpenAPI document](https://skmtc.dev/druva/apis/enterprise-workloads/revisions/18fc75e8229e?raw)
