0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/swagger/swagger.json
Ramkumar Chinchani 8f3d7d3719 swagger: rename 'docs/' to 'swagger/'
Use 'docs/' for zot-related documentation.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-10-21 13:46:14 -07:00

705 lines
No EOL
24 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "APIs for Open Container Initiative Distribution Specification",
"title": "Open Container Initiative Distribution Specification",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "v0.1.0-dev"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/v2/": {
"get": {
"description": "Check if this API version is supported",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check API support",
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/_catalog": {
"get": {
"description": "List all image repositories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image repositories",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.RepositoryList"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads": {
"post": {
"description": "Create a new image blob/layer upload",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Create image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-0"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/uploads/{uuid}": {
"get": {
"description": "Get an image's blob/layer upload given a uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "no content",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update and finish an image's blob/layer upload given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "query",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"patch": {
"description": "Resume an image's blob/layer upload given an uuid",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Resume image blob/layer upload",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "upload uuid",
"name": "uuid",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
},
"headers": {
"Location": {
"type": "string",
"description": "/v2/{name}/blobs/uploads/{uuid}"
},
"Range": {
"type": "string",
"description": "bytes=0-128"
}
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"416": {
"description": "range not satisfiable",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/blobs/{digest}": {
"get": {
"description": "Get an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.layer.v1.tar+gzip"
],
"summary": "Get image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
}
}
}
},
"delete": {
"description": "Delete an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "accepted",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's blob/layer given a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image blob/layer",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "blob/layer digest",
"name": "digest",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
}
}
}
},
"/v2/{name}/manifests/{reference}": {
"get": {
"description": "Get an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/vnd.oci.image.manifest.v1+json"
],
"summary": "Get image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageManifest"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Update image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"type": "string"
}
},
"400": {
"description": "bad request",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
}
}
},
"head": {
"description": "Check an image's manifest given a reference or a digest",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Check image manifest",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image reference or digest",
"name": "reference",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
},
"headers": {
"api.DistContentDigestKey": {
"type": "object",
"description": "OK"
}
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/{name}/tags/list": {
"get": {
"description": "List all image tags in a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "List image tags",
"parameters": [
{
"type": "string",
"description": "test",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"$ref": "#/definitions/api.ImageTags"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"api.ImageManifest": {
"type": "object"
},
"api.ImageTags": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"api.RepositoryList": {
"type": "object",
"properties": {
"repositories": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}