{"basePath":"","definitions":{"Diff":{"properties":{"author":{"description":"The author of the diff as returned by Phabricator. Both name and\nemail are possibly empty strings.\n","properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"date_created":{"description":"The date this Diff was created as an ISO format UTC timestamp.\n","type":"string"},"date_modified":{"description":"The date this Diff was last modified as an ISO format UTC timestamp.\n","type":"string"},"id":{"description":"The integer id of the Diff.\n","type":"integer"},"phid":{"description":"The phid of the Diff.\n","type":"string"},"vcs_base_revision":{"description":"The commit hash id of the commit that this Diff was based on. I.e.\nthe parent commit of the commits used to make this Diff.\n","type":"string"}},"type":"object"},"Error":{"properties":{"detail":{"type":"string"},"instance":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"ErrorBreakdown":{"properties":{"failed_paths":{"description":"List of paths that failed to merge.","items":{"type":"string"},"type":"array"},"reject_paths":{"description":"List of names of .rej files.","items":{"type":"string"},"type":"array"},"revision_id":{"description":"The revision number (e.g. for D123 it will be 123.)","type":"integer"}},"type":"object"},"LandablePath":{"description":"A path through a revision stack indicating the set of revisions are\nlandable. Each item in the list is a child revision of the item before\nit.\n","items":{"description":"A revision PHID\n","type":"string"},"minItems":1,"type":"array"},"LandingPath":{"description":"A list of revision and diff pairs which form the path to land.\n","items":{"properties":{"diff_id":{"description":"The ID of a phabricator diff which is associated with the\nprovided revision_id.\n","type":"integer"},"revision_id":{"description":"The ID of a revision in the form of 'D{number}', e.g.\n'D12345'.\n","type":"string"}},"required":["revision_id","diff_id"],"type":"object"},"type":"array"},"Repository":{"properties":{"approval_required":{"description":"Whether Lando needs an approval before landing the stack.\n","type":"boolean"},"landing_supported":{"description":"Whether Lando is able to land to the repository or not.\n","type":"boolean"},"phid":{"description":"The repository PHID.\n","type":"string"},"short_name":{"description":"The repository short name as listed on Phabricator.\n","type":"string"},"url":{"description":"The canonical repository URL if landing_supported is true. If false, then\nthis will be the url to the repository on Phabricator.\n","type":"string"}},"type":"object"},"Reviewer":{"description":"Representation of the reviewer in the context of a revision.\n","properties":{"blocking_landing":{"description":"True if this reviewer is blocking the revision/diff from landing,\nsuch as not having reviewed yet as a blocking reviewer or having\nrejected the particular diff.\n","type":"boolean"},"for_other_diff":{"description":"True if the reviewer's status (acceptance/rejection) is on a\ndifferent diff.\n","type":"boolean"},"full_name":{"description":"A longer name for the reviewer. For a user this would be their\nrealName.\n","type":"string"},"identifier":{"description":"The identifying name for this reviewer. Username or project name\nfor reviewers that are users or projects respectively.\n","type":"string"},"phid":{"description":"The phid of the user.\n","type":"string"},"status":{"description":"Status set by or on the reviewer. Users added as blocking reviewers\nhave status set to \"blocking\" instead of \"added\".\n","enum":["added","accepted","blocking","rejected","resigned"],"type":"string"}},"type":"object"},"Revision":{"properties":{"author":{"$ref":"#/definitions/User"},"blocked_reason":{"description":"The reason a revision is blocked from landing. Will be an empty\nstring if the revision is not blocked.\n","type":"string"},"bug_id":{"description":"The ID of the Bugzilla bug this revision belongs to. Or null if\nit is not attached to a specific bug.\n","type":"integer"},"commit_message":{"description":"The full commit message that will be used when landing the revision.\nIt is formatted to include the revision title, bug id, reviewers,\nand revision URL.\n","type":"string"},"commit_message_title":{"description":"The first line of the commit message that will be used when landing\nthe revision.\n","type":"string"},"date_created":{"description":"The date that the revision was created as an ISO format UTC timestamp.\n","type":"string"},"date_modified":{"description":"The date that the revision was last modified as an ISO format UTC\ntimestamp.\n","type":"string"},"diff":{"$ref":"#/definitions/Diff"},"id":{"description":"The id of the revision in the form of D{number}\n","type":"string"},"is_secure":{"description":"Indicates this revision is security-sensitive and should follow the\nSecurity Bug Approval Process.  See https://wiki.mozilla.org/Security/Bug_Approval_Process.\n","type":"boolean"},"is_using_secure_commit_message":{"description":"Indicates that the patch author has given an alternative, secure commit\nmessage to land this revision with, according to the Security Bug Approval\nProcess. The alternative message is available in the 'title' and\n'summary' attributes.\n\nSee https://wiki.mozilla.org/Security/Bug_Approval_Process for details.\n","type":"boolean"},"phid":{"description":"The phid of the revision.\n","type":"string"},"repo_phid":{"description":"The PHID of this revision's repository.\n","type":"string"},"reviewers":{"items":{"$ref":"#/definitions/Reviewer"},"type":"array"},"status":{"description":"The status of the revision.\n","properties":{"closed":{"description":"Whether this status implies the revision is closed.\n","type":"boolean"},"display":{"description":"A string suitable for displaying this status to a user.\n","type":"string"},"value":{"description":"The value of this status from Phabricator, a unique identifier.\n","type":"string"}},"type":"object"},"summary":{"description":"The summary provided on the revision.\n","type":"string"},"title":{"description":"The title of the revision.\n","type":"string"},"url":{"description":"A url to the revision on Phabricator.\n","type":"string"}},"type":"object"},"Stack":{"properties":{"edges":{"description":"A list of edges defining the stacks dependency graph.\n","items":{"$ref":"#/definitions/StackEdge"},"type":"array"},"landable_paths":{"description":"A list of landable paths through the stack graph.\n","items":{"$ref":"#/definitions/LandablePath"},"type":"array"},"repositories":{"description":"A list of all repositories that have revisions in the stack.\nLando may not support landing to all of these repositories.\n","items":{"$ref":"#/definitions/Repository"},"type":"array"},"revisions":{"description":"A list of revisions which are part of the stack.\n","items":{"$ref":"#/definitions/Revision"},"type":"array"},"uplift_repositories":{"description":"A list of repositories needing an approval before landing.\n","items":{"type":"string"},"type":"array"}},"type":"object"},"StackAssessment":{"properties":{"blockers":{"description":"A list of descriptions of why landing is blocked. Only contains data when\nthe landing is blocked.\n","items":{"type":"string"},"type":"array"},"confirmation_token":{"description":"A token to be passed along with the transplant request when the\ncaller goes to land a revision.  By receiving and passing the token\nalong the caller asserts that they have acknowledged all of the\nwarnings. For example, the caller could present a UI with the\nwarnings to the end user and have the user acknowledge the warnings\nwith a checkbox. Once acknowledged, the UI can pass the confirmation\ntoken to the transplant endpoint so the transplant can proceed.\n","type":"string"},"warnings":{"description":"A list of issues that the caller should acknowledge before landing\ntheir revision.  The caller can signal acknowledgement by sending the\nconfirmation_token with their landing request.\n","items":{"properties":{"display":{"description":"A description of this warning type for display.","type":"string"},"id":{"description":"A unique identifier for this warning type.","type":"string"},"instances":{"description":"A list of instances of this warning type.\n","items":{"properties":{"details":{"description":"Details of this warning specific to this instance.\n","type":"string"},"revision_id":{"description":"ID in \"D<int>\" form of the revision this warning is for.\n","type":"string"}},"type":"object"},"minItems":1,"type":"array"}},"type":"object"},"type":"array"}},"type":"object"},"StackEdge":{"description":"An edge between two revisions in a stack. The first item is the child\nthe second is the parent.\n","items":{"description":"A revision PHID.\n","type":"string"},"maxItems":2,"minItems":2,"type":"array"},"Transplant":{"properties":{"created_at":{"description":"ISO format UTC time of creation.\n","format":"date-time","type":"string"},"details":{"description":"revision (sha) of push if it is 'landed', otherwise a\nstatus update or error message.\n","type":"string"},"error_breakdown":{"$ref":"#/definitions/ErrorBreakdown"},"id":{"description":"The id of the Transplant.\n","type":"integer"},"landing_path":{"$ref":"#/definitions/LandingPath"},"repository_url":{"description":"The url of the repo the revision will land to.\n","type":"string"},"request_id":{"description":"The id of the Request in Autoland Transplant.\n","type":"integer"},"requester_email":{"description":"Email of the requester.\n","type":"string"},"status":{"description":"Status of the landing job in Autoland Transplant.\n","enum":["aborted","landed","failed","submitted"],"type":"string"},"tree":{"description":"The repo the revision will land to.\n","type":"string"},"updated_at":{"description":"ISO format UTC time of the last update.\n","format":"date-time","type":"string"}},"type":"object"},"TransplantRequest":{"properties":{"landing_path":{"$ref":"#/definitions/LandingPath"}},"required":["landing_path"],"type":"object"},"User":{"properties":{"phid":{"description":"The phid of the user.\n","type":"string"},"real_name":{"description":"The user's real name as they set it on Phabricator.\n","type":"string"},"username":{"description":"The user's username on Phabricator.\n","type":"string"}},"type":"object"}},"info":{"description":"An API to get and land Phabricator revisions.","title":"Lando API","version":"3.0.0"},"paths":{"/":{"get":{"responses":{"302":{"description":"Redirect to swagger.json","headers":{"Location":{"description":"Where to redirect to","type":"string"}}}},"summary":"Redirect to the API specification"}},"/diff_warnings":{"get":{"description":"Gets a list of diff warnings based on provided filters","operationId":"landoapi.api.diff_warnings.get","parameters":[{"in":"query","name":"revision_id","required":true,"type":"integer"},{"in":"query","name":"diff_id","required":true,"type":"integer"},{"in":"query","name":"group","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}},"post":{"description":"Creates a new diff warning","operationId":"landoapi.api.diff_warnings.post","parameters":[{"in":"body","name":"data","required":true,"schema":{"properties":{"data":{"type":"object"},"diff_id":{"type":"integer"},"group":{"type":"string"},"revision_id":{"type":"integer"}},"required":["revision_id","diff_id","group","data"],"type":"object"}}],"responses":{"201":{"description":"OK","schema":{"type":"object"}},"400":{"description":"Bad request","schema":{"type":"object"}}}}},"/diff_warnings/{pk}":{"delete":{"description":"Archives a given diff warning.","operationId":"landoapi.api.diff_warnings.delete","parameters":[{"in":"path","name":"pk","required":true,"type":"integer"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}},"400":{"description":"Bad request","schema":{"type":"object"}},"404":{"description":"Not found","schema":{"type":"object"}}}}},"/landing_jobs/{landing_job_id}":{"get":{"description":"Gets landing job status","operationId":"landoapi.api.landing_jobs.get","parameters":[{"in":"path","name":"landing_job_id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"properties":{"commit_id":{"description":"Commit identifier (such as hg hash)","type":"string"},"id":{"description":"Landing Job id","type":"integer"},"status":{"description":"Current job status","enum":["SUBMITTED","IN_PROGRESS","DEFERRED","FAILED","LANDED","CANCELLED"],"type":"string"}},"type":"object"}},"404":{"description":"Landing job does not exist","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}},"put":{"description":"Updates a request to land (i.e. a landing job)","operationId":"landoapi.api.landing_jobs.put","parameters":[{"in":"path","name":"landing_job_id","required":true,"type":"string"},{"in":"body","name":"data","required":true,"schema":{"properties":{"status":{"enum":["CANCELLED"],"type":"string"}},"required":["status"],"type":"object"}}],"responses":{"200":{"description":"OK","schema":{"properties":{"id":{"description":"Landing Job id","type":"integer"}},"type":"object"}},"403":{"description":"Service not authorized","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}},"404":{"description":"Landing job does not exist","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}},"/requestSecApproval":{"post":{"description":"Submit a sanitized, safe-to-land commit message for a security-sensitive\nrevision. This starts the Security Bug Approval Process.\n","operationId":"landoapi.api.revisions.request_sec_approval","parameters":[{"description":"The data we want to submit","in":"body","name":"data","required":true,"schema":{"properties":{"revision_id":{"description":"The ID of a revision in the form of 'D{number}', e.g. 'D12345'.\n","type":"string"},"sanitized_message":{"description":"The santized commit message we want to use when landing this revision.\nSee the Security Bug Approval Process for guidelines for crafting an\nappropriate message.\n","type":"string"}},"required":["revision_id","sanitized_message"],"type":"object"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}},"/stacks/{revision_id}":{"get":{"description":"Get the stack a revision is part of\n","parameters":[{"description":"The id of the revision in the form of 'D{number}', e.g. 'D12345'.\n","in":"path","name":"revision_id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Stack"}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}},"/transplants":{"get":{"description":"Returns the list of transplants for any revisions in the stack\nof a given revision.\n","operationId":"landoapi.api.transplants.get_list","parameters":[{"in":"query","name":"stack_revision_id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/Transplant"},"type":"array"}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}},"post":{"description":"Sends request to transplant service. If a Phabricator API\nkey is set in the X-Phabricator-API-Key header, then you may access\nprivate Revisions which the owner of the api key has access to.\n","parameters":[{"description":"The data required to request a landing.","in":"body","name":"data","required":true,"schema":{"allOf":[{"$ref":"#/definitions/TransplantRequest"},{"properties":{"confirmation_token":{"description":"A token representing the set of acknowledged warnings\nwhen landing. The /transplants/dryrun endpoint responds\nwith the current warnings and the matching token. If\nthe warnings have changed between requesting a dryrun\nand requesting a landing, the landing will fail.\n","type":"string"},"flags":{"description":"A list of flags that will be appended to the commit\nmessage upon transplant. For example, [\"DONTBUILD\"].\n","items":{"type":"string"},"type":"array"}},"type":"object"}]}}],"responses":{"202":{"description":"OK","schema":{"properties":{"id":{"description":"A newly created Transplant id\n","type":"integer"}},"type":"object"}},"400":{"description":"Blockers or Unacknowledged Warnings","schema":{"allOf":[{"$ref":"#/definitions/Error"},{"$ref":"#/definitions/StackAssessment"}]}},"default":{"description":"Error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}},"/transplants/dryrun":{"post":{"description":"Check for any issues that may prevent the caller from landing the given\nrevision. By default only public revisions are accessible. If a\nPhabricator API key is set in the X-Phabricator-API-Key header, then\nyou may access private Revisions which the owner of the api key has\naccess to.\n","operationId":"landoapi.api.transplants.dryrun","parameters":[{"description":"The data required to request a landing.","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/TransplantRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/StackAssessment"}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}},"/try/patches":{"post":{"description":"Submit a set of patches to the Try server.\n","operationId":"landoapi.api.try_push.post_patches","parameters":[{"description":"Provide the content of the push for submission to Lando.\n","in":"body","name":"data","required":true,"schema":{"properties":{"base_commit":{"description":"The published base commit on which to apply `patches`.\n","maxLength":40,"minLength":40,"type":"string"},"base_commit_vcs":{"description":"The VCS that the `base_commit` hash is based on. Default is `hg`.\n","enum":["git","hg"],"type":"string"},"patch_format":{"description":"The format of the encoded patches in `patches`. Either `hgexport` or\n`git-format-patch` are accepted.\n","enum":["git-format-patch","hgexport"],"type":"string"},"patches":{"description":"Ordered array of base64 encoded patches for submission to Lando.\n","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["base_commit","patches","patch_format"],"type":"object"}}],"responses":{"201":{"description":"Push was submitted successfully."}}}},"/uplift":{"get":{"description":"Return the list of valid uplift repositories.\n","operationId":"landoapi.api.uplift.get","responses":{"201":{"description":"OK"}}},"post":{"description":"Create an uplift request for a revision and target repository\n","operationId":"landoapi.api.uplift.create","parameters":[{"description":"Provide information about which revision to uplift and which repository\nthe uplift will land in.\n","in":"body","name":"data","required":true,"schema":{"properties":{"repository":{"type":"string"},"revision_id":{"description":"The ID of a revision in the form of 'D{number}', e.g.\n'D12345'.\n","type":"string"}},"required":["revision_id","repository"],"type":"object"}}],"responses":{"201":{"description":"OK"},"400":{"description":"Invalid payload","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}},"403":{"description":"Service not authorized","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}},"default":{"description":"Unexpected error","schema":{"allOf":[{"$ref":"#/definitions/Error"}]}}}}}},"produces":["application/json"],"swagger":"2.0"}
