From fed709e20da864cb4d02766373ee2139a34b5cec Mon Sep 17 00:00:00 2001 From: Jack Chen Date: Mon, 22 Jul 2024 11:23:46 +0800 Subject: [PATCH] docs: Create OpenAPI docs for the new support-cron-scheduler service closes: #4830 Signed-off-by: Jack Chen --- openapi/v3/support-cron-scheduler.yaml | 1216 ++++++++++++++++++++++++ 1 file changed, 1216 insertions(+) create mode 100644 openapi/v3/support-cron-scheduler.yaml diff --git a/openapi/v3/support-cron-scheduler.yaml b/openapi/v3/support-cron-scheduler.yaml new file mode 100644 index 0000000000..8af486402d --- /dev/null +++ b/openapi/v3/support-cron-scheduler.yaml @@ -0,0 +1,1216 @@ +openapi: 3.1.0 +info: + title: Edgex Foundry - Support Cron Scheduler API + description: This is the definition of the API for the Support Cron Scheduler service in the EdgeX Foundry IOT microservice platform. Support Cron Scheduler provides functionality for scheduling different actions in the EdgeX Foundry platform. + version: 3.2.0 + +servers: + - url: http://localhost:59863/api/v3 + description: URL for local development and testing + +components: + schemas: + AddScheduleJobRequest: + allOf: + - $ref: '#/components/schemas/BaseRequest' + type: object + properties: + scheduleJob: + $ref: '#/components/schemas/ScheduleJob' + required: + - scheduleJob + AddScheduleJobResponse: + allOf: + - $ref: '#/components/schemas/BaseResponse' + type: object + properties: + id: + type: string + format: uuid + BaseRequest: + description: "Defines basic properties which all use-case specific request DTO instances should support." + type: object + properties: + requestId: + description: "Uniquely identifies this request. For implementation, recommend this value be generated by the type's constructor." + type: string + format: uuid + example: "e6e8a2f4-eb14-4649-9e2b-175247911369" + apiVersion: + description: "A version number shows the API version in DTOs." + type: string + example: v3 + required: + - apiVersion + BaseResponse: + description: "Defines basic properties which all use-case specific response DTO instances should support" + type: object + properties: + apiVersion: + description: "A version number shows the API version in DTOs." + type: string + requestId: + description: "Uniquely identifies the request that resulted in this response." + type: string + format: uuid + example: "e6e8a2f4-eb14-4649-9e2b-175247911369" + statusCode: + description: "A numeric code signifying the operational status of the response." + type: integer + BaseWithTotalCountResponse: + allOf: + - $ref: '#/components/schemas/BaseResponse' + description: "Defines basic properties which all use-case specific response DTO instances should support" + type: object + properties: + totalCount: + description: "The total count of all multi instances." + type: integer + ConfigResponse: + description: "An object containing the service's configuration. Please refer the configuration documentation of each service for more details at [EdgeX Foundry Documentation](https://docs.edgexfoundry.org)." + type: object + properties: + apiVersion: + description: "A version number shows the API version in DTOs." + type: string + example: v3 + serviceName: + description: "Outputs the name of the service the response is from" + type: string + example: "support-scheduler" + config: + description: "A string-ified representation of the service's configuration. For purposes of this specification, a string has been used since configuration structure differs from service to service." + type: object + CronScheduleDef: + description: "Defines the cron schedule definition of the schedule job." + allOf: + - $ref: '#/components/schemas/ScheduleDef' + - type: object + properties: + crontab: + description: "The cron expression of the schedule job, including timezone." + type: string + example: "CRON_TZ=Asia/Taipei 0 6 * * ?" + required: + - crontab + DeviceControlAction: + description: "Defines device control action to be executed." + allOf: + - $ref: '#/components/schemas/ScheduleAction' + - type: object + properties: + deviceName: + description: "The name of the device to be controlled." + type: string + sourceName: + description: "The name of the device resource to be controlled." + type: string + required: + - deviceName + - sourceName + ErrorResponse: + allOf: + - $ref: '#/components/schemas/BaseResponse' + description: "A response type for returning a generic error to the caller." + type: object + properties: + message: + description: "A field that can contain a free-form message, such as an error message." + type: string + IntervalScheduleDef: + description: "Defines the interval schedule definition of the schedule job." + allOf: + - $ref: '#/components/schemas/ScheduleDef' + - type: object + properties: + interval: + description: "Defines the interval at which some schedule jobs should occur." + type: string + example: "10m" + required: + - interval + EdgeXMessageBusAction: + description: "Defines EdgeX message bus action to be executed." + allOf: + - $ref: '#/components/schemas/ScheduleAction' + - type: object + properties: + topic: + description: "The topic to which the message will be published." + type: string + required: + - topic + MultiScheduleActionRecordsResponse: + allOf: + - $ref: '#/components/schemas/BaseWithTotalCountResponse' + type: object + properties: + scheduleActionRecords: + type: array + items: + $ref: '#/components/schemas/ScheduleActionRecord' + MultiScheduleJobsResponse: + allOf: + - $ref: '#/components/schemas/BaseWithTotalCountResponse' + type: object + properties: + scheduleJobs: + type: array + items: + $ref: '#/components/schemas/ScheduleJob' + PingResponse: + type: object + properties: + apiVersion: + description: "A version number shows the API version in DTOs." + type: string + example: v3 + timestamp: + description: "Outputs the current server timestamp in RFC1123 format" + example: "Mon, 02 Jan 2006 15:04:05 MST" + type: string + serviceName: + description: "Outputs the name of the service the response is from" + type: string + RESTAction: + description: "Defines the REST action to be executed." + allOf: + - $ref: '#/components/schemas/ScheduleAction' + - type: object + properties: + address: + description: "The address of the REST endpoint to be called." + type: string + injectEdgeXAuth: + description: "Indicates whether to inject EdgeX authentication headers into the request." + type: boolean + required: + - address + ScheduleAction: + description: "Defines the action to be executed." + type: object + properties: + type: + type: string + enum: + - EDGEXMESSAGEBUS + - REST + - DEVICECONTROL + contentType: + type: string + payload: + type: string + format: byte + required: + - type + ScheduleActionRecord: + description: "Defines the transactional record of an action." + type: object + properties: + action: + description: "The action to be executed." + $ref: '#/components/schemas/ScheduleAction' + created: + description: "A timestamp indicating when the schedule action record was created." + type: integer + id: + description: "Uniquely identifies the schedule action record" + type: string + format: uuid + jobName: + description: "The name of the job to which the action is associated." + type: string + scheduledAt: + description: "A timestamp indicating when the action was scheduled." + type: integer + status: + type: string + description: "The status of the action" + enum: + - SUCCEEDED + - FAILED + - MISSED + required: + - action + - jobName + - status + ScheduleDef: + description: "Defines the schedule definition of the schedule job." + type: object + properties: + type: + type: string + enum: + - CRON + - INTERVAL + required: + - type + ScheduleJob: + description: "Defines the job to be scheduled." + type: object + properties: + actions: + type: array + items: + $ref: '#/components/schemas/ScheduleAction' + adminState: + type: string + description: "Admin state" + enum: + - LOCKED + - UNLOCKED + created: + description: "A timestamp indicating when the schedule job was created." + type: integer + definition: + description: "The schedule definition of the schedule job" + $ref: '#/components/schemas/ScheduleDef' + id: + description: "ID uniquely identifies the schedule job." + type: string + format: uuid + labels: + type: array + description: "Labels used to search for groups of schedule jobs." + items: + type: string + modified: + description: "A timestamp indicating when the schedule job was last modified." + type: integer + name: + description: "Non-database identifier for a schedule job (*must be unique)" + type: string + example: "test schedule job" + properties: + type: object + description: "Properties used to configure the schedule job with extra information." + required: + - actions + - adminState + - definition + - name + ScheduleActionRecordResponse: + allOf: + - $ref: '#/components/schemas/BaseResponse' + type: object + properties: + scheduleActionRecord: + $ref: '#/components/schemas/ScheduleActionRecord' + ScheduleJobResponse: + allOf: + - $ref: '#/components/schemas/BaseResponse' + type: object + properties: + scheduleJob: + $ref: '#/components/schemas/ScheduleJob' + SecretDataKeyValue: + description: Defines a key/value pair of secret data + type: object + properties: + key: + description: The key to identify the secret data + type: string + example: "secret-key" + value: + description: The value of the secret data + type: string + example: "secret-value" + required: + - key + - value + SecretRequest: + allOf: + - $ref: '#/components/schemas/BaseRequest' + description: Defines the secret data to be stored + type: object + properties: + secretName: + description: Specifies the name of the secret + type: string + example: "credentials" + secretData: + description: A list of the key/value pairs of secret data to store + type: array + items: + $ref: '#/components/schemas/SecretDataKeyValue' + required: + - secretName + - secretData + UpdateScheduleJob: + description: "Defines the job to be scheduled." + type: object + properties: + actions: + type: array + items: + $ref: '#/components/schemas/ScheduleAction' + adminState: + type: string + description: "Admin state" + enum: + - LOCKED + - UNLOCKED + definition: + description: "The schedule definition of the schedule job" + $ref: '#/components/schemas/ScheduleDef' + id: + description: "Uniquely identifies the schedule job, either id or name should be specified." + type: string + format: uuid + labels: + type: array + description: "Labels used to search for groups of schedule jobs." + items: + type: string + name: + description: "Non-database identifier for a schedule job (*must be unique), either id or name should be specified." + type: string + properties: + type: object + description: "Properties used to configure the schedule job with extra information." + required: + - id + - name + UpdateScheduleJobRequest: + allOf: + - $ref: '#/components/schemas/BaseRequest' + type: object + properties: + scheduleJob: + $ref: '#/components/schemas/UpdateScheduleJob' + required: + - scheduleJob + UpdateScheduleJobResponse: + allOf: + - $ref: '#/components/schemas/BaseRequest' + type: object + properties: + id: + type: string + format: uuid + VersionResponse: + description: "A response returned from the /version endpoint whose purpose is to report out the latest version supported by the service." + type: object + properties: + apiVersion: + description: "A version number shows the API version in DTOs." + type: string + example: v3 + version: + description: "The latest version supported by the service." + type: string + serviceName: + description: "Outputs the name of the service the response is from" + type: string + parameters: + correlatedRequestHeader: + in: header + name: X-Correlation-ID + description: "A unique identifier correlating a request to its associated response, facilitating tracing through being included on requests originating from the initiating request." + schema: + type: string + format: uuid + example: "14a42ea6-c394-41c3-8bcd-a29b9f5e6835" + endParam: + in: query + name: end + required: false + schema: + type: integer + description: "The creation timestamp of the last item in the result set." + limitParam: + in: query + name: limit + required: false + schema: + type: integer + minimum: -1 + default: 20 + description: "The numbers of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service." + offsetParam: + in: query + name: offset + required: false + schema: + type: integer + minimum: 0 + default: 0 + description: "The number of items to skip before starting to collect the result set." + startParam: + in: query + name: start + required: false + schema: + type: integer + minimum: 0 + default: 0 + description: "The creation timestamp of the first item in the result set." + headers: + correlatedResponseHeader: + description: "A response header that returns the unique correlation ID used to initiate the request." + schema: + type: string + format: uuid + example: "14a42ea6-c394-41c3-8bcd-a29b9f5e6835" + examples: + 202Example: + value: + apiVersion: "v3" + statusCode: 202 + 400Example: + value: + apiVersion: "v3" + statusCode: 400 + message: "Bad Request" + 404Example: + value: + apiVersion: "v3" + statusCode: 404 + message: "Not Found" + 500Example: + value: + apiVersion: "v3" + statusCode: 500 + message: "Internal Server Error" + AddCronScheduleJobExample: + value: + scheduleJob: + name: "test_job_1" + definition: + type: "CRON" + crontab: "CRON_TZ=Asia/Taipei 0 0 1 1 *" + actions: + - type: "REST" + contentType: "application/json" + address: "http://localhost:59881/api/v3/ping" + adminState: "UNLOCKED" + AddIntervalScheduleJobExample: + value: + scheduleJob: + name: "test_job_1" + definition: + type: "INTERVAL" + crontab: "10m" + action: + type: "EDGEXMESSAGEBUS" + contentType: "application/json" + topic: "test_topic" + payload: "eyJ0ZXN0I" + adminState: "UNLOCKED" + MultiScheduleActionRecordsExample: + value: + apiVersion: "v3" + statusCode: 200 + totalCount: 2 + scheduleActionRecords: + - created: 1634279367311 + scheduledAt: 1634279367311 + id: "debade10-7838-44bd-9c09-1283813db6c8" + jobName: "test_job_1" + status: "SUCCEEDED" + action: + type: "REST" + contentType: "application/json" + address: "http://localhost:59881/api/v3/ping" + - created: 1634279236873 + scheduledAt: 1634279236873 + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + jobName: "test_job_1" + status: "FAILED" + action: + type: "EDGEXMESSAGEBUS" + contentType: "application/json" + topic: "test_topic" + payload: "eyJ0ZXN0I" + MultiLatestScheduleActionRecordsExample: + value: + apiVersion: "v3" + statusCode: 200 + totalCount: 3 + scheduleActionRecords: + - created: 1634279367311 + scheduledAt: 1634279367311 + id: "debade10-7838-44bd-9c09-1283813db6c8" + jobName: "test_job_1" + status: "SUCCEEDED" + action: + type: "REST" + contentType: "application/json" + address: "http://localhost:59881/api/v3/ping" + - created: 1634279367311 + scheduledAt: 1634279367311 + id: "abcd10-7838-44bd-9c09-1283813db6c8" + jobName: "test_job_1" + status: "SUCCEEDED" + action: + type: "EDGEXMESSAGEBUS" + contentType: "application/json" + topic: "test_topic" + payload: "eyJ0ZXN0I" + - created: 1634279236873 + scheduledAt: 1634279236873 + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + jobName: "test_job_2" + status: "FAILED" + action: + type: "EDGEXMESSAGEBUS" + contentType: "application/json" + topic: "test_topic" + payload: "eyJ0ZXN0I" + MultiScheduleJobsExample: + value: + apiVersion: "v3" + statusCode: 200 + totalCount: 2 + scheduleJobs: + - created: 1634279367311 + modified: 1634279367311 + id: "debade10-7838-44bd-9c09-1283813db6c8" + name: "test_job_1" + definition: + type: "CRON" + crontab: "CRON_TZ=Asia/Taipei 0 0 1 1 *" + actions: + - type: "REST" + contentType: "application/json" + address: "http://localhost:59881/api/v3/ping" + adminState: "UNLOCKED" + - created: 1634280525302 + modified: 1634280525302 + id: "7b9c6908-0929-498d-9f81-c25abdedd93f" + name: "test_job_2" + definition: + type: "INTERVAL" + interval: "1000ms" + actions: + - type: "EDGEXMESSAGEBUS" + contentType: "application/json" + topic: "test_topic" + payload: "eyJ0ZXN0I" + adminState: "UNLOCKED" + UpdateCronScheduleJobExample: + value: + scheduleJob: + name: "test_job_1" + definition: + type: "CRON" + crontab: "CRON_TZ=UTC 0 0 2 2 *" + actions: + - type: "REST" + contentType: "application/json" + address: "http://localhost:59881/api/v3/ping" + adminState: "UNLOCKED" +paths: + /job: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + post: + summary: "Add one or more new ScheduleJobs - name on each request must be unique." + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AddScheduleJobRequest' + examples: + AddCronScheduleJobExample: + $ref: '#/components/examples/AddCronScheduleJobExample' + AddIntervalScheduleJobExample: + $ref: '#/components/examples/AddIntervalScheduleJobExample' + responses: + '207': + description: "Indicates a multi-part response supportive of accepting multiple requests at once. The 'statusCode' property of each response in the returned array will indicate success or failure." + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + anyOf: + - $ref: '#/components/schemas/ErrorResponse' + - $ref: '#/components/schemas/AddScheduleJobResponse' + '400': + description: "Request is in an invalid state" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400Example: + $ref: '#/components/examples/400Example' + '500': + description: An unexpected error occurred on the server + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + patch: + summary: "Update one or more existing ScheduleJobs" + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UpdateScheduleJobRequest' + examples: + UpdateCronScheduleJobExample: + $ref: '#/components/examples/UpdateCronScheduleJobExample' + responses: + '207': + description: "Indicates a multi-part response supportive of accepting multiple requests at once. The 'statusCode' property of each response in the returned array will indicate success or failure." + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + anyOf: + - $ref: '#/components/schemas/ErrorResponse' + - $ref: '#/components/schemas/UpdateScheduleJobResponse' + '400': + description: "Request is in an invalid state" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400Example: + $ref: '#/components/examples/400Example' + '500': + description: An unexpected error occurred on the server + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /job/all: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/startParam' + - $ref: '#/components/parameters/endParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + get: + summary: "Given the entire range based on the start and end parameters of schedule jobs sorted by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleJobsResponse' + examples: + MultiScheduleJobsExample: + $ref: '#/components/examples/MultiScheduleJobsExample' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /job/name/{name}: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - name: name + in: path + required: true + schema: + type: string + description: "The unique name of a schedule job" + get: + summary: "Returns a schedule job according to the specified name" + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ScheduleJobResponse' + '404': + description: "The requested resource does not exist" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 404Example: + $ref: '#/components/examples/404Example' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + delete: + summary: "Deletes a schedule job according to the specified name. Associated actions will also be stopped and deleted." + responses: + '200': + description: "Delete successful" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + '404': + description: "The requested resource does not exist" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 404Example: + $ref: '#/components/examples/404Example' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /job/trigger/name/{name}: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - name: name + in: path + required: true + schema: + type: string + description: "The unique name of a schedule job" + post: + summary: "Manually trigger a schedule job by name" + responses: + '202': + description: "Trigger request accepted" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/BaseResponse' + examples: + 202Example: + $ref: '#/components/examples/202Example' + '404': + description: "The requested job name does not exist" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 404Example: + $ref: '#/components/examples/404Example' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /scheduleactionrecord/all: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/startParam' + - $ref: '#/components/parameters/endParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + get: + summary: "Given the entire range based on the start and end parameters of schedule action records sorted by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleActionRecordsResponse' + examples: + MultiScheduleActionRecordsExample: + $ref: '#/components/examples/MultiScheduleActionRecordsExample' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /scheduleactionrecord/latest: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + get: + summary: "Given the entire range of the latest schedule action records by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleActionRecordsResponse' + examples: + MultiLatestScheduleActionRecordsExample: + $ref: '#/components/examples/MultiLatestScheduleActionRecordsExample' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /scheduleactionrecord/status/{status}: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/startParam' + - $ref: '#/components/parameters/endParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + - name: status + in: path + required: true + schema: + type: string + description: "The status of a schedule action record" + get: + summary: "Given the entire range based on the start and end parameters of schedule action records with target status sorted by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleActionRecordsResponse' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /scheduleactionrecord/job/name/{name}: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/startParam' + - $ref: '#/components/parameters/endParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + - name: name + in: path + required: true + schema: + type: string + description: "The name of the job to which the action is associated." + get: + summary: "Given the entire range based on the start and end parameters of schedule action records with target job name sorted by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleActionRecordsResponse' + '404': + description: "The requested resource does not exist" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 404Example: + $ref: '#/components/examples/404Example' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /scheduleactionrecord/job/name/{name}/status/{status}: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + - $ref: '#/components/parameters/startParam' + - $ref: '#/components/parameters/endParam' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + - name: name + in: path + required: true + schema: + type: string + description: "The name of the job to which the action is associated." + - name: status + in: path + required: true + schema: + type: string + description: "The status of a schedule action record" + get: + summary: "Given the entire range based on the start and end parameters of schedule action records with target job name and status sorted by last created descending, returns a portion of that range according to the offset and limit parameters." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/MultiScheduleActionRecordsResponse' + '404': + description: "The requested resource does not exist" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 404Example: + $ref: '#/components/examples/404Example' + '500': + description: "An unexpected error occurred on the server" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /config: + get: + summary: "Returns the current configuration of the service." + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigResponse' + '500': + description: "Internal Server Error" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /ping: + get: + summary: "A simple 'ping' endpoint that can be used as a service healthcheck" + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/PingResponse' + example: + apiVersion: "v3" + timestamp: "Mon, 02 Jan 2006 15:04:05 MST" + serviceName: "support-cron-scheduler" + '500': + description: "Internal Server Error" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /version: + get: + summary: "A simple 'version' endpoint that will return the current version of the service" + responses: + '200': + description: "OK" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/VersionResponse' + example: + apiVersion: "v3" + version: 3.2.0 + serviceName: "support-cron-scheduler" + '500': + description: "Internal Server Error" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example' + /secret: + parameters: + - $ref: '#/components/parameters/correlatedRequestHeader' + post: + summary: Adds EdgeX Service exclusive secret to the Secret Store + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/SecretRequest' + required: true + responses: + '201': + description: "Created" + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/BaseResponse' + example: + apiVersion: "v3" + statusCode: 201 + '400': + description: "Invalid request." + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400Example: + $ref: '#/components/examples/400Example' + '500': + description: "An unexpected error happened on the server." + headers: + X-Correlation-ID: + $ref: '#/components/headers/correlatedResponseHeader' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 500Example: + $ref: '#/components/examples/500Example'