{ "openapi": "3.0.0", "info": { "title": "public/portworx/platform/project/apiv1/project.proto", "version": "version not set" }, "tags": [ { "name": "ProjectService" } ], "paths": { "/core/v1/projects": { "get": { "summary": "List API lists all the projects for a Tenant (Organization)", "operationId": "ProjectService_ListProjects", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListProjectsResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "tenantId", "description": "Tenant (Organization) id for which projects to be listed.", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "respData", "description": "Response data flags for listing projects.\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": "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": "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": [ "ProjectService" ] } }, "/core/v1/projects/{meta.uid}": { "put": { "summary": "Update project api updates a project meta.", "operationId": "ProjectService_UpdateProject", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Project" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "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/ProjectServiceUpdateProjectBody" } } }, "required": true }, "tags": [ "ProjectService" ] } }, "/core/v1/projects/{projectId}": { "get": { "summary": "Get project apis returns a requested project.", "operationId": "ProjectService_GetProject", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Project" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "projectId", "description": "Project id.", "in": "path", "required": true, "schema": { "type": "string" } } ], "tags": [ "ProjectService" ] }, "delete": { "summary": "Deletes a project and its associated resources.", "operationId": "ProjectService_DeleteProject", "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": "projectId", "description": "ID of the project which needs to be deleted.", "in": "path", "required": true, "schema": { "type": "string" } } ], "tags": [ "ProjectService" ] } }, "/core/v1/projects/{projectId}:associate": { "put": { "summary": "AssociateResources will append the supplied resources to existing infra resources of a given project config.", "operationId": "ProjectService_AssociateResources", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Project" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "projectId", "description": "ID of the project.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectServiceAssociateResourcesBody" } } }, "required": true }, "tags": [ "ProjectService" ] } }, "/core/v1/projects/{projectId}:disassociate": { "put": { "summary": "DisassociateResource will remove the infra resources supplied in the request from the project config.", "operationId": "ProjectService_DisassociateResources", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Project" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "projectId", "description": "ID of the project from which infra resources to be disassociated.", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectServiceDisassociateResourcesBody" } } }, "required": true }, "tags": [ "ProjectService" ] } }, "/core/v1/projects:search": { "post": { "summary": "List API lists all the projects for a Tenant (Organization)", "operationId": "ProjectService_ListProjects2", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListProjectsResponse" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1ListProjectsRequest" } } }, "description": "ListProjectsRequest is the request message to the ListProjects API\nand it takes the multiple selector details for which the projects visible to the caller\nwill be returned.", "required": true }, "tags": [ "ProjectService" ] } }, "/core/v1/tenants/{tenantId}/projects": { "post": { "summary": "Create project api creates a project under a given Tenant (Organization).", "operationId": "ProjectService_CreateProject", "responses": { "200": { "description": "A successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1Project" } } } }, "default": { "description": "An unexpected error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/googlerpcStatus" } } } } }, "parameters": [ { "name": "tenantId", "description": "The parent Tenant (Organization) under which project will be created", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectServiceCreateProjectBody" } } }, "required": true }, "tags": [ "ProjectService" ] } } }, "components": { "schemas": { "ProjectServiceAssociateResourcesBody": { "type": "object", "properties": { "infraResource": { "$ref": "#/components/schemas/v1Resources" } }, "description": "Request for updating a project with infra resource." }, "ProjectServiceCreateProjectBody": { "type": "object", "properties": { "project": { "$ref": "#/components/schemas/v1Project" } }, "description": "Request to create a project." }, "ProjectServiceDisassociateResourcesBody": { "type": "object", "properties": { "infraResource": { "$ref": "#/components/schemas/v1Resources" } }, "description": "Request to disassociate infra resource from the project configuration." }, "ProjectServiceUpdateProjectBody": { "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 project.", "title": "Metadata of the project." } }, "description": "Request to update a project meta." }, "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." }, "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." }, "googlerpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/protobufAny" } } } }, "projectv1Status": { "type": "object", "properties": { "reason": { "type": "string", "description": "Textual information for the current state of the project." }, "phase": { "$ref": "#/components/schemas/v1PhaseType" }, "associatedResources": { "type": "object", "additionalProperties": { "type": "integer", "format": "int32" }, "title": "Map of infra resources and their count, associated to the project.\nie.\n{\n \"key\": \"namespaces\",\n \"value\": 2\n}" } }, "description": "Status represents the current state of the project." }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "v1ApplicationResources": { "type": "object", "properties": { "pdsResources": { "$ref": "#/components/schemas/v1PDSResources" } }, "description": "ApplicationsResources clubs applications and their generated resources." }, "v1Config": { "type": "object", "properties": { "infraResources": { "$ref": "#/components/schemas/v1Resources" }, "applicationsResources": { "$ref": "#/components/schemas/v1ApplicationResources" } }, "description": "Configuration represents the associated resource details for project." }, "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." }, "v1ListProjectsRequest": { "type": "object", "properties": { "tenantId": { "type": "string", "description": "Tenant (Organization) id for which projects to be listed." }, "infraResourceSelector": { "$ref": "#/components/schemas/v1ResourceSelector" }, "labelSelector": { "$ref": "#/components/schemas/v1Selector" }, "fieldSelector": { "$ref": "#/components/schemas/v1Selector" }, "respData": { "$ref": "#/components/schemas/v1RespData" }, "pagination": { "$ref": "#/components/schemas/v1PageBasedPaginationRequest" }, "sort": { "$ref": "#/components/schemas/v1Sort" } }, "description": "ListProjectsRequest is the request message to the ListProjects API\nand it takes the multiple selector details for which the projects visible to the caller\nwill be returned." }, "v1ListProjectsResponse": { "type": "object", "properties": { "projects": { "type": "array", "items": { "$ref": "#/components/schemas/v1Project" }, "description": "Requested projects." }, "pagination": { "$ref": "#/components/schemas/v1PageBasedPaginationResponse" } }, "description": "ListProjectsResponse is the response message to the ListProjects API and contains\nthe list of projects visible to the caller." }, "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." }, "v1PDSResources": { "type": "object", "properties": { "dataServiceDeployments": { "type": "array", "items": { "type": "string" }, "description": "Resource ids of deployments." }, "backupConfigs": { "type": "array", "items": { "type": "string" }, "description": "Resource ids of backup configs." }, "restores": { "type": "array", "items": { "type": "string" }, "description": "Resource ids of restores." } }, "description": "PDSResource clubs resources generated by pds application." }, "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." }, "v1PhaseType": { "type": "string", "enum": [ "TYPE_UNSPECIFIED", "ACTIVE", "DELETE_PENDING", "DELETE_IN_PROGRESS" ], "default": "TYPE_UNSPECIFIED", "description": "Type of phase the project is in currently should be one of the below.\n\n - TYPE_UNSPECIFIED: Unspecified, do not use.\n - ACTIVE: The project is in use and active.\n - DELETE_PENDING: Deletion of project has not started.\n - DELETE_IN_PROGRESS: Deletion of the project is scheduled and in progress." }, "v1Project": { "type": "object", "properties": { "meta": { "$ref": "#/components/schemas/v1Meta" }, "config": { "$ref": "#/components/schemas/v1Config" }, "status": { "$ref": "#/components/schemas/projectv1Status" } }, "description": "Project is a logical collection of objects and/or services that users can access." }, "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." }, "v1Resources": { "type": "object", "properties": { "clusters": { "type": "array", "items": { "type": "string" }, "description": "Clusters represents the target k8s clusters." }, "namespaces": { "type": "array", "items": { "type": "string" }, "description": "Namespaces created in k8s cluster to provide the logical isolation." }, "credentials": { "type": "array", "items": { "type": "string" }, "description": "Credentials required to connect to a backup target." }, "backupLocations": { "type": "array", "items": { "type": "string" }, "description": "Backup locations where backups can be placed." }, "templates": { "type": "array", "items": { "type": "string" }, "description": "Templates can be used by applications to manage its resources." }, "backupPolicies": { "type": "array", "items": { "type": "string" }, "description": "Backup Policies where the schedules are defined." } }, "description": "Infra resource are platform managed resources, used by associated applications." }, "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/v1SelectorFilter" }, "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." }, "v1SelectorFilter": { "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." }, "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." } } } }