| swagger: "2.0" |
| info: |
| description: "CL Status Viewer APIs." |
| title: "CL-Status-Viewer" |
| version: "1.0.0" |
| host: "chromeos-cl-viewer-api.appspot.com" |
| |
| basePath: "/v1" |
| consumes: |
| - "application/json" |
| produces: |
| - "application/json" |
| schemes: |
| - "https" |
| paths: |
| "/index": |
| get: |
| summary: "Public index page." |
| operationId: "index" |
| produces: |
| - "application/json" |
| responses: |
| 200: |
| description: "OK." |
| "/internal_index": |
| get: |
| summary: "Internal index page." |
| operationId: "internal_index" |
| produces: |
| - "application/json" |
| responses: |
| 200: |
| description: "OK." |
| security: |
| - api_key: [] |
| "/gerrit/{gerrit_host}/changes/{change_number}/patches/{patch_number}/status": |
| get: |
| summary: "Get status and relevant builds of the CL." |
| operationId: "cl_status" |
| produces: |
| - "application/json" |
| parameters: |
| - description: "The gerrit host of the CL." |
| in: path |
| name: gerrit_host |
| required: true |
| type: string |
| minimum: 1 |
| - description: "The change number of the CL." |
| in: path |
| name: change_number |
| required: true |
| type: integer |
| minimum: 1 |
| - description: "The patch number (patch set) of the CL." |
| in: path |
| name: patch_number |
| required: true |
| type: integer |
| minimum: 1 |
| responses: |
| 200: |
| description: "The CL status and relevant builds in json string format." |
| schema: |
| $ref: '#/definitions/GetCLStatusResponse' |
| 400: |
| description: "CL format is invalid." |
| default: |
| description: "Unexpected error." |
| security: |
| - api_key: [] |
| |
| definitions: |
| GetCLStatusResponse: |
| properties: |
| Data: |
| type: "string" |
| description: "The json string containing the CL, CL status and relevant builds." |
| Error: |
| type: "string" |
| description: "The json string containing the error type and error messages." |
| |
| securityDefinitions: |
| # TODO: use Auth0 authentication or Serive Accounts instead of API key. |
| # This section configures basic authentication with an API key. |
| api_key: |
| type: "apiKey" |
| name: "key" |
| in: "query" |