-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.json
1 lines (1 loc) · 13.5 KB
/
openapi.json
1
{"openapi":"3.0.2","info":{"title":"Murdock API","description":"This is the Murdock API","version":"1.0.0"},"paths":{"/jobs":{"get":{"tags":["jobs"],"summary":"Return the list of all jobs","operationId":"jobs_handler_jobs_get","parameters":[{"required":false,"schema":{"title":"Limit","type":"integer","default":25},"name":"limit","in":"query"},{"required":false,"schema":{"title":"Uid","type":"string"},"name":"uid","in":"query"},{"required":false,"schema":{"title":"Is Pr","type":"boolean"},"name":"is_pr","in":"query"},{"required":false,"schema":{"title":"Is Branch","type":"boolean"},"name":"is_branch","in":"query"},{"required":false,"schema":{"title":"Is Tag","type":"boolean"},"name":"is_tag","in":"query"},{"required":false,"schema":{"title":"States","type":"string"},"name":"states","in":"query"},{"required":false,"schema":{"title":"Prnum","type":"integer"},"name":"prnum","in":"query"},{"required":false,"schema":{"title":"Prstates","type":"string"},"name":"prstates","in":"query"},{"required":false,"schema":{"title":"Branch","type":"string"},"name":"branch","in":"query"},{"required":false,"schema":{"title":"Tag","type":"string"},"name":"tag","in":"query"},{"required":false,"schema":{"title":"Ref","type":"string"},"name":"ref","in":"query"},{"required":false,"schema":{"title":"Sha","type":"string"},"name":"sha","in":"query"},{"required":false,"schema":{"title":"Tree","type":"string"},"name":"tree","in":"query"},{"required":false,"schema":{"title":"Author","type":"string"},"name":"author","in":"query"},{"required":false,"schema":{"title":"After","type":"string"},"name":"after","in":"query"},{"required":false,"schema":{"title":"Before","type":"string"},"name":"before","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Jobs Handler Jobs Get","type":"array","items":{"$ref":"#/components/schemas/JobModel"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["jobs"],"summary":"Removed finished jobs older than 'before' date","operationId":"finished_job_delete_handler_jobs_delete","parameters":[{"required":true,"schema":{"title":"Before","type":"string"},"name":"before","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Finished Job Delete Handler Jobs Delete","type":"array","items":{"$ref":"#/components/schemas/JobModel"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]}},"/job/branch":{"post":{"tags":["branch job"],"summary":"Start a manual job on a branch","operationId":"job_start_branch_handler_job_branch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualJobBranchParamModel"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]}},"/job/branch/{branch}":{"get":{"tags":["branch job"],"summary":"Return the last job of the given branch","operationId":"job_get_last_branch_handler_job_branch__branch__get","parameters":[{"required":true,"schema":{"title":"Branch","type":"string"},"name":"branch","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job/branch/{branch}/badge":{"get":{"tags":["branch job"],"summary":"Return the last job badge of the given branch","operationId":"job_get_last_branch_badge_handler_job_branch__branch__badge_get","parameters":[{"required":true,"schema":{"title":"Branch","type":"string"},"name":"branch","in":"path"}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job/tag":{"post":{"tags":["tag job"],"summary":"Start a manual job on a tag","operationId":"job_start_tag_handler_job_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualJobTagParamModel"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]}},"/job/tag/{tag}":{"get":{"tags":["tag job"],"summary":"Return the last job of the given tag","operationId":"job_get_last_tag_handler_job_tag__tag__get","parameters":[{"required":true,"schema":{"title":"Tag","type":"string"},"name":"tag","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job/commit":{"post":{"tags":["commit job"],"summary":"Start a manual job on a tag","operationId":"job_start_commit_handler_job_commit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualJobCommitParamModel"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]}},"/job/commit/{sha}":{"get":{"tags":["commit job"],"summary":"Return the last job of the given commit","operationId":"job_get_last_commit_handler_job_commit__sha__get","parameters":[{"required":true,"schema":{"title":"Sha","type":"string"},"name":"sha","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job/pr/{prnum}":{"get":{"tags":["pr job"],"summary":"Return the last job of the given PR number","operationId":"job_get_last_prnum_handler_job_pr__prnum__get","parameters":[{"required":true,"schema":{"title":"Prnum","type":"integer"},"name":"prnum","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/job/{uid}":{"get":{"tags":["job"],"summary":"Return the details of a job","operationId":"job_handler_job__uid__get","parameters":[{"required":true,"schema":{"title":"Uid","type":"string"},"name":"uid","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["job"],"summary":"Restart a finished job","operationId":"job_restart_handler_job__uid__post","parameters":[{"required":true,"schema":{"title":"Uid","type":"string"},"name":"uid","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]},"delete":{"tags":["job"],"summary":"Remove a job","operationId":"job_remove_handler_job__uid__delete","parameters":[{"required":true,"schema":{"title":"Uid","type":"string"},"name":"uid","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"Github OAuth Token":[]}]}},"/job/{uid}/status":{"put":{"tags":["job"],"summary":"Update the status of a running job","operationId":"running_job_status_handler_job__uid__status_put","parameters":[{"required":true,"schema":{"title":"Uid","type":"string"},"name":"uid","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CommitModel":{"title":"CommitModel","type":"object","properties":{"sha":{"title":"SHA value of the commit to process","type":"string"},"tree":{"title":"SHA value of the commit tree","type":"string"},"message":{"title":"Commit message","type":"string"},"author":{"title":"Author of the commit","type":"string"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"JobModel":{"title":"JobModel","type":"object","properties":{"uid":{"title":"Unique identifier of the job (hex format)","type":"string"},"commit":{"title":"Information of the commit to process","allOf":[{"$ref":"#/components/schemas/CommitModel"}]},"ref":{"title":"Reference (if any), can be branch name or tag name","type":"string"},"prinfo":{"title":"Pull Request detailed information (if any)","allOf":[{"$ref":"#/components/schemas/PullRequestInfo"}]},"creation_time":{"title":"Job creation time","type":"number"},"start_time":{"title":"Job start time","type":"number"},"fasttracked":{"title":"Whether the job can be fasttracked","type":"boolean"},"status":{"title":"Status of the job","type":"object"},"state":{"title":"State of a job (queued, running, passed, errored or stopped)","type":"string"},"output":{"title":"Output of the job","type":"string"},"output_text_url":{"title":"URL where text output of the job is available","type":"string"},"runtime":{"title":"Runtime of the job","type":"number"},"trigger":{"title":"Action that triggered the job creation","type":"string","default":"api"},"triggered_by":{"title":"Github user who triggered the job creation","type":"string"},"env":{"title":"Dictionnary of environment variables attached to the job","type":"object"},"user_env":{"title":"User defined dictionnary of environment variables atteched to the job","type":"object"},"artifacts":{"title":"List of job artifacts. Can be files or directory. If a directory is provided, it must contain an index.html that can be rendered by the web UI.","type":"array","items":{"type":"string"}}}},"ManualJobBranchParamModel":{"title":"ManualJobBranchParamModel","required":["branch"],"type":"object","properties":{"env":{"title":"List of custom environment variables to pass to the job","type":"object"},"fasttrack":{"title":"Run the job in fasttrack mode.","type":"boolean","default":false},"branch":{"title":"Name of the branch","type":"string"}}},"ManualJobCommitParamModel":{"title":"ManualJobCommitParamModel","required":["sha"],"type":"object","properties":{"env":{"title":"List of custom environment variables to pass to the job","type":"object"},"fasttrack":{"title":"Run the job in fasttrack mode.","type":"boolean","default":false},"sha":{"title":"SHA of the commit","type":"string"}}},"ManualJobTagParamModel":{"title":"ManualJobTagParamModel","required":["tag"],"type":"object","properties":{"env":{"title":"List of custom environment variables to pass to the job","type":"object"},"fasttrack":{"title":"Run the job in fasttrack mode.","type":"boolean","default":false},"tag":{"title":"Name of the tag","type":"string"}}},"PullRequestInfo":{"title":"PullRequestInfo","type":"object","properties":{"title":{"title":"Pull Request title","type":"string"},"number":{"title":"Pull Request number","type":"integer"},"merge_commit":{"title":"SHA value of the merged commit","type":"string"},"user":{"title":"Github user corresponding to the pull request author","type":"string"},"url":{"title":"Github URL of the pull request","type":"string"},"base_repo":{"title":"URL of the base repository","type":"string"},"base_branch":{"title":"Name of the target branch","type":"string"},"base_commit":{"title":"Last commit of the target branch","type":"string"},"base_full_name":{"title":"Target repository name","type":"string"},"mergeable":{"title":"True if the pull request is mergeable, False otherwise","type":"boolean"},"labels":{"title":"List of Github labels assigned to the pull request","type":"array","items":{"type":"string"}},"state":{"title":"State of the pull request on GitHub","type":"string"},"is_merged":{"title":"Wether the pull request or not","type":"boolean"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}},"securitySchemes":{"Github OAuth Token":{"type":"apiKey","in":"header","name":"authorization"}}}}