{"components":{"schemas":{"NewSuite":{"description":"a commit to build","properties":{"clone-url":{"description":"clone url","type":"string"},"commit":{"description":"commit","type":"string"},"default-branch":{"description":"default branch","nullable":true,"type":"string"},"message":{"description":"commit message","nullable":true,"type":"string"},"ref":{"description":"branch, tag or merge ref","type":"string"}},"required":["clone-url","ref","commit"],"type":"object"}},"securitySchemes":{"jwt":{"bearerFormat":"JWT","description":"A NixCI user's JWT.","scheme":"bearer","type":"http"},"token":{"description":"An auth token. Username user_00000000-0000-0000-0000-000000000000, password the token secret.","scheme":"basic","type":"http"}}},"info":{"description":"The API of a NixCI leader.","title":"NixCI Leader API","version":"1.1"},"openapi":"3.0.0","paths":{"/suite":{"post":{"requestBody":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/NewSuite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/NewSuite"}}}},"responses":{"200":{"content":{"application/json;charset=utf-8":{"schema":{"format":"uuid","type":"string"}},"text/plain;charset=utf-8":{"schema":{"format":"uuid","type":"string"}}},"description":"The suite that was started."},"400":{"description":"Invalid `body`"},"401":{"description":"No usable credentials."}},"security":[{"jwt":[]},{"token":[]}],"summary":"Start a build"}},"/suite/{uuid}/wait":{"get":{"description":"Held open until the suite finishes. Answers 408 while it is still going, so ask again, and 402 if builds are not running for the repository, in which case it never will.","parameters":[{"in":"path","name":"uuid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json;charset=utf-8":{"schema":{"description":"how a suite ended","enum":["success","failed","cancelled"],"type":"string"}}},"description":"It passed."},"401":{"description":"No usable credentials."},"402":{"description":"Builds are not running for this repository, so the suite will not start. Nothing to retry."},"404":{"description":"No such suite."},"408":{"description":"Still going. Ask again; Retry-After says how soon."},"424":{"description":"It failed or was cancelled. Not 2XX, so --fail catches it."}},"security":[{"jwt":[]},{"token":[]}],"summary":"Wait for a build"}}},"servers":[{"url":"https://api.nix-ci.com"}]}