{ "consumes": [ "application/json" ], "definitions": { "contributorsv1ListResponse": { "properties": { "contributors": { "items": { "$ref": "#/definitions/v1Contributor", "type": "object" }, "type": "array" } }, "type": "object" }, "contributorsv1UpdateResponse": { "type": "object" }, "licensesv1ListResponse": { "properties": { "licenses": { "items": { "$ref": "#/definitions/v1License", "type": "object" }, "type": "array" } }, "type": "object" }, "packagesv1CreateResponse": { "type": "object" }, "packagesv1DeleteResponse": { "type": "object" }, "packagesv1ListResponse": { "properties": { "packages": { "items": { "$ref": "#/definitions/v1Package", "type": "object" }, "type": "array" } }, "type": "object" }, "packagesv1ReadResponse": { "properties": { "package": { "$ref": "#/definitions/v1Package" } }, "type": "object" }, "packagesv1UpdateResponse": { "type": "object" }, "productsv1CreateRequest": { "properties": { "product": { "$ref": "#/definitions/v1Product" } }, "type": "object" }, "productsv1CreateResponse": { "type": "object" }, "productsv1DeleteResponse": { "type": "object" }, "productsv1ListResponse": { "properties": { "products": { "items": { "$ref": "#/definitions/v1Product", "type": "object" }, "type": "array" } }, "type": "object" }, "productsv1ReadResponse": { "properties": { "product": { "$ref": "#/definitions/v1Product" } }, "type": "object" }, "productsv1UpdateResponse": { "type": "object" }, "protobufAny": { "additionalProperties": {}, "properties": { "@type": { "type": "string" } }, "type": "object" }, "rpcStatus": { "properties": { "code": { "format": "int32", "type": "integer" }, "details": { "items": { "$ref": "#/definitions/protobufAny", "type": "object" }, "type": "array" }, "message": { "type": "string" } }, "type": "object" }, "tokensv1CreateRequest": { "properties": { "token": { "$ref": "#/definitions/v1Token" } }, "type": "object" }, "tokensv1CreateResponse": { "properties": { "token": { "type": "string" } }, "type": "object" }, "tokensv1DeleteResponse": { "type": "object" }, "tokensv1ListResponse": { "properties": { "tokens": { "items": { "$ref": "#/definitions/v1Token", "type": "object" }, "type": "array" } }, "type": "object" }, "v1AuthenticateRequest": { "properties": { "clientId": { "title": "required for a handful of workflows\ncan also come from the basic auth header", "type": "string" }, "clientSecret": { "type": "string" }, "code": { "title": "grant_type=authorization_code", "type": "string" }, "codeVerifier": { "type": "string" }, "grantType": { "title": "grant_type = client_credentials, refresh_token, password, authorization_code, license", "type": "string" }, "license": { "title": "grant_type=license", "type": "string" }, "password": { "type": "string" }, "redirectUri": { "type": "string" }, "refreshToken": { "title": "grant_type=refresh_token", "type": "string" }, "scope": { "type": "string" }, "username": { "title": "grant_type=password", "type": "string" } }, "type": "object" }, "v1AuthenticateResponse": { "properties": { "accessToken": { "type": "string" }, "error": { "type": "string" }, "errorDescription": { "type": "string" }, "errorUri": { "type": "string" }, "expiresIn": { "format": "int32", "type": "integer" }, "refreshToken": { "type": "string" }, "scope": { "type": "string" }, "tokenType": { "type": "string" } }, "type": "object" }, "v1CancelResponse": { "type": "object" }, "v1Contributor": { "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "productId": { "type": "string" }, "role": { "$ref": "#/definitions/v1Role" } }, "type": "object" }, "v1CurrentResponse": { "properties": { "birthdate": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "familyName": { "type": "string" }, "gender": { "type": "string" }, "givenName": { "type": "string" }, "locale": { "type": "string" }, "middleName": { "type": "string" }, "name": { "type": "string" }, "nickname": { "type": "string" }, "phoneNumber": { "type": "string" }, "phoneNumberVerified": { "type": "boolean" }, "picture": { "type": "string" }, "preferredUsername": { "type": "string" }, "profile": { "type": "string" }, "subject": { "type": "string" }, "updatedAt": { "format": "int32", "type": "integer" }, "website": { "type": "string" }, "zoneinfo": { "type": "string" } }, "type": "object" }, "v1InviteResponse": { "type": "object" }, "v1License": { "properties": { "id": { "type": "string" }, "packageName": { "type": "string" }, "productId": { "type": "string" } }, "type": "object" }, "v1Package": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "productId": { "type": "string" } }, "type": "object" }, "v1Product": { "properties": { "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "v1PurchaseRequest": { "properties": { "license": { "$ref": "#/definitions/v1License" } }, "type": "object" }, "v1PurchaseResponse": { "type": "object" }, "v1RevokeResponse": { "type": "object" }, "v1Role": { "default": "ROLE_UNSPECIFIED", "enum": [ "ROLE_UNSPECIFIED", "ROLE_OWNER" ], "type": "string" }, "v1SignupRequest": { "properties": { "email": { "type": "string" }, "password": { "type": "string" } }, "type": "object" }, "v1SignupResponse": { "type": "object" }, "v1Token": { "properties": { "expiresAt": { "type": "string" }, "expiresIn": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "noExpiry": { "title": "one of", "type": "boolean" }, "scopes": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "info": { "title": "The Licensing API", "version": "v1.0" }, "paths": { "/v1/licenses": { "get": { "operationId": "LicenseService_List", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/licensesv1ListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "LicenseService" ] }, "post": { "operationId": "LicenseService_Purchase", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v1PurchaseRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1PurchaseResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "LicenseService" ] } }, "/v1/licenses/{licenseId}": { "delete": { "operationId": "LicenseService_Cancel", "parameters": [ { "in": "path", "name": "licenseId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CancelResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "LicenseService" ] } }, "/v1/products": { "get": { "operationId": "ProductService_List", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/productsv1ListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ProductService" ] }, "post": { "operationId": "ProductService_Create", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/productsv1CreateRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/productsv1CreateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ProductService" ] } }, "/v1/products/{contributor.productId}/contributors": { "post": { "operationId": "ContributorService_Invite", "parameters": [ { "in": "path", "name": "contributor.productId", "required": true, "type": "string" }, { "in": "body", "name": "body", "required": true, "schema": { "properties": { "contributor": { "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "role": { "$ref": "#/definitions/v1Role" } }, "type": "object" } }, "type": "object" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1InviteResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ContributorService" ] } }, "/v1/products/{contributor.productId}/contributors/{contributor.id}": { "post": { "operationId": "ContributorService_Update", "parameters": [ { "in": "path", "name": "contributor.productId", "required": true, "type": "string" }, { "in": "path", "name": "contributor.id", "required": true, "type": "string" }, { "in": "body", "name": "body", "required": true, "schema": { "properties": { "contributor": { "properties": { "email": { "type": "string" }, "role": { "$ref": "#/definitions/v1Role" } }, "type": "object" } }, "type": "object" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/contributorsv1UpdateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ContributorService" ] } }, "/v1/products/{package.productId}/packages": { "post": { "operationId": "PackageService_Create", "parameters": [ { "in": "path", "name": "package.productId", "required": true, "type": "string" }, { "in": "body", "name": "body", "required": true, "schema": { "properties": { "package": { "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "type": "object" } }, "type": "object" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/packagesv1CreateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "PackageService" ] } }, "/v1/products/{package.productId}/packages/{package.name}": { "post": { "operationId": "PackageService_Update", "parameters": [ { "in": "path", "name": "package.productId", "required": true, "type": "string" }, { "in": "path", "name": "package.name", "required": true, "type": "string" }, { "in": "body", "name": "body", "required": true, "schema": { "properties": { "package": { "properties": { "id": { "type": "string" } }, "type": "object" } }, "type": "object" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/packagesv1UpdateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "PackageService" ] } }, "/v1/products/{product.id}": { "post": { "operationId": "ProductService_Update", "parameters": [ { "in": "path", "name": "product.id", "required": true, "type": "string" }, { "in": "body", "name": "body", "required": true, "schema": { "properties": { "product": { "properties": { "description": { "type": "string" }, "name": { "type": "string" } }, "type": "object" } }, "type": "object" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/productsv1UpdateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ProductService" ] } }, "/v1/products/{productId}": { "delete": { "operationId": "ProductService_Delete", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/productsv1DeleteResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ProductService" ] }, "get": { "operationId": "ProductService_Read", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/productsv1ReadResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ProductService" ] } }, "/v1/products/{productId}/contributors": { "get": { "operationId": "ContributorService_List", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/contributorsv1ListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ContributorService" ] } }, "/v1/products/{productId}/contributors/{contributorId}": { "delete": { "operationId": "ContributorService_Revoke", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" }, { "in": "path", "name": "contributorId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1RevokeResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "ContributorService" ] } }, "/v1/products/{productId}/packages": { "get": { "operationId": "PackageService_List", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/packagesv1ListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "PackageService" ] } }, "/v1/products/{productId}/packages/{packageName}": { "delete": { "operationId": "PackageService_Delete", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" }, { "in": "path", "name": "packageName", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/packagesv1DeleteResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "PackageService" ] }, "get": { "operationId": "PackageService_Read", "parameters": [ { "in": "path", "name": "productId", "required": true, "type": "string" }, { "in": "path", "name": "packageName", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/packagesv1ReadResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "PackageService" ] } }, "/v1/token": { "post": { "operationId": "TokenService_Authenticate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v1AuthenticateRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1AuthenticateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "TokenService" ] } }, "/v1/tokens": { "get": { "operationId": "TokenService_List", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/tokensv1ListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "TokenService" ] }, "post": { "operationId": "TokenService_Create", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/tokensv1CreateRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/tokensv1CreateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "TokenService" ] } }, "/v1/tokens/{tokenId}": { "delete": { "operationId": "TokenService_Delete", "parameters": [ { "in": "path", "name": "tokenId", "required": true, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/tokensv1DeleteResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "TokenService" ] } }, "/v1/users": { "post": { "operationId": "UserService_Signup", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v1SignupRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1SignupResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "UserService" ] } }, "/v1/users/current": { "get": { "operationId": "UserService_Current", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CurrentResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "UserService" ] } } }, "produces": [ "application/json" ], "swagger": "2.0", "tags": [ { "name": "ContributorService" }, { "name": "LicenseService" }, { "name": "PackageService" }, { "name": "ProductService" }, { "name": "TokenService" }, { "name": "UserService" } ] }