openapi: 3.2.0 info: contact: email: support@yugabyte.com name: YugabyteDB Anywhere Support url: https://docs.yugabyte.com description: An improved set of APIs for managing YugabyteDB Anywhere license: name: Polyform Free Trial License 1.0.0 url: https://github.com/yugabyte/yugabyte-db/blob/master/licenses/POLYFORM-FREE-TRIAL-LICENSE-1.0.0.txt title: YugabyteDB Anywhere V2 Job Scheduler API version: v2 servers: - description: API endpoint of YBA server url: '{protocol}://{host_port}/api/v2' variables: protocol: default: http enum: - http - https host_port: default: localhost:9000 tags: - description: Job Scheduler name: Job Scheduler paths: /customers/{cUUID}/job-schedules/{jUUID}: delete: description: 'WARNING: This is a preview API that could change.' operationId: DeleteJobSchedule parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple - description: Job Schedule UUID explode: false in: path name: jUUID required: true schema: format: uuid type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobSchedule' description: Job schedule '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: Delete Job Schedule tags: - Job Scheduler x-yba-api-audit: auditTargetType: JobSchedule auditTargetId: jUUID.toString() auditActionType: Delete x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-accepts: - application/json get: description: 'WARNING: This is a preview API that could change.' operationId: GetJobSchedule parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple - description: Job Schedule UUID explode: false in: path name: jUUID required: true schema: format: uuid type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobSchedule' description: Job schedule '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: Get Job Schedule tags: - Job Scheduler x-yba-api-audit: noAudit: true x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-accepts: - application/json put: description: 'WARNING: This is a preview API that could change.' operationId: UpdateJobSchedule parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple - description: Job Schedule UUID explode: false in: path name: jUUID required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/JobScheduleUpdateReq' responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobSchedule' description: Job schedule '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: Update Job Schedule tags: - Job Scheduler x-yba-api-audit: auditTargetType: JobSchedule auditTargetId: jUUID.toString() auditActionType: Update x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-content-type: application/json x-accepts: - application/json /customers/{cUUID}/job-schedules/page: post: description: 'WARNING: This is a preview API that could change.' operationId: PageListJobSchedules parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/JobSchedulePagedReq' responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobSchedulePagedResp' description: Job schedules '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: List Job Schedules (paginated) tags: - Job Scheduler x-yba-api-audit: noAudit: true x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-content-type: application/json x-accepts: - application/json /customers/{cUUID}/job-schedules/{jUUID}/job-instances/page: post: description: 'WARNING: This is a preview API that could change.' operationId: PageListJobInstances parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple - description: Job Schedule UUID explode: false in: path name: jUUID required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/JobInstancePagedReq' responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobInstancePagedResp' description: Job instances '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: List Job Instances (paginated) tags: - Job Scheduler x-yba-api-audit: noAudit: true x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-content-type: application/json x-accepts: - application/json /customers/{cUUID}/job-schedules/{jUUID}/snooze: post: description: 'WARNING: This is a preview API that could change.' operationId: SnoozeJobSchedule parameters: - description: Customer UUID explode: false in: path name: cUUID required: true schema: format: uuid type: string style: simple - description: Job Schedule UUID explode: false in: path name: jUUID required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/JobScheduleSnoozeReq' responses: '200': content: application/json: schema: $ref: '#/components/schemas/JobSchedule' description: Job schedule '400': description: Invalid input '500': description: Server error security: - apiKeyAuth: [] summary: Snooze Job Schedule tags: - Job Scheduler x-yba-api-audit: auditTargetType: JobSchedule auditTargetId: jUUID.toString() auditActionType: Update x-yba-api-authz: - requiredPermission: resourceType: other action: read resourceLocation: path: customers sourceType: endpoint x-yba-api-since: 2024.2.0.0 x-yba-api-visibility: preview x-content-type: application/json x-accepts: - application/json components: schemas: JobSchedule: description: Job schedule which contains the spec and execution info for a schedule. example: spec: job_config: classname: classname config: key: '{}' name: name schedule_config: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 info: last_end_time: 2024-07-25 13:07:18+00:00 updated_at: 2024-07-25 13:07:18+00:00 execution_count: 6 customer_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 created_at: 2024-07-25 13:07:18+00:00 failed_count: 1 next_start_time: 2024-07-25 13:07:18+00:00 state: ACTIVE last_start_time: 2024-07-25 13:07:18+00:00 uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 last_job_instance_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: spec: $ref: '#/components/schemas/JobScheduleSpec' info: $ref: '#/components/schemas/JobScheduleInfo' title: JobSchedule type: object JobScheduleInfo: description: Job schedule info which is a part of JobSchedule. example: last_end_time: 2024-07-25 13:07:18+00:00 updated_at: 2024-07-25 13:07:18+00:00 execution_count: 6 customer_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 created_at: 2024-07-25 13:07:18+00:00 failed_count: 1 next_start_time: 2024-07-25 13:07:18+00:00 state: ACTIVE last_start_time: 2024-07-25 13:07:18+00:00 uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 last_job_instance_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: created_at: description: Creation time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string customer_uuid: description: Customer UUID format: uuid readOnly: true type: string execution_count: description: Total execution count format: int64 readOnly: true type: integer failed_count: description: Total failed count format: int64 readOnly: true type: integer last_end_time: description: Last end time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string last_job_instance_uuid: description: Last job instance UUID format: uuid readOnly: true type: string last_start_time: description: Last start time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string next_start_time: description: Next start time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string state: $ref: '#/components/schemas/JobScheduleState' updated_at: description: Updated time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string uuid: description: Job schedule UUID format: uuid readOnly: true type: string title: JobScheduleInfo type: object JobInstanceState: description: State of a job instance that is a part of JobInstance. enum: - FAILED - RUNNING - SUCCESS - SCHEDULED - SKIPPED title: JobInstanceState type: string JobScheduleApiFilter: description: API filter for job schedule that is a part of JobSchedulePagedQuerySpec. example: enabled_only: true next_start_window_secs: 1 config_class: config_class name_regex: name_regex type: FIXED_DELAY properties: config_class: description: Filter by config class of the job. type: string enabled_only: description: Filter out disabled job schedules if true. type: boolean name_regex: description: Filter by name regex. type: string next_start_window_secs: description: Filter by next start time window from now. format: int64 type: integer type: $ref: '#/components/schemas/JobScheduleType' title: JobScheduleApiFilter type: object JobScheduleType: description: 'Job schedule type which is a part of JobScheduleConfigSpec. Fixed delay keeps a fixed interval between the end and start of previous and next job executions respectively. Fixed rate tries to keep a fixed interval between the job execution start times. If a previous job is still running, the next job waits. ' enum: - FIXED_DELAY - FIXED_RATE title: JobScheduleType type: string JobScheduleState: description: Job schedule state of a schedule that is a part of JobScheduleInfo. enum: - ACTIVE - INACTIVE title: JobScheduleState type: string PaginationSpec: description: Pagination spec in page API requests. properties: offset: description: Start offset of the records. format: int32 type: integer limit: description: Maximum number of records to be fetched. format: int32 type: integer direction: description: Sort order of the records. enum: - ASC - DESC type: string title: PaginationSpec type: object JobConfigSpec: description: Job config spec for a schedule that is a part of JobScheduleSpec example: classname: classname config: key: '{}' properties: classname: description: Class name of the job config. readOnly: true type: string config: additionalProperties: type: object description: Additional custom configuration. type: object required: - classname title: JobConfigSpec type: object JobInstancePagedQuerySpec: allOf: - $ref: '#/components/schemas/PaginationSpec' - description: 'JobInstancePagedQuerySpec Paged API query params for job instance. ' properties: filter: $ref: '#/components/schemas/JobInstanceApiFilter' sort_by: description: Sort fields of the records. enum: - uuid - jobScheduleUuid - state - createdAt - startTime - endTime type: string title: JobInstancePagedQuerySpec type: object example: null example: filter: state: FAILED start_window_secs: 1 offset: 0 limit: 6 sort_by: uuid direction: ASC type: object JobInstanceApiFilter: description: API filter for job instance that is a part of JobInstancePagedQuerySpec. example: state: FAILED start_window_secs: 1 properties: start_window_secs: description: Filter by start time falling within the time window from now. format: int64 type: integer state: $ref: '#/components/schemas/JobInstanceState' title: JobInstanceApiFilter type: object JobInstancePagedResp: allOf: - $ref: '#/components/schemas/PaginationResp' - description: Paged API query response for job instance. properties: entities: items: $ref: '#/components/schemas/JobInstanceInfo' type: array title: JobInstancePagedResp type: object example: null example: entities: - start_time: 2024-07-25 13:07:18+00:00 job_schedule_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 end_time: 2024-07-25 13:07:18+00:00 created_at: 2024-07-25 13:07:18+00:00 state: FAILED uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - start_time: 2024-07-25 13:07:18+00:00 job_schedule_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 end_time: 2024-07-25 13:07:18+00:00 created_at: 2024-07-25 13:07:18+00:00 state: FAILED uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 total_count: 0 has_next: true has_prev: true type: object JobInstanceInfo: description: Job instance info representing the execution instance of a JobSchedule. example: start_time: 2024-07-25 13:07:18+00:00 job_schedule_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 end_time: 2024-07-25 13:07:18+00:00 created_at: 2024-07-25 13:07:18+00:00 state: FAILED uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 properties: created_at: description: Creation time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string end_time: description: End time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string job_schedule_uuid: description: Job schedule UUID format: uuid readOnly: true type: string start_time: description: Start time example: 2024-07-25 13:07:18+00:00 format: date-time readOnly: true type: string state: $ref: '#/components/schemas/JobInstanceState' uuid: description: Job instance UUID format: uuid readOnly: true type: string title: JobInstanceInfo type: object JobScheduleUpdateSpec: allOf: - $ref: '#/components/schemas/JobScheduleConfigSpec' description: 'JobScheduleUpdateSpec Request payload for updating schedule config of a job. ' example: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 title: JobScheduleUpdateSpec type: object JobScheduleConfigSpec: description: Job schedule config spec for a job schedule. example: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 properties: disabled: description: Disable or enable the job schedule. type: boolean interval_secs: description: Delay interval between two jobs. format: int64 type: integer snooze_until: description: Time until the job should be snoozed. example: 2024-07-25 13:07:18+00:00 format: date-time type: string type: $ref: '#/components/schemas/JobScheduleType' required: - disabled - interval_secs - type title: JobScheduleConfigSpec type: object JobSchedulePagedResp: allOf: - $ref: '#/components/schemas/PaginationResp' - description: Paged API query response for job schedule. properties: entities: items: $ref: '#/components/schemas/JobSchedule' type: array title: JobSchedulePagedResp type: object example: null example: entities: - spec: job_config: classname: classname config: key: '{}' name: name schedule_config: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 info: last_end_time: 2024-07-25 13:07:18+00:00 updated_at: 2024-07-25 13:07:18+00:00 execution_count: 6 customer_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 created_at: 2024-07-25 13:07:18+00:00 failed_count: 1 next_start_time: 2024-07-25 13:07:18+00:00 state: ACTIVE last_start_time: 2024-07-25 13:07:18+00:00 uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 last_job_instance_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - spec: job_config: classname: classname config: key: '{}' name: name schedule_config: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 info: last_end_time: 2024-07-25 13:07:18+00:00 updated_at: 2024-07-25 13:07:18+00:00 execution_count: 6 customer_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 created_at: 2024-07-25 13:07:18+00:00 failed_count: 1 next_start_time: 2024-07-25 13:07:18+00:00 state: ACTIVE last_start_time: 2024-07-25 13:07:18+00:00 uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 last_job_instance_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 total_count: 0 has_next: true has_prev: true type: object JobScheduleSnoozeSpec: description: 'JobScheduleSnoozeSpec Request payload to put off the next schedule by snooze secs. ' example: snooze_secs: 0 properties: snooze_secs: description: Schedule the next job after the sum of snooze time and interval from now. format: int64 type: integer required: - snooze_secs title: JobScheduleSnoozeSpec type: object PaginationResp: description: Pagination information in page API responses. properties: has_next: description: There are more next records if true. type: boolean has_prev: description: There are more previous records if true. type: boolean total_count: description: Total number of records. format: int32 type: integer title: PaginationResp type: object JobScheduleSpec: description: Spec of a job schedule that is a part of JobSchedule. example: job_config: classname: classname config: key: '{}' name: name schedule_config: interval_secs: 0 disabled: true type: FIXED_DELAY snooze_until: 2024-07-25 13:07:18+00:00 properties: name: description: Job schedule name readOnly: true type: string job_config: $ref: '#/components/schemas/JobConfigSpec' schedule_config: $ref: '#/components/schemas/JobScheduleConfigSpec' required: - job_config - name - schedule_config title: JobScheduleSpec type: object JobSchedulePagedQuerySpec: allOf: - $ref: '#/components/schemas/PaginationSpec' - description: 'JobSchedulePagedQuerySpec Paged API query params for job schedule. ' properties: filter: $ref: '#/components/schemas/JobScheduleApiFilter' sort_by: description: Sort fields of the records. enum: - uuid - name - enabled - state - type - nextStartTime - createdAt - updatedAt type: string title: JobSchedulePagedQuerySpec type: object example: null example: filter: enabled_only: true next_start_window_secs: 1 config_class: config_class name_regex: name_regex type: FIXED_DELAY offset: 0 limit: 6 sort_by: uuid direction: ASC type: object requestBodies: JobScheduleSnoozeReq: content: application/json: schema: $ref: '#/components/schemas/JobScheduleSnoozeSpec' required: true JobScheduleUpdateReq: content: application/json: schema: $ref: '#/components/schemas/JobScheduleUpdateSpec' required: true JobSchedulePagedReq: content: application/json: schema: $ref: '#/components/schemas/JobSchedulePagedQuerySpec' required: true JobInstancePagedReq: content: application/json: schema: $ref: '#/components/schemas/JobInstancePagedQuerySpec' required: true securitySchemes: apiKeyAuth: in: header name: X-AUTH-YW-API-TOKEN type: apiKey