-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 19 KB
/
openapi.json
File metadata and controls
1 lines (1 loc) · 19 KB
1
{"components":{"schemas":{"BuildResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/BuildResponse.json"],"format":"uri","readOnly":true,"type":"string"},"created_at":{"description":"Creation timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string"},"failure_reason":{"description":"Failure reason","examples":[""],"type":"string"},"id":{"description":"Build ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"},"image_tag":{"description":"Built image tag","examples":["registry.example.com/wf:abc123"],"type":"string"},"status":{"description":"Build status","examples":["building"],"type":"string"},"updated_at":{"description":"Last update","examples":["2024-01-01T00:00:00Z"],"type":"string"},"workflow_id":{"description":"Workflow ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"}},"required":["id","workflow_id","status","image_tag","failure_reason","created_at","updated_at"],"type":"object"},"CreateScheduleInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/CreateScheduleInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"cron_expression":{"description":"Cron expression","maxLength":255,"minLength":1,"type":"string"},"timezone":{"description":"IANA timezone","maxLength":100,"type":"string"}},"required":["cron_expression","timezone"],"type":"object"},"CreateWorkflowInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/CreateWorkflowInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"command":{"description":"Command override","maxLength":1000,"type":"string"},"cpu_limit":{"description":"CPU limit","maxLength":20,"type":"string"},"description":{"description":"Workflow description","maxLength":1000,"type":"string"},"image":{"description":"Docker image","maxLength":500,"type":"string"},"memory_limit":{"description":"Memory limit","maxLength":20,"type":"string"},"name":{"description":"Workflow name","maxLength":255,"minLength":1,"type":"string"},"timeout_seconds":{"description":"Timeout in seconds","format":"int64","type":"integer"}},"required":["name","description"],"type":"object"},"ErrorDetail":{"additionalProperties":false,"properties":{"location":{"description":"Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'","type":"string"},"message":{"description":"Error message text","type":"string"},"value":{"description":"The value at the given location"}},"type":"object"},"ErrorModel":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/ErrorModel.json"],"format":"uri","readOnly":true,"type":"string"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","examples":["Property foo is required but is missing."],"type":"string"},"errors":{"description":"Optional list of individual error details","items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array","nullable":true},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","examples":["https://example.com/error-log/abc123"],"format":"uri","type":"string"},"status":{"description":"HTTP status code","examples":[400],"format":"int64","type":"integer"},"title":{"description":"A short, human-readable summary of the problem type. This value should not change between occurrences of the error.","examples":["Bad Request"],"type":"string"},"type":{"default":"about:blank","description":"A URI reference to human-readable documentation for the error.","examples":["https://example.com/errors/example"],"format":"uri","type":"string"}},"type":"object"},"RunResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/RunResponse.json"],"format":"uri","readOnly":true,"type":"string"},"created_at":{"description":"Creation timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string"},"exit_code":{"description":"Exit code","examples":[0],"format":"int32","type":"integer","nullable":true},"failure_reason":{"description":"Failure reason","examples":[""],"type":"string"},"finished_at":{"description":"Finish timestamp","examples":["2024-01-01T00:01:00Z"],"type":"string","nullable":true},"id":{"description":"Run ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"},"started_at":{"description":"Start timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string","nullable":true},"status":{"description":"Run status","examples":["running"],"type":"string"},"updated_at":{"description":"Last update","examples":["2024-01-01T00:00:00Z"],"type":"string"},"workflow_id":{"description":"Workflow ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"}},"required":["id","workflow_id","status","exit_code","failure_reason","started_at","finished_at","created_at","updated_at"],"type":"object"},"ScheduleResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/ScheduleResponse.json"],"format":"uri","readOnly":true,"type":"string"},"created_at":{"description":"Creation timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string"},"cron_expression":{"description":"Cron expression","examples":["0 9 * * 1-5"],"type":"string"},"enabled":{"description":"Whether enabled","examples":[true],"type":"boolean"},"id":{"description":"Schedule ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"},"timezone":{"description":"IANA timezone","examples":["Europe/Oslo"],"type":"string"},"updated_at":{"description":"Last update","examples":["2024-01-01T00:00:00Z"],"type":"string"},"workflow_id":{"description":"Workflow ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"}},"required":["id","workflow_id","cron_expression","timezone","enabled","created_at","updated_at"],"type":"object"},"UpdateScheduleInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/UpdateScheduleInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"cron_expression":{"description":"Cron expression","maxLength":255,"minLength":1,"type":"string"},"enabled":{"description":"Whether enabled","type":"boolean"},"timezone":{"description":"IANA timezone","maxLength":100,"type":"string"}},"required":["cron_expression","timezone","enabled"],"type":"object"},"UpdateWorkflowInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/UpdateWorkflowInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"command":{"description":"Command override","maxLength":1000,"type":"string"},"cpu_limit":{"description":"CPU limit","maxLength":20,"type":"string"},"description":{"description":"Workflow description","maxLength":1000,"type":"string"},"image":{"description":"Docker image","maxLength":500,"type":"string"},"memory_limit":{"description":"Memory limit","maxLength":20,"type":"string"},"name":{"description":"Workflow name","maxLength":255,"minLength":1,"type":"string"},"timeout_seconds":{"description":"Timeout in seconds","format":"int64","type":"integer"}},"required":["name","description"],"type":"object"},"WorkflowResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["https://example.com/schemas/WorkflowResponse.json"],"format":"uri","readOnly":true,"type":"string"},"command":{"description":"Command override","examples":[""],"type":"string"},"cpu_limit":{"description":"CPU limit","examples":["1"],"type":"string"},"created_at":{"description":"Creation timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string"},"description":{"description":"Workflow description","examples":["A sample workflow"],"type":"string"},"id":{"description":"Workflow ID","examples":["550e8400-e29b-41d4-a716-446655440000"],"type":"string"},"image":{"description":"Docker image","examples":["registry.example.com/my-workflow:v1"],"type":"string"},"memory_limit":{"description":"Memory limit","examples":["512Mi"],"type":"string"},"name":{"description":"Workflow name","examples":["My Workflow"],"type":"string"},"timeout_seconds":{"description":"Timeout in seconds","examples":[3600],"format":"int64","type":"integer"},"updated_at":{"description":"Last update timestamp","examples":["2024-01-01T00:00:00Z"],"type":"string"}},"required":["id","name","description","image","command","timeout_seconds","cpu_limit","memory_limit","created_at","updated_at"],"type":"object"}},"securitySchemes":{"oidc":{"flows":{"authorizationCode":{"authorizationUrl":"https://id.notera.no/oauth2/authorize","scopes":null,"tokenUrl":"https://id.notera.no/oauth2/token"}},"type":"oauth2"}}},"info":{"title":"Workflow API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/builds/{id}":{"get":{"operationId":"get-build","parameters":[{"description":"Build ID","in":"path","name":"id","required":true,"schema":{"description":"Build ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Get a build","tags":["Builds"]}},"/builds/{id}/logs":{"get":{"operationId":"get-build-logs","parameters":[{"description":"Build ID","in":"path","name":"id","required":true,"schema":{"description":"Build ID","type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Get build logs","tags":["Builds"]}},"/runs/{id}":{"delete":{"operationId":"cancel-run","parameters":[{"description":"Run ID","in":"path","name":"id","required":true,"schema":{"description":"Run ID","type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Cancel a workflow run","tags":["Runs"]},"get":{"operationId":"get-run","parameters":[{"description":"Run ID","in":"path","name":"id","required":true,"schema":{"description":"Run ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Get a workflow run","tags":["Runs"]}},"/runs/{id}/logs":{"get":{"operationId":"get-run-logs","parameters":[{"description":"Run ID","in":"path","name":"id","required":true,"schema":{"description":"Run ID","type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Get workflow run logs","tags":["Runs"]}},"/schedules/{id}":{"delete":{"operationId":"delete-schedule","parameters":[{"description":"Schedule ID","in":"path","name":"id","required":true,"schema":{"description":"Schedule ID","type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Delete a schedule","tags":["Schedules"]},"patch":{"operationId":"update-schedule","parameters":[{"description":"Schedule ID","in":"path","name":"id","required":true,"schema":{"description":"Schedule ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Update a schedule","tags":["Schedules"]}},"/workflows":{"get":{"operationId":"list-workflows","parameters":[{"description":"Maximum results to return","explode":false,"in":"query","name":"limit","schema":{"default":50,"description":"Maximum results to return","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"Number of results to skip","explode":false,"in":"query","name":"offset","schema":{"default":0,"description":"Number of results to skip","format":"int64","minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowResponse"},"type":"array","nullable":true}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"List all workflows","tags":["Workflows"]},"post":{"operationId":"create-workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Create a workflow","tags":["Workflows"]}},"/workflows/{id}":{"delete":{"operationId":"delete-workflow","parameters":[{"description":"Workflow ID","in":"path","name":"id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Delete a workflow","tags":["Workflows"]},"get":{"operationId":"get-workflow","parameters":[{"description":"Workflow ID","in":"path","name":"id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Get a workflow","tags":["Workflows"]},"put":{"operationId":"update-workflow","parameters":[{"description":"Workflow ID","in":"path","name":"id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Update a workflow","tags":["Workflows"]}},"/workflows/{workflow-id}/builds":{"get":{"operationId":"list-builds","parameters":[{"description":"Workflow ID","in":"path","name":"workflow-id","required":true,"schema":{"description":"Workflow ID","type":"string"}},{"description":"Maximum results to return","explode":false,"in":"query","name":"limit","schema":{"default":50,"description":"Maximum results to return","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"Number of results to skip","explode":false,"in":"query","name":"offset","schema":{"default":0,"description":"Number of results to skip","format":"int64","minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BuildResponse"},"type":"array","nullable":true}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"List builds for a workflow","tags":["Builds"]}},"/workflows/{workflow-id}/runs":{"get":{"operationId":"list-runs","parameters":[{"description":"Workflow ID","in":"path","name":"workflow-id","required":true,"schema":{"description":"Workflow ID","type":"string"}},{"description":"Maximum results to return","explode":false,"in":"query","name":"limit","schema":{"default":50,"description":"Maximum results to return","format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"Number of results to skip","explode":false,"in":"query","name":"offset","schema":{"default":0,"description":"Number of results to skip","format":"int64","minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RunResponse"},"type":"array","nullable":true}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"List workflow runs","tags":["Runs"]},"post":{"operationId":"create-run","parameters":[{"description":"Workflow ID","in":"path","name":"workflow-id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Create a workflow run","tags":["Runs"]}},"/workflows/{workflow-id}/schedules":{"get":{"operationId":"list-schedules","parameters":[{"description":"Workflow ID","in":"path","name":"workflow-id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ScheduleResponse"},"type":"array","nullable":true}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"List schedules for a workflow","tags":["Schedules"]},"post":{"operationId":"create-schedule","parameters":[{"description":"Workflow ID","in":"path","name":"workflow-id","required":true,"schema":{"description":"Workflow ID","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}},"description":"Created"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}},"description":"Error"}},"security":[{"oidc":[]}],"summary":"Create a schedule","tags":["Schedules"]}}}}