{ "openapi": "3.0.0", "info": { "title": "public/portworx/platform/template/apiv1/template.proto", "version": "version not set" }, "tags": [ { "name": "TemplateService" } ], "paths": { "/core/v1/templates": { "get": { "summary": "List API lists all the templates for a Tenant (Organization)", "operationId": "TemplateService_ListTemplates", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListTemplatesResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "tenantId", "description": "Tenant (Organization) ID for which the credentials will be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "pagination.pageNumber", "description": "Page number is the page number to return based on the size.", "in": "query", "required": false, "schema": { "type": "string", "format": "int64" } }, { "name": "pagination.pageSize", "description": "Page size is the maximum number of records to include per page.", "in": "query", "required": false, "schema": { "type": "string", "format": "int64" } }, { "name": "respData", "description": "Response data flags for listing templates.\n\n - RESP_DATA_UNSPECIFIED: RespData Unspecified. complete resource will be populated.\n - INDEX: only uid, name, labels should be populated.\n - LITE: only meta data should be populated.\n - FULL: complete resource should be populated.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "RESP_DATA_UNSPECIFIED", "INDEX", "LITE", "FULL" ], "default": "RESP_DATA_UNSPECIFIED" } }, { "name": "sort.sortBy", "description": "Name of the attribute to sort results by.\n\n - FIELD_UNSPECIFIED: Unspecified, do not use.\n - NAME: Sorting based on the name of the resource.\n - CREATED_AT: Sorting on create time of the resource.\n - UPDATED_AT: Sorting on update time of the resource.\n - PHASE: Sorting on phase of the resource.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "FIELD_UNSPECIFIED", "NAME", "CREATED_AT", "UPDATED_AT", "PHASE" ], "default": "FIELD_UNSPECIFIED" } }, { "name": "sort.sortOrder", "description": "Order of sorting to be applied on requested list.\nIf sort_by having some value and sort_order is not provided, by default ascending order will be used to sort the list.\n\n - VALUE_UNSPECIFIED: Unspecified, do not use.\n - ASC: Sort order ascending.\n - DESC: Sort order descending.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "VALUE_UNSPECIFIED", "ASC", "DESC" ], "default": "VALUE_UNSPECIFIED" } } ], "tags": [ "TemplateService" ] } }, "/core/v1/templates/{id}": { "get": { "summary": "Get API returns the template details sans the actual credentials.", "operationId": "TemplateService_GetTemplate", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Template" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "id", "description": "ID of the template instance.", "in": "path", "required": true, "schema": { "type": "string" } } ], "tags": [ "TemplateService" ] }, "delete": { "summary": "Delete API deletes the templates.", "operationId": "TemplateService_DeleteTemplate", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "type": "object", "properties": {} } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "id", "description": "ID of the template instance.", "in": "path", "required": true, "schema": { "type": "string" } } ], "tags": [ "TemplateService" ] } }, "/core/v1/templates/{template.meta.uid}": { "put": { "summary": "Update API updates a template.", "operationId": "TemplateService_UpdateTemplate", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Template" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "template.meta.uid", "description": "UID of the resource of the format -.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateServiceUpdateTemplateBody" } } }, "required": true }, "tags": [ "TemplateService" ] } }, "/core/v1/templates:search": { "post": { "summary": "List API lists all the templates for a Tenant (Organization)", "operationId": "TemplateService_ListTemplates2", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListTemplatesResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListTemplatesRequest" } } }, "description": "Request to list the templates for a Tenant (Organization).", "required": true }, "tags": [ "TemplateService" ] } }, "/core/v1/tenants/{tenantId}/templates": { "post": { "summary": "Create API creates a set of templates for a Tenant (Organization).", "operationId": "TemplateService_CreateTemplate", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Template" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "tenantId", "description": "The parent Tenant (Organization) id under which template will be created.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Template" } } }, "description": "Information about the template instance that needs to be created.", "required": true }, "tags": [ "TemplateService" ] } } }, "components": { "schemas": { "ResourceSelectorResourceFilter": { "type": "object", "properties": { "resourceType": { "$ref": "#/components/schemas/v1InfraResourceType" }, "op": { "$ref": "#/components/schemas/SelectorOperator" }, "values": { "type": "array", "items": { "type": "string" }, "description": "Value of key,value pair against which filtering needs to be performs." } }, "description": "ResourceFilter is filter for a given resource type." }, "SelectorFilter": { "type": "object", "properties": { "key": { "type": "string", "description": "Key of key,value pair against which filtering needs to be performs." }, "op": { "$ref": "#/components/schemas/SelectorOperator" }, "values": { "type": "array", "items": { "type": "string" }, "description": "Value of key,value pair against which filtering needs to be performs if operator is EXIST, value should be an empty array." } }, "description": "Filter for a given key." }, "SelectorOperator": { "type": "string", "enum": [ "OPERATOR_UNSPECIFIED", "IN", "NOT_IN", "LIKE" ], "default": "OPERATOR_UNSPECIFIED", "description": "Operator specifies the relationship between the provided (key,value) pairs in the response.\n\n - OPERATOR_UNSPECIFIED: Unspecified, do not use.\n - IN: IN specifies that the key should be associated with atleast 1 of the element in value list.\n - NOT_IN: NOT_IN specifies that the key should not be associated with any of the element in value list.\n - LIKE: LIKE specified that the key should be of a specified pattern" }, "SortByField": { "type": "string", "enum": [ "FIELD_UNSPECIFIED", "NAME", "CREATED_AT", "UPDATED_AT", "PHASE" ], "default": "FIELD_UNSPECIFIED", "description": "Field names for sorting the list of resources.\n\n - FIELD_UNSPECIFIED: Unspecified, do not use.\n - NAME: Sorting based on the name of the resource.\n - CREATED_AT: Sorting on create time of the resource.\n - UPDATED_AT: Sorting on update time of the resource.\n - PHASE: Sorting on phase of the resource." }, "StatusPhase": { "type": "string", "enum": [ "PHASE_UNSPECIFIED", "ACTIVE", "DEPRECATED" ], "default": "PHASE_UNSPECIFIED", "description": "Different phases of template instance.\n\n - PHASE_UNSPECIFIED: Phase unspecified.\n - ACTIVE: Template instance is active.\n - DEPRECATED: Template instance is deprecated." }, "TemplateServiceUpdateTemplateBody": { "type": "object", "properties": { "template": { "type": "object", "properties": { "meta": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the resource." }, "description": { "type": "string", "description": "Description of the resource." }, "resourceVersion": { "type": "string", "description": "A string that identifies the version of this object that can be used by clients to determine when objects have changed.\nThis value must be passed unmodified back to the server by the client." }, "createTime": { "type": "string", "format": "date-time", "description": "Creation time of the object.", "readOnly": true }, "updateTime": { "type": "string", "format": "date-time", "description": "Update time of the object.", "readOnly": true }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Labels to apply to the object." }, "annotations": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Annotations for the object." }, "parentReference": { "$ref": "#/components/schemas/v1Reference" }, "resourceNames": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource names holds the mapping between the resource IDs and its display name which will be consumed by the frontend.", "readOnly": true } }, "description": "Metadata of the resource.", "title": "Metadata of the resource." }, "config": { "$ref": "#/components/schemas/v1Config" }, "status": { "$ref": "#/components/schemas/templatev1Status" } }, "description": "Desired template configuration.", "title": "Desired template configuration." } }, "description": "Request to update a template instance." }, "googlerpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/protobufAny" } } } }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "protobufNullValue": { "type": "string", "enum": [ "NULL_VALUE" ], "default": "NULL_VALUE", "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "templatev1Status": { "type": "object", "properties": { "phase": { "$ref": "#/components/schemas/StatusPhase" } }, "description": "Status provides the current status of template." }, "v1Config": { "type": "object", "properties": { "kind": { "type": "string", "description": "Kind to the template instance used to identify the template schema." }, "semanticVersion": { "type": "string", "description": "Semantic version of the template used to identify template schema.\nand latest revision for the given template instance kind." }, "revisionUid": { "type": "string", "description": "Uid of the schema used to create the template instance." }, "templateValues": { "type": "object", "description": "Key, value pairs of the template instance." } }, "description": "Config provides configuration data of the template instance." }, "v1InfraResourceType": { "type": "string", "enum": [ "TYPE_UNSPECIFIED", "ACCOUNT", "TENANT", "PROJECT", "TARGET_CLUSTER", "NAMESPACE", "CREDENTIAL", "BACKUP_LOCATION", "BACKUP_POLICY", "TEMPLATE", "INVITATION" ], "default": "TYPE_UNSPECIFIED", "description": "Type of the resource.\n\n - TYPE_UNSPECIFIED: Unspecified, do not use.\n - ACCOUNT: Currently supported infra resources.\nInfra resource of type account.\n - TENANT: Infra resource of type Tenant (Organization).\n - PROJECT: Infra resource of type projects.\n - TARGET_CLUSTER: Infra resource target cluster.\n - NAMESPACE: Infra resource of type namespace.\n - CREDENTIAL: Infra resource of type credential.\n - BACKUP_LOCATION: Infra resource of type backup location.\n - BACKUP_POLICY: Infra resource of type backup policy.\n - TEMPLATE: Infra resource of type template.\n - INVITATION: Infra resource of type invitation." }, "v1ListTemplatesRequest": { "type": "object", "properties": { "tenantId": { "type": "string", "description": "Tenant (Organization) ID for which the credentials will be listed." }, "pagination": { "$ref": "#/components/schemas/v1PageBasedPaginationRequest" }, "labelSelector": { "$ref": "#/components/schemas/v1Selector" }, "fieldSelector": { "$ref": "#/components/schemas/v1Selector" }, "infraResourceSelector": { "$ref": "#/components/schemas/v1ResourceSelector" }, "respData": { "$ref": "#/components/schemas/v1RespData" }, "sort": { "$ref": "#/components/schemas/v1Sort" } }, "description": "Request to list the templates for a Tenant (Organization)." }, "v1ListTemplatesResponse": { "type": "object", "properties": { "templates": { "type": "array", "items": { "$ref": "#/components/schemas/v1Template" }, "description": "The list of templates scoped to a Tenant (Organization)." }, "pagination": { "$ref": "#/components/schemas/v1PageBasedPaginationResponse" } }, "description": "Response of list templates." }, "v1Meta": { "type": "object", "properties": { "uid": { "type": "string", "description": "UID of the resource of the format -." }, "name": { "type": "string", "description": "Name of the resource." }, "description": { "type": "string", "description": "Description of the resource." }, "resourceVersion": { "type": "string", "description": "A string that identifies the version of this object that can be used by clients to determine when objects have changed.\nThis value must be passed unmodified back to the server by the client." }, "createTime": { "type": "string", "format": "date-time", "description": "Creation time of the object.", "readOnly": true }, "updateTime": { "type": "string", "format": "date-time", "description": "Update time of the object.", "readOnly": true }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Labels to apply to the object." }, "annotations": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Annotations for the object." }, "parentReference": { "$ref": "#/components/schemas/v1Reference" }, "resourceNames": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource names holds the mapping between the resource IDs and its display name which will be consumed by the frontend.", "readOnly": true } }, "description": "Meta holds general resource metadata." }, "v1PageBasedPaginationRequest": { "type": "object", "properties": { "pageNumber": { "type": "string", "format": "int64", "description": "Page number is the page number to return based on the size." }, "pageSize": { "type": "string", "format": "int64", "description": "Page size is the maximum number of records to include per page." } }, "description": "Request parameters for page-based pagination." }, "v1PageBasedPaginationResponse": { "type": "object", "properties": { "totalRecords": { "type": "string", "format": "int64", "description": "Total records without pagination available in the dataset." }, "currentPage": { "type": "string", "format": "int64", "description": "Current page number for this paginated response." }, "pageSize": { "type": "string", "format": "int64", "description": "Page size used for pagination." }, "totalPages": { "type": "string", "format": "int64", "description": "Total pages based on the page_size provided in the request." }, "nextPage": { "type": "string", "format": "int64", "description": "Next page if available in the dataset, -1 if unavailable." }, "prevPage": { "type": "string", "format": "int64", "description": "Previous page if available in the dataset, -1 if unavailable." } }, "description": "Metadata related to page based pagination for paginated API responses." }, "v1Reference": { "type": "object", "properties": { "type": { "type": "string", "description": "API group of the resource." }, "version": { "type": "string", "description": "Version of the API." }, "uid": { "type": "string", "description": "UID of the resource." } }, "description": "Reference identifies the resource type, version of the uid and the resource." }, "v1ResourceSelector": { "type": "object", "properties": { "infraResourceFilters": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceSelectorResourceFilter" }, "description": "Infra_resource_filters is the list of all filters that should be applied to fetch data related to infra resource.\nEach filter will have AND relationship." } }, "description": "ResourceSelector is used to query resources using the associated infra resources." }, "v1RespData": { "type": "string", "enum": [ "RESP_DATA_UNSPECIFIED", "INDEX", "LITE", "FULL" ], "default": "RESP_DATA_UNSPECIFIED", "description": "RespData provides flags which provides info about the fields that should be populated in the response.\n\n - RESP_DATA_UNSPECIFIED: RespData Unspecified. complete resource will be populated.\n - INDEX: only uid, name, labels should be populated.\n - LITE: only meta data should be populated.\n - FULL: complete resource should be populated." }, "v1Selector": { "type": "object", "properties": { "filters": { "type": "array", "items": { "$ref": "#/components/schemas/SelectorFilter" }, "description": "FilterList is the list of all filters that should be applied." } }, "description": "Selector is used to query resources using the associated labels or field names." }, "v1Sort": { "type": "object", "properties": { "sortBy": { "$ref": "#/components/schemas/SortByField" }, "sortOrder": { "$ref": "#/components/schemas/v1SortOrderValue" } }, "description": "The details of the attribute for which the requested list of resource to be sorted." }, "v1SortOrderValue": { "type": "string", "enum": [ "VALUE_UNSPECIFIED", "ASC", "DESC" ], "default": "VALUE_UNSPECIFIED", "description": "Value of sort order for the list of resources.\n\n - VALUE_UNSPECIFIED: Unspecified, do not use.\n - ASC: Sort order ascending.\n - DESC: Sort order descending." }, "v1Template": { "type": "object", "properties": { "meta": { "$ref": "#/components/schemas/v1Meta" }, "config": { "$ref": "#/components/schemas/v1Config" }, "status": { "$ref": "#/components/schemas/templatev1Status" } }, "description": "Resource representing a template." } } } }