mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 05:41:12 +00:00
f01ac3f0a3
- [x] updates docs - [x] adjust UI - [x] show correct icon - [x] show correct link (to pr) - [x] add as option in secret edit - [x] parse webhook - [x] update tests - [x] github merged - [x] github closed - [x] gitea merged - [x] gitea closed - [x] bitbucket merged - [x] bitbucket closed - [x] gitlab merged - [x] gitlab closed closes #286
4517 lines
155 KiB
Go
4517 lines
155 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {
|
|
"name": "Woodpecker CI Community",
|
|
"url": "https://woodpecker-ci.org/"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/agents": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Get agent list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Create a new agent with a random token so a new agent can connect to the server",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the agent's data (only 'name' and 'no_schedule' are read)",
|
|
"name": "agent",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/agents/{agent}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Get agent information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the agent's id",
|
|
"name": "agent",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Delete an agent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the agent's id",
|
|
"name": "agent",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Update agent information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the agent's id",
|
|
"name": "agent",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the agent's data",
|
|
"name": "agentData",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Agent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/agents/{agent}/tasks": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agents"
|
|
],
|
|
"summary": "Get agent tasks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the agent's id",
|
|
"name": "agent",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Task"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/badges/{repo_id}/cc.xml": {
|
|
"get": {
|
|
"description": "CCMenu displays the pipeline status of projects on a CI server as an item in the Mac's menu bar.\nMore details on how to install, you can find at http://ccmenu.org/\nThe response format adheres to CCTray v1 Specification, https://cctray.org/v1/",
|
|
"produces": [
|
|
"text/xml"
|
|
],
|
|
"tags": [
|
|
"Badges"
|
|
],
|
|
"summary": "Provide pipeline status information to the CCMenu tool",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/badges/{repo_id}/status.svg": {
|
|
"get": {
|
|
"produces": [
|
|
"image/svg+xml"
|
|
],
|
|
"tags": [
|
|
"Badges"
|
|
],
|
|
"summary": "Get status badge, SVG format",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/html"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "List available pprof profiles (HTML)",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/block": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof stack traces that led to blocking on synchronization primitives",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/cmdline": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get the command line invocation of the current program",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/goroutine": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof stack traces of all current goroutines",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Use debug=2 as a query parameter to export in the same format as an un-recovered panic",
|
|
"name": "debug",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/heap": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof heap dump, a sampling of memory allocations of live objects",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "You can specify gc=heap to run GC before taking the heap sample",
|
|
"name": "gc",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/profile": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug\nAfter you get the profile file, use the go tool pprof command to investigate the profile.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof CPU profile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "You can specify the duration in the seconds GET parameter.",
|
|
"name": "seconds",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/symbol": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug\nLooks up the program counters listed in the request,\nresponding with a table mapping program counters to function names.\nThe requested program counters can be provided via GET + query parameters,\nor POST + body parameters. Program counters shall be space delimited.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof program counters mapping to function names",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug\nLooks up the program counters listed in the request,\nresponding with a table mapping program counters to function names.\nThe requested program counters can be provided via GET + query parameters,\nor POST + body parameters. Program counters shall be space delimited.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof program counters mapping to function names",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/threadcreate": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get pprof stack traces that led to the creation of new OS threads",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/debug/pprof/trace": {
|
|
"get": {
|
|
"description": "Only available, when server was started with WOODPECKER_LOG_LEVEL=debug\nAfter you get the profile file, use the go tool pprof command to investigate the profile.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Process profiling and debugging"
|
|
],
|
|
"summary": "Get a trace of execution of the current program",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "You can specify the duration in the seconds GET parameter.",
|
|
"name": "seconds",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/healthz": {
|
|
"get": {
|
|
"description": "If everything is fine, just a 204 will be returned, a 500 signals server state is unhealthy.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Health information",
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/hook": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Incoming webhook from forge",
|
|
"parameters": [
|
|
{
|
|
"description": "the webhook payload; forge is automatically detected",
|
|
"name": "hook",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/log-level": {
|
|
"get": {
|
|
"description": "Endpoint returns the current logging level. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Current log level",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"log-level": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Endpoint sets the current logging level. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Set log level",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the new log level, one of \u003cdebug,trace,info,warn,error,fatal,panic,disabled\u003e",
|
|
"name": "log-level",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"log-level": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"log-level": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/org/lookup/{org_full_name}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Lookup organization by full-name",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the organizations full-name / slug",
|
|
"name": "org_full_name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Org"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs": {
|
|
"get": {
|
|
"description": "Returns all registered orgs in the system. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Orgs"
|
|
],
|
|
"summary": "Get all orgs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Org"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs/{id}": {
|
|
"delete": {
|
|
"description": "Deletes the given org. Requires admin rights.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Orgs"
|
|
],
|
|
"summary": "Delete an org",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs/{org_id}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization"
|
|
],
|
|
"summary": "Get organization by id",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the organziation's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Org"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs/{org_id}/permissions": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization permissions"
|
|
],
|
|
"summary": "Get the permissions of the current user in the given organization",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the organziation's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/OrgPerm"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs/{org_id}/secrets": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization secrets"
|
|
],
|
|
"summary": "Get the organization secret list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization secrets"
|
|
],
|
|
"summary": "Persist/create an organization secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the new secret",
|
|
"name": "secretData",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/orgs/{org_id}/secrets/{secret}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization secrets"
|
|
],
|
|
"summary": "Get the named organization secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Organization secrets"
|
|
],
|
|
"summary": "Delete the named secret from an organization",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Organization secrets"
|
|
],
|
|
"summary": "Update an organization secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the org's id",
|
|
"name": "org_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the update secret data",
|
|
"name": "secretData",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pipelines": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipeline queues"
|
|
],
|
|
"summary": "List pipeline queues",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Feed"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/info": {
|
|
"get": {
|
|
"description": "TODO: link the InfoT response object - this is blocked, until the ` + "`" + `swaggo/swag` + "`" + ` tool dependency is v1.18.12 or newer",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipeline queues"
|
|
],
|
|
"summary": "Get pipeline queue information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/norunningpipelines": {
|
|
"get": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipeline queues"
|
|
],
|
|
"summary": "Block til pipeline queue has a running item",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/pause": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipeline queues"
|
|
],
|
|
"summary": "Pause a pipeline queue",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/resume": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipeline queues"
|
|
],
|
|
"summary": "Resume a pipeline queue",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "List all repositories on the server. Requires admin rights.",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "only list active repos",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Activate a repository",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the id of a repository at the forge",
|
|
"name": "forge_remote_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/lookup/{repo_full_name}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Get repository by full-name",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the repository full-name / slug",
|
|
"name": "repo_full_name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/repair": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Repair all repositories on the server. Requires admin rights.",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Get repository information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Delete a repository",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Change a repository",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the repository's information",
|
|
"name": "repo",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/RepoPatch"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/branches": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Get repository branches",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/chown": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Change a repository's owner, to the one holding the access token",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/cron": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Get the cron job list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Persist/creat a cron job",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the new cron job",
|
|
"name": "cronJob",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/cron/{cron}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Get a cron job by id",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the cron job id",
|
|
"name": "cron",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Start a cron job now",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the cron job id",
|
|
"name": "cron",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Delete a cron job by id",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the cron job id",
|
|
"name": "cron",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository cron jobs"
|
|
],
|
|
"summary": "Update a cron job",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the cron job id",
|
|
"name": "cron",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the cron job data",
|
|
"name": "cronJob",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Cron"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/logs/{number}": {
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipeline logs"
|
|
],
|
|
"summary": "Deletes log",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/logs/{number}/{stepID}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipeline logs"
|
|
],
|
|
"summary": "Log information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the step id",
|
|
"name": "stepID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/LogEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/move": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Move a repository to a new owner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the username to move the repository to",
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/permissions": {
|
|
"get": {
|
|
"description": "The repository permission, according to the used access token.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Repository permission information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Perm"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Get pipelines, current running and past ones",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Run/trigger a pipelines",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the options for the pipeline to run",
|
|
"name": "options",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/PipelineOptions"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines/{number}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Pipeline information by number",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline, OR 'latest'",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Restarts a pipeline optional with altered event, deploy or environment",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Restart a pipeline",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "override the event type",
|
|
"name": "event",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "override the target deploy value",
|
|
"name": "deploy_to",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines/{number}/approve": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Start pipelines in gated repos",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines/{number}/cancel": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Cancels a pipeline",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines/{number}/config": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Pipeline configuration",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Config"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pipelines/{number}/decline": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Pipelines"
|
|
],
|
|
"summary": "Decline pipelines in gated repos",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "number",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pipeline"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/pull_requests": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "List active pull requests",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/PullRequest"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/registry": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository registries"
|
|
],
|
|
"summary": "Get the registry list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository registries"
|
|
],
|
|
"summary": "Persist/create a registry",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the new registry data",
|
|
"name": "registry",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/registry/{registry}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository registries"
|
|
],
|
|
"summary": "Get a named registry",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the registry name",
|
|
"name": "registry",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repository registries"
|
|
],
|
|
"summary": "Delete a named registry",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the registry name",
|
|
"name": "registry",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository registries"
|
|
],
|
|
"summary": "Update a named registry",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the registry name",
|
|
"name": "registry",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the attributes for the registry",
|
|
"name": "registryData",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Registry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/repair": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"summary": "Repair a repository",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/secrets": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository secrets"
|
|
],
|
|
"summary": "Get the secret list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository secrets"
|
|
],
|
|
"summary": "Persist/create a secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the new secret",
|
|
"name": "secret",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/repos/{repo_id}/secrets/{secretName}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository secrets"
|
|
],
|
|
"summary": "Get a named secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret name",
|
|
"name": "secretName",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Repository secrets"
|
|
],
|
|
"summary": "Delete a named secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret name",
|
|
"name": "secretName",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Repository secrets"
|
|
],
|
|
"summary": "Update a named secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret name",
|
|
"name": "secretName",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the secret itself",
|
|
"name": "secret",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/secrets": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Secrets"
|
|
],
|
|
"summary": "Get the global secret list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Secrets"
|
|
],
|
|
"summary": "Persist/create a global secret",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the secret object data",
|
|
"name": "secret",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/secrets/{secret}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Secrets"
|
|
],
|
|
"summary": "Get a global secret by name",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Secrets"
|
|
],
|
|
"summary": "Delete a global secret by name",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Secrets"
|
|
],
|
|
"summary": "Update a global secret by name",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the secret's name",
|
|
"name": "secret",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the secret's data",
|
|
"name": "secretData",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Secret"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/signature/public-key": {
|
|
"get": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Get server's signature public key",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stream/events": {
|
|
"get": {
|
|
"description": "event source streaming for compatibility with quic and http2",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Events"
|
|
],
|
|
"summary": "Event stream",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stream/logs/{repo_id}/{pipeline}/{stepID}": {
|
|
"get": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Pipeline logs"
|
|
],
|
|
"summary": "Log stream",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "the repository id",
|
|
"name": "repo_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the number of the pipeline",
|
|
"name": "pipeline",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "the step id",
|
|
"name": "stepID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Returns the currently authenticated user.",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/feed": {
|
|
"get": {
|
|
"description": "Feed entries can be used to display information on the latest builds.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "A feed entry for a build.",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/Feed"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/repos": {
|
|
"get": {
|
|
"description": "Retrieve the currently authenticated User's Repository list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Get user's repos",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "query all repos, including inactive ones",
|
|
"name": "all",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/token": {
|
|
"post": {
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Return the token of the current user as string",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Reset's the current personal access token of the user and returns a new one.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"summary": "Reset a token",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"description": "Returns all registered, active users in the system. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Get all users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "for response pagination, page offset number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "for response pagination, max items per page",
|
|
"name": "perPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a new user account with the specified external login. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Create a user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the user's data",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{login}": {
|
|
"get": {
|
|
"description": "Returns a user with the specified login name. Requires admin rights.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Get a user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the user's login name",
|
|
"name": "login",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Deletes the given user. Requires admin rights.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Delete a user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the user's login name",
|
|
"name": "login",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Changes the data of an existing user. Requires admin rights.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Change a user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cpersonal access token\u003e",
|
|
"description": "Insert your personal access token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "the user's login name",
|
|
"name": "login",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "the user's data",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version": {
|
|
"get": {
|
|
"description": "Endpoint returns the server version and build information.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"System"
|
|
],
|
|
"summary": "Get version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Agent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"backend": {
|
|
"type": "string"
|
|
},
|
|
"capacity": {
|
|
"type": "integer"
|
|
},
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_contact": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"no_schedule": {
|
|
"type": "boolean"
|
|
},
|
|
"owner_id": {
|
|
"type": "integer"
|
|
},
|
|
"platform": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"updated": {
|
|
"type": "integer"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Cron": {
|
|
"type": "object",
|
|
"properties": {
|
|
"branch": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "integer"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"next_exec": {
|
|
"type": "integer"
|
|
},
|
|
"repo_id": {
|
|
"type": "integer"
|
|
},
|
|
"schedule": {
|
|
"description": "@weekly,\t3min, ...",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Feed": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"type": "string"
|
|
},
|
|
"author_avatar": {
|
|
"type": "string"
|
|
},
|
|
"author_email": {
|
|
"type": "string"
|
|
},
|
|
"branch": {
|
|
"type": "string"
|
|
},
|
|
"commit": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "integer"
|
|
},
|
|
"event": {
|
|
"type": "string"
|
|
},
|
|
"finished_at": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"number": {
|
|
"type": "integer"
|
|
},
|
|
"ref": {
|
|
"type": "string"
|
|
},
|
|
"refspec": {
|
|
"type": "string"
|
|
},
|
|
"remote": {
|
|
"type": "string"
|
|
},
|
|
"repo_id": {
|
|
"type": "integer"
|
|
},
|
|
"started_at": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"LogEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"line": {
|
|
"type": "integer"
|
|
},
|
|
"step_id": {
|
|
"type": "integer"
|
|
},
|
|
"time": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/LogEntryType"
|
|
}
|
|
}
|
|
},
|
|
"LogEntryType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
],
|
|
"x-enum-varnames": [
|
|
"LogEntryStdout",
|
|
"LogEntryStderr",
|
|
"LogEntryExitCode",
|
|
"LogEntryMetadata",
|
|
"LogEntryProgress"
|
|
]
|
|
},
|
|
"Org": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_user": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"OrgPerm": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"type": "boolean"
|
|
},
|
|
"member": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Perm": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"type": "boolean"
|
|
},
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"pull": {
|
|
"type": "boolean"
|
|
},
|
|
"push": {
|
|
"type": "boolean"
|
|
},
|
|
"synced": {
|
|
"type": "integer"
|
|
},
|
|
"updated": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"Pipeline": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"type": "string"
|
|
},
|
|
"author_avatar": {
|
|
"type": "string"
|
|
},
|
|
"author_email": {
|
|
"type": "string"
|
|
},
|
|
"branch": {
|
|
"type": "string"
|
|
},
|
|
"changed_files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"clone_url": {
|
|
"type": "string"
|
|
},
|
|
"commit": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "integer"
|
|
},
|
|
"deploy_to": {
|
|
"type": "string"
|
|
},
|
|
"enqueued_at": {
|
|
"type": "integer"
|
|
},
|
|
"errors": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/errors.PipelineError"
|
|
}
|
|
},
|
|
"event": {
|
|
"$ref": "#/definitions/WebhookEvent"
|
|
},
|
|
"finished_at": {
|
|
"type": "integer"
|
|
},
|
|
"forge_url": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"number": {
|
|
"type": "integer"
|
|
},
|
|
"parent": {
|
|
"type": "integer"
|
|
},
|
|
"pr_labels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"ref": {
|
|
"type": "string"
|
|
},
|
|
"refspec": {
|
|
"type": "string"
|
|
},
|
|
"reviewed_at": {
|
|
"type": "integer"
|
|
},
|
|
"reviewed_by": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"description": "uses reported user for webhooks and name of cron for cron pipelines",
|
|
"type": "string"
|
|
},
|
|
"started_at": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/StatusValue"
|
|
},
|
|
"timestamp": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "integer"
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"workflows": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Workflow"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PipelineOptions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"branch": {
|
|
"type": "string"
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PullRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"index": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Registry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Repo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"allow_pr": {
|
|
"type": "boolean"
|
|
},
|
|
"avatar_url": {
|
|
"type": "string"
|
|
},
|
|
"cancel_previous_pipeline_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookEvent"
|
|
}
|
|
},
|
|
"clone_url": {
|
|
"type": "string"
|
|
},
|
|
"clone_url_ssh": {
|
|
"type": "string"
|
|
},
|
|
"config_file": {
|
|
"type": "string"
|
|
},
|
|
"default_branch": {
|
|
"type": "string"
|
|
},
|
|
"forge_remote_id": {
|
|
"description": "ForgeRemoteID is the unique identifier for the repository on the forge.",
|
|
"type": "string"
|
|
},
|
|
"forge_url": {
|
|
"type": "string"
|
|
},
|
|
"full_name": {
|
|
"type": "string"
|
|
},
|
|
"gated": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"netrc_only_trusted": {
|
|
"type": "boolean"
|
|
},
|
|
"org_id": {
|
|
"type": "integer"
|
|
},
|
|
"owner": {
|
|
"type": "string"
|
|
},
|
|
"pr_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"private": {
|
|
"type": "boolean"
|
|
},
|
|
"scm": {
|
|
"$ref": "#/definitions/SCMKind"
|
|
},
|
|
"timeout": {
|
|
"type": "integer"
|
|
},
|
|
"trusted": {
|
|
"type": "boolean"
|
|
},
|
|
"visibility": {
|
|
"$ref": "#/definitions/RepoVisibility"
|
|
}
|
|
}
|
|
},
|
|
"RepoPatch": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allow_pr": {
|
|
"type": "boolean"
|
|
},
|
|
"cancel_previous_pipeline_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookEvent"
|
|
}
|
|
},
|
|
"config_file": {
|
|
"type": "string"
|
|
},
|
|
"gated": {
|
|
"type": "boolean"
|
|
},
|
|
"netrc_only_trusted": {
|
|
"type": "boolean"
|
|
},
|
|
"timeout": {
|
|
"type": "integer"
|
|
},
|
|
"trusted": {
|
|
"type": "boolean"
|
|
},
|
|
"visibility": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"RepoVisibility": {
|
|
"type": "string",
|
|
"enum": [
|
|
"public",
|
|
"private",
|
|
"internal"
|
|
],
|
|
"x-enum-varnames": [
|
|
"VisibilityPublic",
|
|
"VisibilityPrivate",
|
|
"VisibilityInternal"
|
|
]
|
|
},
|
|
"SCMKind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"git",
|
|
"hg",
|
|
"fossil",
|
|
"perforce"
|
|
],
|
|
"x-enum-varnames": [
|
|
"RepoGit",
|
|
"RepoHg",
|
|
"RepoFossil",
|
|
"RepoPerforce"
|
|
]
|
|
},
|
|
"Secret": {
|
|
"type": "object",
|
|
"properties": {
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/WebhookEvent"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"type": "integer"
|
|
},
|
|
"repo_id": {
|
|
"type": "integer"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"StatusValue": {
|
|
"type": "string",
|
|
"enum": [
|
|
"skipped",
|
|
"pending",
|
|
"running",
|
|
"success",
|
|
"failure",
|
|
"killed",
|
|
"error",
|
|
"blocked",
|
|
"declined",
|
|
"created"
|
|
],
|
|
"x-enum-comments": {
|
|
"StatusBlocked": "waiting for approval",
|
|
"StatusCreated": "created / internal use only",
|
|
"StatusDeclined": "blocked and declined",
|
|
"StatusError": "error with the config / while parsing / some other system problem",
|
|
"StatusFailure": "failed to finish (exit code != 0)",
|
|
"StatusKilled": "killed by user",
|
|
"StatusPending": "pending to be executed",
|
|
"StatusRunning": "currently running",
|
|
"StatusSkipped": "skipped as another step failed",
|
|
"StatusSuccess": "successfully finished"
|
|
},
|
|
"x-enum-varnames": [
|
|
"StatusSkipped",
|
|
"StatusPending",
|
|
"StatusRunning",
|
|
"StatusSuccess",
|
|
"StatusFailure",
|
|
"StatusKilled",
|
|
"StatusError",
|
|
"StatusBlocked",
|
|
"StatusDeclined",
|
|
"StatusCreated"
|
|
]
|
|
},
|
|
"Step": {
|
|
"type": "object",
|
|
"properties": {
|
|
"end_time": {
|
|
"type": "integer"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"exit_code": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"pid": {
|
|
"type": "integer"
|
|
},
|
|
"pipeline_id": {
|
|
"type": "integer"
|
|
},
|
|
"ppid": {
|
|
"type": "integer"
|
|
},
|
|
"start_time": {
|
|
"type": "integer"
|
|
},
|
|
"state": {
|
|
"$ref": "#/definitions/StatusValue"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/StepType"
|
|
},
|
|
"uuid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"StepType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"clone",
|
|
"service",
|
|
"plugin",
|
|
"commands",
|
|
"cache"
|
|
],
|
|
"x-enum-varnames": [
|
|
"StepTypeClone",
|
|
"StepTypeService",
|
|
"StepTypePlugin",
|
|
"StepTypeCommands",
|
|
"StepTypeCache"
|
|
]
|
|
},
|
|
"Task": {
|
|
"type": "object",
|
|
"properties": {
|
|
"agent_id": {
|
|
"type": "integer"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"dep_status": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/StatusValue"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"run_on": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"User": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"description": "Admin indicates the user is a system administrator.\n\nNOTE: If the username is part of the WOODPECKER_ADMIN\nenvironment variable, this value will be set to true on login.",
|
|
"type": "boolean"
|
|
},
|
|
"avatar_url": {
|
|
"description": "the avatar url for this user.",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"description": "Email is the email address for this user.\n\nrequired: true",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"description": "the id for this user.\n\nrequired: true",
|
|
"type": "integer"
|
|
},
|
|
"login": {
|
|
"description": "Login is the username for this user.\n\nrequired: true",
|
|
"type": "string"
|
|
},
|
|
"org_id": {
|
|
"description": "OrgID is the of the user as model.Org.",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"WebhookEvent": {
|
|
"type": "string",
|
|
"enum": [
|
|
"push",
|
|
"pull_request",
|
|
"pull_request_closed",
|
|
"tag",
|
|
"deployment",
|
|
"cron",
|
|
"manual"
|
|
],
|
|
"x-enum-varnames": [
|
|
"EventPush",
|
|
"EventPull",
|
|
"EventPullClosed",
|
|
"EventTag",
|
|
"EventDeploy",
|
|
"EventCron",
|
|
"EventManual"
|
|
]
|
|
},
|
|
"errors.PipelineError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"is_warning": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/errors.PipelineErrorType"
|
|
}
|
|
}
|
|
},
|
|
"errors.PipelineErrorType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"linter",
|
|
"deprecation",
|
|
"compiler",
|
|
"generic"
|
|
],
|
|
"x-enum-comments": {
|
|
"PipelineErrorTypeCompiler": "some error with the config semantics",
|
|
"PipelineErrorTypeDeprecation": "using some deprecated feature",
|
|
"PipelineErrorTypeGeneric": "some generic error",
|
|
"PipelineErrorTypeLinter": "some error with the config syntax"
|
|
},
|
|
"x-enum-varnames": [
|
|
"PipelineErrorTypeLinter",
|
|
"PipelineErrorTypeDeprecation",
|
|
"PipelineErrorTypeCompiler",
|
|
"PipelineErrorTypeGeneric"
|
|
]
|
|
},
|
|
"model.Workflow": {
|
|
"type": "object",
|
|
"properties": {
|
|
"agent_id": {
|
|
"type": "integer"
|
|
},
|
|
"children": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Step"
|
|
}
|
|
},
|
|
"end_time": {
|
|
"type": "integer"
|
|
},
|
|
"environ": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"pid": {
|
|
"type": "integer"
|
|
},
|
|
"pipeline_id": {
|
|
"type": "integer"
|
|
},
|
|
"platform": {
|
|
"type": "string"
|
|
},
|
|
"start_time": {
|
|
"type": "integer"
|
|
},
|
|
"state": {
|
|
"$ref": "#/definitions/StatusValue"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "",
|
|
Description: "",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|