Last active
March 2, 2023 14:39
-
-
Save avinal/9952b4e627f10baaf01b2a9b42e76f99 to your computer and use it in GitHub Desktop.
Wakatime Code activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Tekton Results API Specification | |
version: v1alpha2 | |
description: >- | |
Tekton Results aims to help users logically group CI/CD workload history and | |
separate out long term result storage away from the Pipeline controller. | |
This allows you to: | |
* Provide custom Result metadata about your CI/CD workflows not available in | |
the Tekton TaskRun/PipelineRun CRDs (for example: post-run actions) | |
* Group related workloads together (e.g. bundle related TaskRuns and | |
PipelineRuns into a single unit) | |
* Make long-term result history independent of the Pipeline CRD controller, | |
letting you free up etcd resources for Run execution. | |
This is the Tekton Results API documentation | |
termsOfService: '' | |
contact: | |
name: Tekton Community | |
url: https://github.com/tektoncd/community/blob/main/contact.md | |
email: [email protected] | |
license: | |
name: Apache 2.0 | |
url: https://github.com/tektoncd/results/blob/main/LICENSE | |
x-logo: | |
url: '' | |
servers: | |
- url: https://{server_url}/apis/results.tekton.dev | |
description: '' | |
variables: | |
server_url: | |
default: localhost:8080 | |
description: URL of the API server | |
x-last-modified: 1677677605032 | |
paths: | |
/v1alpha2/parents/{parent}/results: | |
summary: List Results | |
get: | |
tags: | |
- Results | |
responses: | |
'200': | |
$ref: '#/components/responses/ResultsList' | |
x-last-modified: 1677673623817 | |
operationId: list_results_by_parent_name | |
summary: Get the list of the Results | |
description: '' | |
parameters: | |
- $ref: '#/components/parameters/parent' | |
name: parent | |
x-last-modified: 1677672025321 | |
x-last-modified: 1677671948697 | |
/v1alpha2/parents/{parent}/results/{result_uid}/records/{record_uid}: | |
summary: Create, delete or update records | |
get: | |
tags: | |
- Records | |
responses: | |
default: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Record' | |
description: Default response | |
operationId: get_record_by_uid | |
summary: '' | |
description: '' | |
post: | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Record' | |
required: true | |
tags: | |
- Records | |
parameters: | |
- name: result_uid | |
schema: | |
type: string | |
in: path | |
required: true | |
- name: record_uid | |
schema: | |
type: string | |
in: path | |
required: true | |
responses: | |
default: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Record' | |
description: Default response | |
operationId: create_record_by_uid | |
summary: '' | |
description: '' | |
delete: | |
tags: | |
- Records | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
description: '' | |
required: [] | |
type: object | |
externalDocs: | |
description: '' | |
url: '' | |
example: '' | |
example: '' | |
description: '' | |
x-last-modified: 1677760439227 | |
operationId: delete_record_by_uid | |
summary: '' | |
description: '' | |
patch: | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Record' | |
required: true | |
tags: | |
- Records | |
responses: | |
default: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Record' | |
description: Default response | |
operationId: '' | |
summary: '' | |
description: '' | |
parameters: | |
- $ref: '#/components/parameters/parent' | |
name: parent | |
x-last-modified: 1677672324160 | |
- $ref: '#/components/parameters/result_uid' | |
name: result_uid | |
x-last-modified: 1677672338019 | |
- $ref: '#/components/parameters/record_uid' | |
name: record_uid | |
x-last-modified: 1677672352453 | |
x-last-modified: 1677672432307 | |
/v1alpha2/parents/{parent}/results/{result_uid}: | |
summary: Get, Create, Delete or update result | |
get: | |
tags: | |
- Results | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
description: Default response | |
operationId: get_result_by_uid | |
summary: Get a single result | |
description: '' | |
post: | |
requestBody: | |
description: The result to be created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
required: true | |
tags: | |
- Results | |
parameters: | |
- name: parent | |
schema: | |
type: string | |
in: path | |
required: true | |
- name: uid | |
schema: | |
type: string | |
in: path | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
description: Default response | |
operationId: create_result_by_uid | |
summary: '' | |
description: '' | |
delete: | |
requestBody: | |
description: The result to be created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
required: true | |
tags: | |
- Results | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
description: '' | |
required: [] | |
type: object | |
externalDocs: | |
description: '' | |
url: '' | |
example: '' | |
example: '' | |
description: Default response | |
operationId: delete_result_by_uid | |
summary: Delete a particular result | |
description: '' | |
patch: | |
requestBody: | |
description: The patch result | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
required: true | |
tags: | |
- Results | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Result' | |
description: Default response | |
operationId: update_result_by_uid | |
summary: Update result given the UID | |
description: '' | |
parameters: | |
- $ref: '#/components/parameters/parent' | |
name: parent | |
x-last-modified: 1677672496911 | |
- $ref: '#/components/parameters/result_uid' | |
name: result_uid | |
x-last-modified: 1677672511792 | |
x-last-modified: 1677672484697 | |
/v1alpha2/parents/{parent}/results/{result_uid}/logs: | |
summary: List logs associated with a result | |
get: | |
tags: | |
- Logs | |
responses: | |
'200': | |
$ref: '#/components/responses/RecordsList' | |
x-last-modified: 1677673949442 | |
operationId: list_logs_by_result_uid | |
summary: List Logs given the Result UID | |
parameters: | |
- $ref: '#/components/parameters/parent' | |
name: parent | |
x-last-modified: 1677672653795 | |
- $ref: '#/components/parameters/result_uid' | |
name: result_uid | |
x-last-modified: 1677672667367 | |
x-last-modified: 1677672632222 | |
/v1alpha2/parents/{parent}/results/{results_uid}/logs/{log_uid}: | |
summary: Get or Delete Logs | |
get: | |
tags: | |
- Logs | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Log' | |
description: '' | |
x-last-modified: 1677676553132 | |
operationId: get_log_by_uid | |
delete: | |
tags: | |
- Logs | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
description: '' | |
required: [] | |
type: object | |
externalDocs: | |
description: '' | |
url: '' | |
example: '' | |
example: '' | |
description: '' | |
x-last-modified: 1677760513398 | |
operationId: delete_log_by_uid | |
parameters: | |
- $ref: '#/components/parameters/parent' | |
name: parent | |
x-last-modified: 1677672795198 | |
- $ref: '#/components/parameters/result_uid' | |
name: result_uid | |
x-last-modified: 1677672810563 | |
- $ref: '#/components/parameters/log_uid' | |
name: log_uid | |
x-last-modified: 1677672825675 | |
x-last-modified: 1677672778687 | |
components: | |
schemas: | |
Result: | |
description: >- | |
Results are aggregators of Records, allowing users to refer to groups of | |
Records as a single entity. | |
required: [] | |
type: object | |
properties: | |
annotations: | |
description: Arbitrary user provided labels for the result. | |
type: object | |
uid: | |
description: 'server assigned identified of the Results ' | |
type: string | |
name: | |
description: User assigned identifier of the Result. Encodes Parent information. | |
type: string | |
examples: | |
- namespace/default/results/1234 | |
- cluster/<cluster-id>/namespace/tekton/results/1234 | |
summary: | |
$ref: '#/components/schemas/RecordSummary' | |
description: >- | |
High level overview of the root record for the Result. This is | |
provided as a convinence for clients to query Record state without | |
needing to make multiple calls to fetch the underlying Records. | |
createdTime: | |
deprecated: 'true' | |
format: date-time | |
description: 'DEPRECATED: Use createTime instead' | |
type: string | |
createTime: | |
format: date-time | |
description: Server assigned timestamp for when the result was created. | |
type: string | |
updatedTime: | |
deprecated: 'true' | |
format: date-time | |
description: 'DEPRECATED: Use updateTime instead' | |
type: string | |
updateTime: | |
format: date-time | |
description: Server assigned timestamp for when the result was updated. | |
type: string | |
id: | |
deprecated: 'true' | |
description: 'DEPRECATED: use uid instead' | |
type: string | |
etag: | |
description: >- | |
This is etag for Results. If this is provided on update, it must | |
match the server's etag. | |
type: string | |
x-last-modified: 1677762252535 | |
Record: | |
description: >- | |
Record belonging to a Result. Typically will be Tekton | |
TaskRun/PipelineRun, but may also include other execution information | |
e.g alternative configs, DSLs, input payloads, post-execution actions | |
etc. | |
required: [] | |
type: object | |
properties: | |
id: | |
deprecated: 'true' | |
description: 'DEPRECATED: use uid instead.' | |
type: string | |
uid: | |
description: Server assigned identifier of the Record. | |
type: string | |
etag: | |
description: >- | |
The etag for this record. If this is provided on update, it must | |
match the server's etag. | |
type: string | |
name: | |
description: Resource name, must be rooted in parent result | |
type: string | |
createdTime: | |
deprecated: 'true' | |
format: date-time | |
description: 'DEPRECATED: use createTime instead.' | |
type: string | |
createTime: | |
format: date-time | |
description: Server assigned timestamp for when the record was created. | |
type: string | |
updatedTime: | |
deprecated: 'true' | |
format: date-time | |
description: 'DEPRECATED: use updateTime instead.' | |
type: string | |
updateTime: | |
format: date-time | |
description: Server assigned timestamp for when the record was updated. | |
type: string | |
data: | |
$ref: '#/components/schemas/Any' | |
x-last-modified: 1677762607036 | |
Any: | |
description: Any represents lossely typed data to be stored within a Record. | |
required: [] | |
type: object | |
properties: | |
value: | |
format: byte | |
description: JSON encoded data. | |
type: string | |
type: | |
$ref: '#/components/schemas/RecordType' | |
type: object | |
x-last-modified: 1677762701514 | |
RecordType: | |
description: >- | |
It is unique identifier if the data type stored in the value. This is | |
used as a type to hint to determine how to unmarshal values. Limited to | |
128 characters. Currently RecordType can be one of the following: | |
* PipelineRun Record: `tekton.dev/v1beta1.PipelineRun` | |
* TaskRun Record: `tekton.dev/v1beta1.TaskRun` | |
* Log Record: `results.tekton.dev/v1alpha2.Log` | |
enum: | |
- tekton.dev/v1beta1.PipelineRun | |
- tekton.dev/v1beta1.TaskRun | |
- results.tekton.dev/v1alpha2.Log | |
type: string | |
x-last-modified: 1677762811698 | |
RecordSummary: | |
description: >- | |
RecordSummary is a high level overview of a Record, typically | |
representing a "root" record for a result. It includes type agonstic | |
information so that UI's and other tools do not need to be aware of | |
underlying types. | |
required: [] | |
type: object | |
properties: | |
record: | |
description: The name of the Record this summary represents. | |
type: string | |
type: | |
description: Identifier of underlying data. | |
type: string | |
example: pipelines.tekton.dev/PipelineRun | |
status: | |
$ref: '#/components/schemas/Status' | |
startTime: | |
format: date-time | |
type: string | |
endTime: | |
format: date-time | |
type: string | |
annotations: | |
description: >- | |
Key-value pairs representing abitrary underlying record data that | |
clients want to include that aren't covered by the above fields. | |
type: object | |
x-last-modified: 1677763076711 | |
Log: | |
description: Log is a chunk of a log. | |
required: [] | |
type: object | |
properties: | |
name: | |
description: Resource name for the log. | |
type: string | |
data: | |
format: byte | |
description: The log data as bytes. | |
type: string | |
x-last-modified: 1677763164266 | |
Status: | |
description: 'Completion status of the Record. ' | |
enum: | |
- UNKNOWN | |
- SUCCESS | |
- FAILURE | |
- TIMEOUT | |
- CANCELLED | |
type: string | |
x-last-modified: 1677763193271 | |
LogSummary: | |
description: Summary of the log properties. | |
required: [] | |
type: object | |
properties: | |
record: | |
description: the name of the Record this summary represents. | |
type: string | |
bytesReceived: | |
format: int64 | |
description: Number of bytes received while streaming. | |
type: integer | |
x-last-modified: 1677763303426 | |
responses: | |
ResultsList: | |
content: | |
application/json: | |
schema: | |
description: List of Results with nextPageToken | |
required: | |
- results | |
- nextPageToken | |
type: object | |
properties: | |
results: | |
type: array | |
items: | |
$ref: '#/components/schemas/Result' | |
nextPageToken: | |
type: string | |
description: List of Results with nextPageToken | |
x-last-modified: 1677674976067 | |
RecordsList: | |
content: | |
application/json: | |
schema: | |
description: List of Records with nextPageToken. | |
required: | |
- nextPageToken | |
- records | |
type: object | |
properties: | |
records: | |
type: array | |
items: | |
$ref: '#/components/schemas/Record' | |
nextPageToken: | |
type: string | |
description: List of Records with nextPageToken. | |
x-last-modified: 1677674985612 | |
parameters: | |
log_uid: | |
deprecated: false | |
name: Log UID | |
schema: | |
format: uuid | |
type: string | |
in: path | |
required: true | |
x-last-modified: 1677675049119 | |
record_uid: | |
deprecated: false | |
name: Record UID | |
schema: | |
format: uuid | |
type: string | |
in: path | |
required: true | |
x-last-modified: 1677675065966 | |
parent: | |
deprecated: false | |
name: Parent name | |
schema: | |
type: string | |
in: path | |
required: true | |
x-last-modified: 1677675085801 | |
result_uid: | |
deprecated: false | |
name: Result UID | |
schema: | |
format: uuid | |
type: string | |
in: path | |
required: true | |
x-last-modified: 1677675107981 | |
examples: | |
Result: | |
summary: 'An example Result ' | |
value: | |
name: default/results/2be47d31-4d7f-4762-9616-969f2d7d9cc3 | |
id: 0e0536c1-eccc-4727-9f99-5bb26ce3db90 | |
uid: 0e0536c1-eccc-4727-9f99-5bb26ce3db90 | |
createdTime: '2023-01-30T14:15:58.786960Z' | |
createTime: '2023-01-30T14:15:58.786960Z' | |
updatedTime: '2023-01-30T14:16:31.880127Z' | |
updateTime: '2023-01-30T14:16:31.880127Z' | |
etag: 0e0536c1-eccc-4727-9f99-5bb26ce3db90-1675088191880127798 | |
summary: | |
record: >- | |
default/results/2be47d31-4d7f-4762-9616-969f2d7d9cc3/records/2be47d31-4d7f-4762-9616-969f2d7d9cc3 | |
type: tekton.dev/v1beta1.PipelineRun | |
endTime: '2023-01-30T14:16:31Z' | |
status: SUCCESS | |
x-last-modified: 1677763520069 | |
securitySchemes: | |
BasicAuth: | |
scheme: bearer | |
type: http | |
description: |- | |
Example: | |
> Authorization: Bearer ZGVtbzpwQDU1dzByZA == | |
x-last-modified: 1677672932761 | |
headers: {} | |
security: | |
- BasicAuth: [] | |
tags: | |
- name: Records | |
description: >- | |
Records are individual instances of data. These will commonly be execution | |
data (e.g. PipelineRun, TaskRuns, Logs), but could also reference | |
additional data about the event/execution. Records are intended to be | |
flexible to support arbitrary information tools want to provide around a | |
CI event. | |
externalDocs: | |
url: https://github.com/tektoncd/results#data-model | |
x-last-modified: 1677767456366 | |
- name: Logs | |
description: 'Logs is a type of Record. ' | |
x-last-modified: 1677767481655 | |
- name: Results | |
description: > | |
Results are aggregators of Records, allowing users to refer to groups of | |
Records as a single entity. For example, you might have a single Result | |
that groups the following Records: | |
* Source Event (e.g. pull request, push) that kicked off the action. | |
* The PipelineRun that occurred. | |
* The TaskRuns that occurred in response of the PipelineRun (one per Task). | |
* Receipt of Cloud Event delivery. | |
* Receipt of Source status update. | |
externalDocs: | |
url: https://github.com/tektoncd/results#data-model | |
x-last-modified: 1677767734084 | |
externalDocs: | |
description: See Results API Documentation | |
url: https://github.com/tektoncd/results/tree/main/docs/api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment