{ "openapi": "3.0.0", "info": { "version": "1.1.3-SNAPSHOT", "title": "Cronman API" }, "tags": [ { "name": "job-notification-methods" }, { "name": "job-statuses" }, { "name": "jobs" }, { "name": "ping" }, { "name": "tenanted" }, { "name": "tenants" }, { "name": "timezones" }, { "name": "util" } ], "paths": { "/job-notification-methods": { "get": { "tags": [ "util" ], "summary": "Get supported notification methods.", "description": "Return a list of valid notification methods for this service.", "operationId": "getNotificationMethods", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/job-statuses": { "get": { "tags": [ "util" ], "summary": "List status codes for a job", "description": "List the status code values a Job might have.", "operationId": "getStatuses", "responses": { "200": { "description": "JSON array of response strings", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string", "enum": [ "CREATED", "SCHEDULED", "COMPLETED", "DELETED", "SUSPENDED", "UNKNOWN" ] } } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/jobs": { "get": { "tags": [ "jobs" ], "summary": "Get jobs modified since a specific timestamp", "description": "", "operationId": "getJobsUpdates", "parameters": [ { "name": "maxResults", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 5000 } }, { "name": "sinceTime", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "default": 0 } }, { "name": "nextToken", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiIterable" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } }, "x-experimental": "true" } }, "/jobs/runs": { "get": { "tags": [ "jobs" ], "summary": "Get ScheduledJobs that were triggered on or after a specific timestamp. Timestamp cannot be older than 3 days.", "description": "", "operationId": "getJobRuns", "parameters": [ { "name": "maxResults", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 5000 } }, { "name": "sinceTime", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "nextToken", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiIterable" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } }, "x-experimental": "true" } }, "/jobs/{jobId}": { "get": { "tags": [ "jobs" ], "summary": "Get jobs by jobID", "description": "", "operationId": "getJob", "parameters": [ { "name": "jobId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "404": { "description": "The given job ID is not found." }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } }, "x-experimental": "true" } }, "/ping": { "get": { "tags": [ "util" ], "summary": "Get basic liveness.", "description": "Used by remotes to check for service in their healthchecks", "operationId": "healthcheck", "responses": { "200": { "description": "a number" }, "500": { "description": "Server error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants": { "get": { "tags": [ "tenanted" ], "summary": "List all tenants", "description": "Return all the tenant ids. The list is not limited and could be large.", "operationId": "getTenants", "responses": { "200": { "description": "JSON array of tenant id strings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Tenants" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets": { "get": { "tags": [ "tenanted" ], "summary": "List all buckets for a given tenant", "description": "For the tenant id, return a list of all of the bucket names. A bucket is a grouping of jobs. This call returns a JSON Object containing the JSON Array response of strings. The list returned in the TenantBuckets object is unbounded and could be large.", "operationId": "getTenantBuckets", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "JSON Object containing the JSON array of response strings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TenantBuckets" } } } }, "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "delete": { "tags": [ "tenanted" ], "summary": "Delete all Jobs for tenantId", "description": "Delete all jobs for a given tenant id, bucket id", "operationId": "deleteTenant", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs": { "get": { "tags": [ "tenanted" ], "summary": "List all jobs for a bucket and tenant combination", "description": "Return all the jobs for the named bucket ID and tenant ID. A JSON Object containing a JSON array of job definitions is returned. List is unbounded, could be large, should stream the result.", "operationId": "getTenantBucketJobs", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "JSON Object containing a JSON array of job definitions in the bucket and tenant", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobWithRuntimes" } } } }, "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "post": { "tags": [ "tenanted" ], "summary": "Create new Job", "description": "Create a new job tagged with provided bucket_id in the given tenant namespace. If the request is successful,the created Job will be returned as the result. Job ID is in [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format and should be used to uniquely identify a Job in Cronman. External ID is optional, but if provided must be unique within the tenant. The Location Header will also be set to provide a full URI to the location of the created Job.", "operationId": "createTenantBucketJob", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "caller defined id to group jobs together", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/NewJobPayload" }, "responses": { "201": { "description": "Returns a view of the created job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "delete": { "tags": [ "tenanted" ], "summary": "Delete all jobs for tenantId, bucketId", "description": "Delete all jobs for a given tenant id and bucket id", "operationId": "deleteTenantBucketJobs", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Jobs deleted, no content returned" }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/enabled": { "put": { "tags": [ "tenanted" ], "summary": "Set Job enabled state for all Jobs for the given {tenantId},{bucketId}", "description": "Returns the number of jobs affected.", "operationId": "setTenantBucketJobsEnabled", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "caller defined id to group jobs together", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/JobEnabledStatus" }, "responses": { "200": { "description": "JSON encoded job definition", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobsModified" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/external-id/{externalId}": { "put": { "tags": [ "tenanted" ], "summary": "Create or update Job", "description": "Create or update a job by external id, tagged with provided bucket_id in the given tenant namespace. If the request is successful,the created or updated Job will be returned as the result. Job ID is in [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format and can be used to uniquely identify a Job in Cronman. The Location Header will be set to provide a full URI to the location of the created or updated Job.", "operationId": "createOrUpdateTenantBucketJobByExternalId", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "caller defined id to group jobs together", "required": true, "schema": { "type": "string" } }, { "name": "externalId", "in": "path", "description": "External Id for which the job should update or create", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/NewJobPayload" }, "responses": { "200": { "description": "Returns a view of the updated job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "201": { "description": "Returns a view of the created job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "400": { "description": "Malformed or incorrect request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/{jobId}": { "get": { "tags": [ "tenanted" ], "summary": "Get job definition details", "description": "Return the job definition in JSON encoded form for the given job's tenant id, bucket id and job id. Job id is a UUID string.", "operationId": "getTenantBucketJob", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "job id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "JSON encoded job definition", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobWithRuntime" } } } }, "400": { "description": "job id invalid format (must be uuid)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given jobId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "put": { "tags": [ "tenanted" ], "summary": "Update Job", "description": "Update a job by job id, tagged with provided bucket_id in the given tenant namespace. If the request is successful then the updated Job will be returned as the result. Job ID is in [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format and can be used to uniquely identify a Job in Cronman. The Location Header will be set to provide a full URI to the location of the updated Job.", "operationId": "updateTenantBucketJobByJobId", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "caller defined id to group jobs together", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "Job Id for which the job should update", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "$ref": "#/components/requestBodies/NewJobPayload" }, "responses": { "200": { "description": "Returns a view of the updated job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" } } } }, "404": { "description": "Could not update job since jobId does not exist or was deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "delete": { "tags": [ "tenanted" ], "summary": "Delete single Job", "description": "Delete job for a given tenant id, bucket id and job id", "operationId": "deleteTenantBucketJob", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "job id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Job deleted, no content returned" }, "400": { "description": "job id invalid format (must be uuid)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given jobId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/{jobId}/enabled": { "put": { "tags": [ "tenanted" ], "summary": "Set Job enabled state for job given the {tenantId},{bucketId},{jobId}", "description": "Returns the number of jobs affected.", "operationId": "setJobIdEnabled", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "caller defined id to group jobs together", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "job id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "$ref": "#/components/requestBodies/JobEnabledStatus" }, "responses": { "200": { "description": "JSON encoded count of modified jobs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobsModified" } } } }, "400": { "description": "job id invalid format (must be uuid)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given jobId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/{jobId}/runs": { "get": { "tags": [ "tenanted" ], "summary": "Get latest N executions of a job", "description": "For the latest day, retrieve the last executions of a job and return the results.", "operationId": "getTenantBucketJobRuns", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "job id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "size", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 5 } } ], "responses": { "200": { "description": "JSON Object containing the JSON array representing the job runs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobRuns" } } } }, "400": { "description": "job id invalid format (must be uuid)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given jobId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/buckets/{bucketId}/jobs/{jobId}/status": { "get": { "tags": [ "tenanted" ], "summary": "Get status for a given job", "description": "Locate the job and return the job definition's status", "operationId": "getTenantBucketJobStatus", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "bucketId", "in": "path", "description": "bucket id", "required": true, "schema": { "type": "string" } }, { "name": "jobId", "in": "path", "description": "job id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "String representing the job status", "content": { "application/json": { "schema": { "type": "string", "enum": [ "CREATED", "SCHEDULED", "COMPLETED", "DELETED", "SUSPENDED", "UNKNOWN" ] } } } }, "400": { "description": "job id invalid format (must be uuid)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given jobId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/jobs/enabled": { "put": { "tags": [ "tenanted" ], "summary": "Set Job enabled state for all Jobs for the given {tenantId}", "description": "Returns the number of jobs affected.", "operationId": "setTenantJobsEnabled", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/JobEnabledStatus" }, "responses": { "200": { "description": "JSON encoded count of modified jobs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobsModified" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/jobs/external-id/{externalId}": { "get": { "tags": [ "tenanted" ], "summary": "Get Job details using the tenant id and external id key", "description": "Return the job definition in JSON encoded form for the given tenant id and external id.", "operationId": "getTenantJobByExternalId", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "externalId", "in": "path", "description": "external id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "JSON encoded job definition", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobWithRuntime" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given externalId and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } }, "delete": { "tags": [ "tenanted" ], "summary": "Delete single Job", "description": "Delete job for a given tenant id, bucket id and external job id", "operationId": "deleteJobByExternalId", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "externalId", "in": "path", "description": "external id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Job deleted, no content returned" }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given externalId, bucketId, and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/tenants/{tenantId}/jobs/external-id/{externalId}/runs": { "get": { "tags": [ "tenanted" ], "summary": "Get latest N executions of a job", "description": "For the latest day, retrieve the last executions of a job and return the results.", "operationId": "getJobRunsByExternalId", "parameters": [ { "name": "tenantId", "in": "path", "description": "tenant id", "required": true, "schema": { "type": "string" } }, { "name": "externalId", "in": "path", "description": "external id", "required": true, "schema": { "type": "string" } }, { "name": "size", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "default": 5 } } ], "responses": { "200": { "description": "JSON Object containing the JSON array representing the job runs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobRuns" } } } }, "401": { "description": "request not authorized for the specified tenant id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "404": { "description": "could not find job with given externalId and tenantId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } }, "/timezones": { "get": { "tags": [ "util" ], "summary": "Get supported timezone identifiers.", "description": "Return all the literals representing the supported timezones for the scheduler.", "operationId": "getTimezones", "responses": { "200": { "description": "List of string timezones.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorMessage" } } } } } } } }, "servers": [ { "url": "http://cronman-service.prod.atl-paas.net/" }, { "url": "https://cronman-service.prod.atl-paas.net/" } ], "components": { "requestBodies": { "NewJobPayload": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewJobPayload" } } }, "description": "new job payload", "required": true }, "JobEnabledStatus": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEnabledStatus" } } }, "description": "enabled status", "required": true } }, "schemas": { "ApiIterable": { "type": "object", "properties": { "objects": { "type": "array", "description": "list of objects for this \"page\"", "readOnly": true, "items": { "type": "object" } }, "nextToken": { "type": "string", "description": "Token to use to retrieve the next page of objects; if empty or null there are no more pages to retrieve", "readOnly": true } } }, "ErrorMessage": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32", "readOnly": true }, "message": { "type": "string", "readOnly": true }, "details": { "type": "string", "readOnly": true } } }, "Job": { "type": "object", "required": [ "bucketId", "id", "name", "notificationMethod", "notificationUrl", "type" ], "properties": { "name": { "type": "string", "description": "Name of the job, human readable, not functional" }, "id": { "type": "string", "format": "uuid", "description": "UUID string representing the unique job identifier" }, "type": { "type": "string", "description": "The type of this field determines if the job recurs with CRON, Interval (with delay between runs) or Single-run semantics.", "enum": [ "single", "cron", "interval" ] }, "enabled": { "type": "boolean", "description": "Enabled state, enabled == true indicates the job is to be run, enabled == false indicates job does not run.", "default": false }, "status": { "type": "string", "description": "The job status - whether the job is scheduled, created or deleted.", "enum": [ "created", "scheduled", "completed", "deleted", "suspended" ] }, "timezone": { "type": "string", "description": "Timezone is in tz database (https://en.wikipedia.org/wiki/Tz_database) format, not ISO-8601" }, "startTime": { "type": "string", "description": "Time when the job should start running. Two formats are supported: 1. (https://en.wikipedia.org/wiki/Unix_time) epoch time number of milliseconds since 1970/01/01.2. ISO-8601 (https://en.wikipedia.org/wiki/ISO_8601) format string identifying the start time of the jobs" }, "expression": { "type": "string", "description": "Expression describing recurrence as Cron Expression (https://en.wikipedia.org/wiki/Cron#CRON_expression) or ISO 8601 Duration (https://en.wikipedia.org/wiki/ISO_8601#Durations) if Interval type. Cron expression is parsed and interpreted by the Atlassian Caesium library (Caesium variant of Cron expression)Interval expression is parsed and interpreted as a Java Duration formation string." }, "externalId": { "type": "string", "description": "External identifier which has an enforced constraint of uniqueness per-tenant id. Specifying this identifier allows for idempotent job creation - recreates with the same external id will fail." }, "tenantId": { "type": "string", "description": "The tenant id of the job. If ASAP is turned on access is only allowed with valid auth token." }, "bucketId": { "type": "string", "description": "The bucket id of the job. Buckets are a job grouping mechanism." }, "payload": { "type": "string", "description": "A UTF-8 string which is sent in the body of the job execution notification. For SQS, this string must comply with the restrictions of the AWS SQS body character set." }, "notificationUrl": { "type": "string", "description": "The URL of the notification destination, an HTTP endpoint for notificationMethod http/https or a SQS queue location." }, "notificationMethod": { "type": "string", "description": "The method of the notification. SQS method will put job execution notifications on an SQS queue identified by notificationUrl.", "enum": [ "sqs", "http_get", "http_post", "http_put", "http_delete", "none", "unknown" ] }, "createdTime": { "type": "string", "description": "Time when the job was created, ISO-8601 format" }, "modifiedTime": { "type": "string", "description": "Time when the job was updated, ISO-8601 format" } } }, "JobEnabledStatus": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "A boolean representing the enabled state of the job. An enabled == false state indicates the job is not to be run, an enabled == true state indicates the job is running. If unspecifiedit defaults to true", "default": false } }, "description": "Represents the enabled status of a Job." }, "JobRun": { "type": "object", "properties": { "status": { "type": "string", "description": "the status of the execution, consisting of 'SCHEDULED', 'COMPLETED', 'FAILED'" }, "jobId": { "type": "string", "format": "uuid", "description": "UUID string referencing the job identified." }, "scheduledTime": { "type": "string", "description": "ISO-8601 format date string for the scheduled execution time for this execution." }, "executionTime": { "type": "string", "description": "ISO-8601 format date string for the completed execution time for this execution." } }, "description": "Represents the job execution (scheduled and execution complete) times, including completion status." }, "JobRuns": { "type": "object", "properties": { "jobRuns": { "type": "array", "description": "The envelope containing the collection of jobs", "items": { "$ref": "#/components/schemas/JobRun" } } }, "description": "Represents list of JobRun's" }, "JobWithRuntime": { "type": "object", "required": [ "bucketId", "id", "name", "nextRunTime", "notificationMethod", "notificationUrl", "type" ], "properties": { "nextRunTime": { "type": "string", "description": "ISO-8601 (https://en.wikipedia.org/wiki/ISO_8601) format string for the next scheduled execution time for the job.." }, "name": { "type": "string", "description": "Name of the job, human readable, not functional" }, "id": { "type": "string", "format": "uuid", "description": "UUID string representing the unique job identifier" }, "type": { "type": "string", "description": "The type of this field determines if the job recurs with CRON, Interval (with delay between runs) or Single-run semantics.", "enum": [ "single", "cron", "interval" ] }, "enabled": { "type": "boolean", "description": "Enabled state, enabled == true indicates the job is to be run, enabled == false indicates job does not run.", "default": false }, "status": { "type": "string", "description": "The job status - whether the job is scheduled, created or deleted.", "enum": [ "created", "scheduled", "completed", "deleted", "suspended" ] }, "timezone": { "type": "string", "description": "Timezone is in tz database (https://en.wikipedia.org/wiki/Tz_database) format, not ISO-8601" }, "startTime": { "type": "string", "description": "Time when the job should start running. Two formats are supported: 1. (https://en.wikipedia.org/wiki/Unix_time) epoch time number of milliseconds since 1970/01/01.2. ISO-8601 (https://en.wikipedia.org/wiki/ISO_8601) format string identifying the start time of the jobs" }, "expression": { "type": "string", "description": "Expression describing recurrence as Cron Expression (https://en.wikipedia.org/wiki/Cron#CRON_expression) or ISO 8601 Duration (https://en.wikipedia.org/wiki/ISO_8601#Durations) if Interval type. Cron expression is parsed and interpreted by the Atlassian Caesium library (Caesium variant of Cron expression)Interval expression is parsed and interpreted as a Java Duration formation string." }, "externalId": { "type": "string", "description": "External identifier which has an enforced constraint of uniqueness per-tenant id. Specifying this identifier allows for idempotent job creation - recreates with the same external id will fail." }, "tenantId": { "type": "string", "description": "The tenant id of the job. If ASAP is turned on access is only allowed with valid auth token." }, "bucketId": { "type": "string", "description": "The bucket id of the job. Buckets are a job grouping mechanism." }, "payload": { "type": "string", "description": "A UTF-8 string which is sent in the body of the job execution notification. For SQS, this string must comply with the restrictions of the AWS SQS body character set." }, "notificationUrl": { "type": "string", "description": "The URL of the notification destination, an HTTP endpoint for notificationMethod http/https or a SQS queue location." }, "notificationMethod": { "type": "string", "description": "The method of the notification. SQS method will put job execution notifications on an SQS queue identified by notificationUrl.", "enum": [ "sqs", "http_get", "http_post", "http_put", "http_delete", "none", "unknown" ] }, "createdTime": { "type": "string", "description": "Time when the job was created, ISO-8601 format" }, "modifiedTime": { "type": "string", "description": "Time when the job was updated, ISO-8601 format" } }, "description": "Represents a job definition with its next execution time at the time it is retrieved." }, "JobWithRuntimes": { "type": "object", "properties": { "jobs": { "type": "array", "description": "The envelope containing the collection of jobs", "readOnly": true, "items": { "$ref": "#/components/schemas/JobWithRuntime" } } }, "description": "Represents details for a collection of jobs" }, "JobsModified": { "type": "object", "properties": { "count": { "type": "integer", "format": "int32" } }, "description": "Information about changed jobs." }, "NewJobPayload": { "type": "object", "required": [ "name", "notificationMethod", "notificationUrl", "type" ], "properties": { "externalId": { "type": "string", "description": "External identifier which has an enforced constraint of uniqueness per-tenant id. Specifying this identifier allows for idempotent job creation - recreates with the same external id will fail.", "readOnly": true }, "name": { "type": "string", "description": "Friendly name of the job, not used for anything functional.", "readOnly": true }, "type": { "type": "string", "description": "The type of this field determines if the job recurs with CRON, Interval (with delay between runs) or Single-run.", "readOnly": true, "enum": [ "SINGLE", "CRON", "INTERVAL", "UNKNOWN" ] }, "notificationUrl": { "type": "string", "description": "The URL of the notification destination, an HTTP endpoint for notificationMethod http* or a SQS queue location.", "readOnly": true }, "notificationMethod": { "type": "string", "description": "The method of the notification. SQS method will put job execution notifications on an SQS queue identified by notificationUrl.", "readOnly": true, "enum": [ "sqs", "http_get", "http_post", "http_put", "http_delete", "none" ] }, "expression": { "type": "string", "description": "Expression describing recurrence as Cron Expression (https://en.wikipedia.org/wiki/Cron#CRON_expression) or ISO 8601 Duration (https://en.wikipedia.org/wiki/ISO_8601#Durations) if Interval type. Cron expression is parsed and interpreted by the Atlassian Caesium library (Caesium variant of Cron expression)Interval expression is parsed and interpreted as a Java Duration formation string. Minimum supported frequency between scheduled job executions is 60 seconds.", "readOnly": true }, "timezone": { "type": "string", "description": "Timezone is in tz database (https://en.wikipedia.org/wiki/Tz_database) format, not ISO-8601", "readOnly": true }, "startTime": { "type": "integer", "format": "int64", "description": "Time when the job should start running. Two formats are supported (both only support UTC): 1. (https://en.wikipedia.org/wiki/Unix_time) epoch time number of milliseconds since 1970/01/01.2. ISO-8601 (https://en.wikipedia.org/wiki/ISO_8601) format string identifying the start time of the jobs", "readOnly": true }, "payload": { "type": "string", "description": "A UTF-8 string which is sent in the body of the job execution notification. The UTF-8 payload must not exceed 16KiB. For SQS, this string must not be empty and must comply with the restrictions of the AWS SQS body character set.", "readOnly": true }, "enabled": { "type": "boolean", "description": "A boolean representing the enabled state of the job. An enabled == false state indicates the job is not to be run, an enabled == true state indicates the job is running. If unspecifiedit defaults to true", "readOnly": true, "default": false } }, "description": "Represents a new job definition JSON body for job creation." }, "Tenant": { "type": "object", "properties": { "id": { "type": "string", "description": "String referencing the tenant identified." } } }, "TenantBucket": { "type": "object", "properties": { "tenantId": { "type": "string" }, "bucketId": { "type": "string" } } }, "TenantBuckets": { "type": "object", "properties": { "tenantBuckets": { "type": "array", "description": "The envelope containing the collection of tenant buckets", "items": { "$ref": "#/components/schemas/TenantBucket" } } }, "description": "Represents details for a collection of tenant buckets" }, "Tenants": { "type": "object", "properties": { "tenants": { "type": "array", "description": "The envelope containing the collection of tenants", "readOnly": true, "items": { "$ref": "#/components/schemas/Tenant" } } }, "description": "Represents details for a collection of tenants" } } } }