diff --git a/examples/basic/chronicle.yaml b/examples/basic/chronicle.yaml index c75d3a9c..03948dd5 100644 --- a/examples/basic/chronicle.yaml +++ b/examples/basic/chronicle.yaml @@ -6,6 +6,23 @@ theme: search: enabled: true placeholder: Search documentation... +api: + - name: Petstore + spec: ./petstore.json + basePath: /apis + server: + url: https://petstore.swagger.io/v2 + description: Petstore Server + auth: + type: apiKey + header: api_key + placeholder: "Enter your API key" + - name: Frontier + spec: ./frontier.yaml + basePath: /apis + server: + url: https://frontier.raystack.org + description: Frontier Server footer: copyright: "© 2024 Chronicle. All rights reserved." links: diff --git a/examples/basic/frontier.yaml b/examples/basic/frontier.yaml new file mode 100644 index 00000000..be99b745 --- /dev/null +++ b/examples/basic/frontier.yaml @@ -0,0 +1,15515 @@ +swagger: "2.0" +info: + title: Frontier Administration API + description: The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows. + version: 0.2.0 + contact: + name: Raystack Foundation + url: https://raystack.org/ + email: hello@raystack.org + license: + name: Apache 2.0 + url: https://github.com/raystack/frontier/blob/main/LICENSE +tags: + - name: AdminService + - name: FrontierService + - name: User + - name: Group + - name: Organization + - name: Project + - name: Relation + - name: Resource + - name: Policy + - name: Role + - name: Permission +host: 127.0.0.1:7400 +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /.well-known/jwks.json: + get: + summary: Get well known JWKs + operationId: FrontierService_GetJWKs2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetJWKsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Authz + /v1beta1/admin/billing/accounts: + get: + summary: List all billing accounts + description: Lists all the billing accounts from all the organizations in a Frontier instance. It can be filtered by organization. + operationId: AdminService_ListAllBillingAccounts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllBillingAccountsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: query + required: false + type: string + tags: + - Billing + /v1beta1/admin/billing/invoices: + get: + summary: List all invoices + description: Lists all the invoices from all the organizations in a Frontier instance. It can be filtered by organization. + operationId: AdminService_ListAllInvoices + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: query + required: false + type: string + - name: page_size + description: The maximum number of invoices to return per page. The default is 50. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + tags: + - Invoice + /v1beta1/admin/billing/invoices/generate: + post: + summary: Trigger invoice generation + description: Triggers the creation of credit overdraft invoices for all billing accounts. + operationId: AdminService_GenerateInvoices + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GenerateInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1GenerateInvoicesRequest' + tags: + - Invoice + /v1beta1/admin/check: + post: + summary: Check + description: Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account. + operationId: AdminService_CheckFederatedResourcePermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CheckFederatedResourcePermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CheckFederatedResourcePermissionRequest' + tags: + - Authz + /v1beta1/admin/groups: + get: + summary: List all groups + description: Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state. + operationId: AdminService_ListGroups + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListGroupsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization id to filter by. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + tags: + - Group + /v1beta1/admin/invoices/search: + post: + summary: Search invoices across all organizations + operationId: AdminService_SearchInvoices + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - invoice + /v1beta1/admin/organizations: + get: + summary: List all organizations + description: Lists all the organizations in a Frontier instance. It can be filtered by user and state. + operationId: AdminService_ListAllOrganizations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllOrganizationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: user_id + description: The user id to filter by. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + - name: page_size + description: The maximum number of organizations to return per page. The default is 50. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + tags: + - Organization + post: + summary: Create organization as superadmin + operationId: AdminService_AdminCreateOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AdminCreateOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1AdminCreateOrganizationRequestOrganizationRequestBody' + tags: + - Organization + /v1beta1/admin/organizations/{id}/invoices/search: + post: + summary: Search organization invoices + operationId: AdminService_SearchOrganizationInvoices + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{id}/projects/export: + get: + summary: Export organization projects + description: Export organization projects with user IDs + operationId: AdminService_ExportOrganizationProjects + responses: + "200": + description: A successful response.(streaming responses) + schema: + type: string + format: binary + properties: {} + title: Free form byte stream + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + produces: + - text/csv + /v1beta1/admin/organizations/{id}/projects/search: + post: + summary: Search organization projects + operationId: AdminService_SearchOrganizationProjects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationProjectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{id}/serviceuser_credentials/search: + post: + summary: Search organization service user credentials + operationId: AdminService_SearchOrganizationServiceUserCredentials + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationServiceUserCredentialsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{id}/serviceusers/search: + post: + summary: Search organization service users + operationId: AdminService_SearchOrganizationServiceUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationServiceUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{id}/tokens/export: + get: + summary: Export organization tokens + description: Export organization tokens + operationId: AdminService_ExportOrganizationTokens + responses: + "200": + description: A successful response.(streaming responses) + schema: + type: string + format: binary + properties: {} + title: Free form byte stream + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + produces: + - text/csv + /v1beta1/admin/organizations/{id}/tokens/search: + post: + summary: Search organization tokens + operationId: AdminService_SearchOrganizationTokens + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationTokensResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{id}/users/export: + get: + summary: Export organization users + description: Export organization user their role details + operationId: AdminService_ExportOrganizationUsers + responses: + "200": + description: A successful response.(streaming responses) + schema: + type: string + format: binary + properties: {} + title: Free form byte stream + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + produces: + - text/csv + /v1beta1/admin/organizations/{id}/users/search: + post: + summary: Search organization users + operationId: AdminService_SearchOrganizationUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/organizations/{org_id}/billing/{billing_id}/checkouts: + post: + summary: Checkout a product or subscription + description: Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine. + operationId: AdminService_DelegatedCheckout + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DelegatedCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to update the subscription for + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + subscription_body: + $ref: '#/definitions/v1beta1CheckoutSubscriptionBody' + title: Subscription to create + product_body: + $ref: '#/definitions/v1beta1CheckoutProductBody' + title: Product to buy + tags: + - Checkout + /v1beta1/admin/organizations/{org_id}/billing/{billing_id}/usage/{usage_id}/revert: + post: + summary: Revert billing usage + description: Revert billing usage for a billing account. + operationId: AdminService_RevertBillingUsage + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RevertBillingUsageResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + - name: usage_id + description: usage id to revert, a usage can only be allowed to revert once + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + project_id: + type: string + title: DEPRECATED + amount: + type: string + format: int64 + title: amount should be equal or less than the usage amount + tags: + - Billing + /v1beta1/admin/organizations/{org_id}/billing/{id}/details: + get: + summary: Get billing account details + description: Get billing account details that can be updated. + operationId: AdminService_GetBillingAccountDetails + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetBillingAccountDetailsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Billing + put: + summary: Update billing account details + description: Update billing account details. + operationId: AdminService_UpdateBillingAccountDetails + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateBillingAccountDetailsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + credit_min: + type: string + format: int64 + title: |- + credit_min is the minimum credit limit for the billing account + default is 0, negative numbers work as overdraft, positive + numbers work as minimum purchase limit + due_in_days: + type: string + format: int64 + title: |- + due_in_days is the number of days after the invoice finalization + that it will be considered overdue, if set to 0, the customer will + be charged immediately + tags: + - Billing + /v1beta1/admin/organizations/{org_id}/billing/{id}/limits: + put: + summary: Update billing account limits + description: Update billing account limits. + operationId: AdminService_UpdateBillingAccountLimits + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateBillingAccountLimitsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + credit_min: + type: string + format: int64 + title: |- + credit_min is the minimum credit limit for the billing account + default is 0, negative numbers work as overdraft, positive + numbers work as minimum purchase limit + tags: + - Billing + deprecated: true + /v1beta1/admin/organizations/{org_id}/billing/checkouts: + post: + summary: Checkout a product or subscription + description: Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine. + operationId: AdminService_DelegatedCheckout2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DelegatedCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + billing_id: + type: string + title: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to update the subscription for + subscription_body: + $ref: '#/definitions/v1beta1CheckoutSubscriptionBody' + title: Subscription to create + product_body: + $ref: '#/definitions/v1beta1CheckoutProductBody' + title: Product to buy + tags: + - Checkout + /v1beta1/admin/organizations/{org_id}/kyc: + put: + summary: Set KYC information of an organization + description: Set KYC information of an organization using ID or name + operationId: AdminService_SetOrganizationKyc + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SetOrganizationKycResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + status: + type: boolean + link: + type: string + tags: + - OrganizationKyc + /v1beta1/admin/organizations/export: + get: + summary: Export organizations + description: Export organization with demographic properties and billing plan details + operationId: AdminService_ExportOrganizations + responses: + "200": + description: A successful response.(streaming responses) + schema: + type: string + format: binary + properties: {} + title: Free form byte stream + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Organization + produces: + - text/csv + /v1beta1/admin/organizations/kyc: + get: + summary: List KYC information of all organizations + description: List KYC information of all organization + operationId: AdminService_ListOrganizationsKyc + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationsKycResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - OrganizationKyc + /v1beta1/admin/organizations/search: + post: + summary: Search organizations + description: Search organization based on org demographic properties and billing plan details + operationId: AdminService_SearchOrganizations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchOrganizationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Organization + /v1beta1/admin/platform/users: + get: + summary: List platform users + description: Lists all the users added to the platform. + operationId: AdminService_ListPlatformUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListPlatformUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Platform + post: + summary: Add platform user + description: Adds a user to the platform. + operationId: AdminService_AddPlatformUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AddPlatformUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1AddPlatformUserRequest' + tags: + - Platform + /v1beta1/admin/platform/users/remove: + post: + summary: Remove platform user + description: Removes a user from the platform. + operationId: AdminService_RemovePlatformUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RemovePlatformUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RemovePlatformUserRequest' + tags: + - Platform + /v1beta1/admin/projects: + get: + summary: List all projects + description: Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state. + operationId: AdminService_ListProjects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization id to filter by. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + tags: + - Project + /v1beta1/admin/projects/{id}/users/search: + post: + summary: Search Project users + operationId: AdminService_SearchProjectUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchProjectUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Project + /v1beta1/admin/prospects: + post: + summary: Create prospect + description: Create prospect for given email and activity. + operationId: AdminService_CreateProspect + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProspectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateProspectRequest' + tags: + - Prospect + /v1beta1/admin/prospects/{id}: + get: + summary: Get prospect + description: Get prospect by ID + operationId: AdminService_GetProspect + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetProspectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: id of the prospect + in: path + required: true + type: string + tags: + - Prospect + delete: + summary: Delete prospect + description: Delete prospect for given ID + operationId: AdminService_DeleteProspect + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteProspectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: id of the prospect + in: path + required: true + type: string + tags: + - Prospect + put: + summary: Update prospect + description: Update prospect for given ID + operationId: AdminService_UpdateProspect + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateProspectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: id of the prospect + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + name: + type: string + description: full name of the user + email: + type: string + description: email of the user + phone: + type: string + description: phone number of the user + activity: + type: string + description: activity for which user is subscribing, e.g. newsletter, waitlist, blogs etc + status: + $ref: '#/definitions/v1beta1ProspectStatus' + description: subscription status for this activity. Allowed values - 1 for UNSUBSCRIBED; 2 for SUBSCRIBED; + source: + type: string + description: source of this user addition e.g. platform, website, admin etc + verified: + type: boolean + description: verification status of this user addition e.g. true, false + metadata: + type: object + description: additional info as key value pair + required: + - email + - activity + - status + tags: + - Prospect + /v1beta1/admin/prospects/list: + post: + summary: List prospects + description: List prospects and supports filters, sorting and pagination. + operationId: AdminService_ListProspects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProspectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - Prospect + /v1beta1/admin/relations: + get: + summary: List all relations + operationId: AdminService_ListRelations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListRelationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: subject + description: The subject to filter by. + in: query + required: false + type: string + - name: object + description: The object to filter by. + in: query + required: false + type: string + tags: + - Relation + /v1beta1/admin/resources: + get: + summary: List all resources + description: Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace. + operationId: AdminService_ListResources + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListResourcesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: user_id + description: The user id to filter by. + in: query + required: false + type: string + - name: project_id + description: The project id to filter by. + in: query + required: false + type: string + - name: organization_id + description: The organization id to filter by. + in: query + required: false + type: string + - name: namespace + description: The namespace to filter by. + in: query + required: false + type: string + tags: + - Resource + /v1beta1/admin/serviceusers: + get: + summary: List all service users + description: Lists all the service users from all the organizations in a Frontier instance. + operationId: AdminService_ListAllServiceUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllServiceUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - User + /v1beta1/admin/users: + get: + summary: List all users + description: Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. + operationId: AdminService_ListAllUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: page_size + description: The maximum number of users to return per page. The default is 50. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + - name: keyword + description: The keyword to search for. It can be a user's name, email,metadata or id. + in: query + required: false + type: string + - name: org_id + description: The organization id to filter by. + in: query + required: false + type: string + - name: group_id + description: The group id to filter by. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + tags: + - User + /v1beta1/admin/users/{id}/organizations/search: + post: + summary: Search users organizations + operationId: AdminService_SearchUserOrganizations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchUserOrganizationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: user ID + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - User + /v1beta1/admin/users/{user_id}/organizations/{org_id}/projects: + post: + summary: Search projects of a user within an org + operationId: AdminService_SearchUserProjects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchUserProjectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: user_id + description: user ID + in: path + required: true + type: string + - name: org_id + description: org ID + in: path + required: true + type: string + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - User + /v1beta1/admin/users/export: + get: + summary: Export users + description: Export user with demographic properties and billing plan details + operationId: AdminService_ExportUsers + responses: + "200": + description: A successful response.(streaming responses) + schema: + type: string + format: binary + properties: {} + title: Free form byte stream + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - User + produces: + - text/csv + /v1beta1/admin/users/search: + post: + summary: Search users + description: Search users based on their properties + operationId: AdminService_SearchUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1SearchUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: query + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RQLRequest' + tags: + - User + /v1beta1/admin/users/self: + get: + summary: Get current admin user + description: Returns the current authenticated admin user profile. Returns 403 Forbidden if the user is not an admin. + operationId: AdminService_GetCurrentAdminUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetCurrentAdminUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - User + /v1beta1/admin/webhooks: + get: + summary: List webhooks + description: List all webhooks. + operationId: AdminService_ListWebhooks + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListWebhooksResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Webhook + post: + summary: Create webhook + description: Create a new webhook. + operationId: AdminService_CreateWebhook + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateWebhookResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateWebhookRequest' + tags: + - Webhook + /v1beta1/admin/webhooks/{id}: + delete: + summary: Delete webhook + description: Delete a webhook. + operationId: AdminService_DeleteWebhook + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteWebhookResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The webhook id to delete. + in: path + required: true + type: string + tags: + - Webhook + put: + summary: Update webhook + description: Update a webhook. + operationId: AdminService_UpdateWebhook + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateWebhookResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The webhook id to update. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1WebhookRequestBody' + tags: + - Webhook + /v1beta1/auth: + get: + summary: List authentication strategies + description: Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc + operationId: FrontierService_ListAuthStrategies + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAuthStrategiesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Authn + /v1beta1/auth/callback: + get: + summary: Callback from a strategy + description: Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. + operationId: FrontierService_AuthCallback + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthCallbackResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: strategy_name + description: strategy_name will not be set for oidc but can be utilized for methods like email magic links + in: query + required: false + type: string + - name: state + description: for oidc & magic links + in: query + required: false + type: string + - name: code + in: query + required: false + type: string + - name: state_options + description: |- + state_options has additional configurations for the authentication flow at hand + for example, in case of passkey, it has challenge and public key + in: query + required: false + type: object + tags: + - Authn + post: + summary: Callback from a strategy + description: Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. + operationId: FrontierService_AuthCallback2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthCallbackResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1AuthCallbackRequest' + tags: + - Authn + /v1beta1/auth/jwks: + get: + summary: Get well known JWKs + operationId: FrontierService_GetJWKs + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetJWKsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Authz + /v1beta1/auth/logout: + get: + summary: Logout from a strategy + operationId: FrontierService_AuthLogout + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthLogoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Authn + delete: + summary: Logout from a strategy + operationId: FrontierService_AuthLogout2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthLogoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Authn + /v1beta1/auth/register/{strategy_name}: + get: + summary: Authenticate with a strategy + description: Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. + operationId: FrontierService_Authenticate + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthenticateResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: strategy_name + description: Name of the strategy to use for authentication.
*Example:* `google` + in: path + required: true + type: string + - name: redirect_onstart + description: |- + by default, location redirect header for starting authentication flow if applicable + will be skipped unless this is set to true, useful in browser, same value will + also be returned as endpoint in response anyway + + If set to true, location header will be set for redirect to start auth flow + in: query + required: false + type: boolean + - name: return_to + description: |- + by default, after successful authentication(flow completes) no operation will be performed, + to apply redirection in case of browsers, provide an url that will be used + after authentication where users are sent from frontier. + return_to should be one of the allowed urls configured at instance level + + URL to redirect after successful authentication.
*Example:*`"https://frontier.example.com"` + in: query + required: false + type: string + - name: email + description: |- + email of the user for magic links + + Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org` + in: query + required: false + type: string + - name: callback_url + description: |- + callback_url will be used by strategy as last step to finish authentication flow + in OIDC this host will receive "state" and "code" query params, in case of magic links + this will be the url where user is redirected after clicking on magic link. + For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. + callback_url should be one of the allowed urls configured at instance level + + Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback` + in: query + required: false + type: string + tags: + - Authn + post: + summary: Authenticate with a strategy + description: Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. + operationId: FrontierService_Authenticate2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthenticateResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: strategy_name + description: Name of the strategy to use for authentication.
*Example:* `google` + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + redirect_onstart: + type: boolean + description: If set to true, location header will be set for redirect to start auth flow + title: |- + by default, location redirect header for starting authentication flow if applicable + will be skipped unless this is set to true, useful in browser, same value will + also be returned as endpoint in response anyway + return_to: + type: string + description: URL to redirect after successful authentication.
*Example:*`"https://frontier.example.com"` + title: |- + by default, after successful authentication(flow completes) no operation will be performed, + to apply redirection in case of browsers, provide an url that will be used + after authentication where users are sent from frontier. + return_to should be one of the allowed urls configured at instance level + email: + type: string + description: Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org` + title: email of the user for magic links + callback_url: + type: string + description: Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback` + title: |- + callback_url will be used by strategy as last step to finish authentication flow + in OIDC this host will receive "state" and "code" query params, in case of magic links + this will be the url where user is redirected after clicking on magic link. + For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. + callback_url should be one of the allowed urls configured at instance level + tags: + - Authn + /v1beta1/auth/token: + post: + summary: Generate access token by given credentials + description: Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources. + operationId: FrontierService_AuthToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AuthTokenResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1AuthTokenRequest' + tags: + - Authn + /v1beta1/batchcheck: + post: + summary: Batch check + description: Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts). + operationId: FrontierService_BatchCheckPermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1BatchCheckPermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1BatchCheckPermissionRequest' + tags: + - Authz + /v1beta1/billing/check: + post: + summary: Check credit entitlement + description: Check if a billing account has enough credits to cover the amount. + operationId: FrontierService_CheckCreditEntitlement + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CheckCreditEntitlementResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CheckCreditEntitlementRequest' + tags: + - Entitlement + /v1beta1/billing/features: + get: + summary: List features + description: List all features + operationId: FrontierService_ListFeatures + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListFeaturesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Feature + post: + summary: Create feature + description: Create a new feature for platform. + operationId: FrontierService_CreateFeature + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateFeatureResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateFeatureRequest' + tags: + - Feature + /v1beta1/billing/features/{id}: + get: + summary: Get feature + description: Get a feature by ID. + operationId: FrontierService_GetFeature + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetFeatureResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the feature to get + in: path + required: true + type: string + tags: + - Feature + put: + summary: Update feature + description: Update a feature by ID. + operationId: FrontierService_UpdateFeature + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateFeatureResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the feature to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1FeatureRequestBody' + title: Feature to update + tags: + - Feature + /v1beta1/billing/plans: + get: + summary: List plans + description: List all plans. + operationId: FrontierService_ListPlans + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListPlansResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Plan + post: + summary: Create plan + description: Create a new plan for platform. + operationId: FrontierService_CreatePlan + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreatePlanResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreatePlanRequest' + tags: + - Plan + /v1beta1/billing/plans/{id}: + get: + summary: Get plan + description: Get a plan by ID. + operationId: FrontierService_GetPlan + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetPlanResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the plan to get + in: path + required: true + type: string + tags: + - Plan + put: + summary: Update plan + description: Update a plan by ID. + operationId: FrontierService_UpdatePlan + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdatePlanResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the plan to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1PlanRequestBody' + title: Plan to update + tags: + - Plan + /v1beta1/billing/products: + get: + summary: List products + description: List all products of a platform. + operationId: FrontierService_ListProducts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProductsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Product + post: + summary: Create product + description: Create a new product for platform. + operationId: FrontierService_CreateProduct + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProductResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateProductRequest' + tags: + - Product + /v1beta1/billing/products/{id}: + get: + summary: Get product + description: Get a product by ID. + operationId: FrontierService_GetProduct + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetProductResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the product to get + in: path + required: true + type: string + tags: + - Product + put: + summary: Update product + description: Update a product by ID. + operationId: FrontierService_UpdateProduct + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateProductResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: ID of the product to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1ProductRequestBody' + title: Product to update + tags: + - Product + /v1beta1/billing/webhooks/callback/{provider}: + post: + summary: Accept Billing webhook + description: Accepts a Billing webhook and processes it. + operationId: FrontierService_BillingWebhookCallback + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1BillingWebhookCallbackResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: provider + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: string + format: byte + tags: + - Webhook + /v1beta1/check: + post: + summary: Check + description: Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token. + operationId: FrontierService_CheckResourcePermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CheckResourcePermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CheckResourcePermissionRequest' + tags: + - Authz + /v1beta1/groups/{id}/preferences: + get: + summary: List group preferences + description: List a group preferences by ID. + operationId: FrontierService_ListGroupPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListGroupPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Preference + post: + summary: Create group preferences + description: Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores. + operationId: FrontierService_CreateGroupPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateGroupPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + tags: + - Preference + /v1beta1/meta/schemas: + get: + summary: List metaschemas + description: Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc + operationId: FrontierService_ListMetaSchemas + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListMetaSchemasResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - MetaSchema + post: + summary: Create metaschema + description: Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:"user",schema:{"type":"object","properties":{"label":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}}}}` + operationId: FrontierService_CreateMetaSchema + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateMetaSchemaResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1MetaSchemaRequestBody' + tags: + - MetaSchema + /v1beta1/meta/schemas/{id}: + get: + summary: Get metaschema + description: Get a metadata schema by ID. + operationId: FrontierService_GetMetaSchema + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetMetaSchemaResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - MetaSchema + delete: + summary: Delete metaschema + description: Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata). + operationId: FrontierService_DeleteMetaSchema + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteMetaSchemaResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - MetaSchema + put: + summary: Update metaschema + description: Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:"user",schema:{"type":"object","properties":{"label":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}}}}` + operationId: FrontierService_UpdateMetaSchema + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateMetaSchemaResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1MetaSchemaRequestBody' + tags: + - MetaSchema + /v1beta1/namespaces: + get: + summary: Get all namespaces + description: Returns the list of all namespaces in a Frontier instance + operationId: FrontierService_ListNamespaces + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListNamespacesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Namespace + /v1beta1/namespaces/{id}: + get: + summary: Get namespace + description: Returns a namespace by ID + operationId: FrontierService_GetNamespace + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetNamespaceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Namespace + /v1beta1/organizations: + get: + summary: List organizations + description: Returns a list of organizations. It can be filtered by userID or organization state. + operationId: FrontierService_ListOrganizations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: user_id + description: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be `enabled` or `disabled`. + in: query + required: false + type: string + - name: page_size + description: The maximum number of users to return per page. The default is 1000. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + tags: + - Organization + post: + summary: Create organization + operationId: FrontierService_CreateOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/frontierv1beta1OrganizationRequestBody' + tags: + - Organization + /v1beta1/organizations/{id}: + get: + summary: Get organization + description: Get organization by ID or name + operationId: FrontierService_GetOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + delete: + summary: Delete organization + description: Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier. + operationId: FrontierService_DeleteOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + put: + summary: Update organization + description: Update organization by ID + operationId: FrontierService_UpdateOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/frontierv1beta1OrganizationRequestBody' + tags: + - Organization + /v1beta1/organizations/{id}/admins: + get: + summary: List organization admins + description: Returns a list admins of an organization + operationId: FrontierService_ListOrganizationAdmins + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationAdminsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + /v1beta1/organizations/{id}/disable: + post: + summary: Disable organization + description: Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources. + operationId: FrontierService_DisableOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DisableOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Organization + /v1beta1/organizations/{id}/enable: + post: + summary: Enable organization + description: Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources. + operationId: FrontierService_EnableOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1EnableOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Organization + /v1beta1/organizations/{id}/preferences: + get: + summary: List organization preferences + description: List an organization preferences by ID. + operationId: FrontierService_ListOrganizationPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Preference + post: + summary: Create organization preferences + description: Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores. + operationId: FrontierService_CreateOrganizationPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateOrganizationPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + tags: + - Preference + /v1beta1/organizations/{id}/projects: + get: + summary: Get organization projects + description: Get all projects that belong to an organization + operationId: FrontierService_ListOrganizationProjects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationProjectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: state + description: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled` + in: query + required: false + type: string + - name: with_member_count + in: query + required: false + type: boolean + tags: + - Organization + /v1beta1/organizations/{id}/serviceusers: + get: + summary: List organization service users + operationId: FrontierService_ListOrganizationServiceUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationServiceUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Organization + /v1beta1/organizations/{id}/users: + get: + summary: List organization users + operationId: FrontierService_ListOrganizationUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: permission_filter + in: query + required: false + type: string + - name: with_roles + in: query + required: false + type: boolean + - name: role_filters + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Organization + post: + summary: Add organization user + description: Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists + operationId: FrontierService_AddOrganizationUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AddOrganizationUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + user_ids: + type: array + items: + type: string + description: List of user IDs to be added to the organization. + tags: + - Organization + /v1beta1/organizations/{id}/users/{user_id}: + delete: + summary: Remove organization user + description: Remove a user from an organization + operationId: FrontierService_RemoveOrganizationUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RemoveOrganizationUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: user_id + in: path + required: true + type: string + tags: + - Organization + /v1beta1/organizations/{org_id}/billing: + get: + summary: List billing accounts + description: List billing accounts of an organization. + operationId: FrontierService_ListBillingAccounts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListBillingAccountsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: ID of the organization to list billing accounts for + in: path + required: true + type: string + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Billing + post: + summary: Create billing account + description: Create a new billing account for an organization. + operationId: FrontierService_CreateBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: ID of the organization to create the billing account for + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1BillingAccountRequestBody' + description: Billing account to create. + offline: + type: boolean + title: Offline billing account don't get registered with billing provider + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{billing_id}/check: + post: + summary: Check entitlement + description: Check if a billing account is entitled to a feature. + operationId: FrontierService_CheckFeatureEntitlement + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CheckFeatureEntitlementResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + project_id: + type: string + title: DEPRECATED + feature: + type: string + title: feature or product name + tags: + - Entitlement + /v1beta1/organizations/{org_id}/billing/{billing_id}/checkouts: + get: + summary: List checkouts + description: List all checkouts of a billing account. + operationId: FrontierService_ListCheckouts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListCheckoutsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to get the subscriptions for + in: path + required: true + type: string + tags: + - Checkout + post: + summary: Checkout a product or subscription + description: Checkout a product to buy it one time or start a subscription plan on a billing account. + operationId: FrontierService_CreateCheckout + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to update the subscription for + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + success_url: + type: string + cancel_url: + type: string + subscription_body: + $ref: '#/definitions/v1beta1CheckoutSubscriptionBody' + title: Subscription to create + product_body: + $ref: '#/definitions/v1beta1CheckoutProductBody' + title: Product to buy + setup_body: + $ref: '#/definitions/v1beta1CheckoutSetupBody' + title: Payment method setup + tags: + - Checkout + /v1beta1/organizations/{org_id}/billing/{billing_id}/checkouts/{id}: + get: + summary: Get checkout + description: Get a checkout by ID. + operationId: FrontierService_GetCheckout + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id is not needed, checkout can be fetched by id alone' + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id is not needed, checkout can be fetched by id alone' + in: path + required: true + type: string + - name: id + description: ID of the checkout to get + in: path + required: true + type: string + tags: + - Checkout + /v1beta1/organizations/{org_id}/billing/{billing_id}/debited_transactions_total: + get: + summary: Sum of amount of debited transactions including refunds + description: Sum of amount of debited transactions including refunds + operationId: FrontierService_TotalDebitedTransactions + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1TotalDebitedTransactionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + tags: + - Transaction + /v1beta1/organizations/{org_id}/billing/{billing_id}/invoices: + get: + summary: List invoices + description: List all invoices of a billing account. + operationId: FrontierService_ListInvoices + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + - name: nonzero_amount_only + in: query + required: false + type: boolean + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Invoice + /v1beta1/organizations/{org_id}/billing/{billing_id}/invoices/upcoming: + get: + summary: Get upcoming invoice + description: Get the upcoming invoice of a billing account. + operationId: FrontierService_GetUpcomingInvoice + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetUpcomingInvoiceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + tags: + - Invoice + /v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions: + get: + summary: List subscriptions + description: List subscriptions of a billing account. + operationId: FrontierService_ListSubscriptions + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListSubscriptionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to list subscriptions for + in: path + required: true + type: string + - name: state + description: Filter subscriptions by state + in: query + required: false + type: string + - name: plan + in: query + required: false + type: string + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}: + get: + summary: Get subscription + description: Get a subscription by ID. + operationId: FrontierService_GetSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to get the subscription for + in: path + required: true + type: string + - name: id + description: ID of the subscription to get + in: path + required: true + type: string + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Subscription + put: + summary: Update subscription + description: Update a subscription by ID. + operationId: FrontierService_UpdateSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + in: path + required: true + type: string + - name: id + description: ID of the subscription to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + metadata: + type: object + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}/cancel: + post: + summary: Cancel subscription + description: Cancel a subscription by ID. + operationId: FrontierService_CancelSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CancelSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + in: path + required: true + type: string + - name: id + description: ID of the subscription to cancel + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + immediate: + type: boolean + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}/change: + post: + summary: Change subscription plan + description: Change a subscription plan by ID. + operationId: FrontierService_ChangeSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ChangeSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + in: path + required: true + type: string + - name: id + description: ID of the subscription to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + plan: + type: string + title: |- + plan to change to + deprecated in favor of plan_change + immediate: + type: boolean + title: |- + should the change be immediate or at the end of the current billing period + deprecated in favor of plan_change + plan_change: + $ref: '#/definitions/ChangeSubscriptionRequestPlanChange' + phase_change: + $ref: '#/definitions/ChangeSubscriptionRequestPhaseChange' + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/{billing_id}/transactions: + get: + summary: List billing transactions + description: List all transactions of a billing account. + operationId: FrontierService_ListBillingTransactions + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListBillingTransactionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + - name: since + in: query + required: false + type: string + format: date-time + - name: start_range + in: query + required: false + type: string + format: date-time + - name: end_range + in: query + required: false + type: string + format: date-time + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Transaction + /v1beta1/organizations/{org_id}/billing/{billing_id}/usages: + post: + summary: Create billing usage + description: Report a new billing usage for a billing account. + operationId: FrontierService_CreateBillingUsage + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateBillingUsageResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + project_id: + type: string + title: DEPRECATED + usages: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Usage' + title: Usage to create + tags: + - Usage + /v1beta1/organizations/{org_id}/billing/{id}: + get: + summary: Get billing account + description: Get a billing account by ID. + operationId: FrontierService_GetBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to get + in: path + required: true + type: string + - name: with_payment_methods + in: query + required: false + type: boolean + - name: with_billing_details + in: query + required: false + type: boolean + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Billing + delete: + summary: Delete billing account + description: Delete a billing account by ID. + operationId: FrontierService_DeleteBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to delete + in: path + required: true + type: string + tags: + - Billing + put: + summary: Update billing account + description: Update a billing account by ID. + operationId: FrontierService_UpdateBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1BillingAccountRequestBody' + description: Billing account to update. + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{id}/balance: + get: + summary: Get billing balance + description: Get the balance of a billing account by ID. + operationId: FrontierService_GetBillingBalance + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetBillingBalanceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to get the balance for + in: path + required: true + type: string + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{id}/disable: + post: + summary: Disable billing account + description: Disable a billing account by ID. Disabling a billing account doesn't automatically disable it's active subscriptions. + operationId: FrontierService_DisableBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DisableBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to disable + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{id}/enable: + post: + summary: Enable billing account + description: Enable a billing account by ID. + operationId: FrontierService_EnableBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1EnableBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to enable + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{id}/plans/{plan_id}/trialed: + get: + summary: Has trialed + description: Check if a billing account has trialed. + operationId: FrontierService_HasTrialed + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1HasTrialedResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from plan_id' + in: path + required: true + type: string + - name: id + description: |- + ID of the billing account to check + + DEPRECATED: billing_id will be inferred from plan_id + in: path + required: true + type: string + - name: plan_id + description: ID of the plan to check + in: path + required: true + type: string + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/{id}/register: + post: + summary: Register billing account to provider + description: Register a billing account to a provider if it's not already. + operationId: FrontierService_RegisterBillingAccount + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RegisterBillingAccountResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from billing account id' + in: path + required: true + type: string + - name: id + description: ID of the billing account to register + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Billing + /v1beta1/organizations/{org_id}/billing/checkouts: + get: + summary: List checkouts + description: List all checkouts of a billing account. + operationId: FrontierService_ListCheckouts2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListCheckoutsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to get the subscriptions for + in: query + required: false + type: string + tags: + - Checkout + post: + summary: Checkout a product or subscription + description: Checkout a product to buy it one time or start a subscription plan on a billing account. + operationId: FrontierService_CreateCheckout2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + billing_id: + type: string + title: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to update the subscription for + success_url: + type: string + cancel_url: + type: string + subscription_body: + $ref: '#/definitions/v1beta1CheckoutSubscriptionBody' + title: Subscription to create + product_body: + $ref: '#/definitions/v1beta1CheckoutProductBody' + title: Product to buy + setup_body: + $ref: '#/definitions/v1beta1CheckoutSetupBody' + title: Payment method setup + tags: + - Checkout + /v1beta1/organizations/{org_id}/billing/checkouts/{id}: + get: + summary: Get checkout + description: Get a checkout by ID. + operationId: FrontierService_GetCheckout2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetCheckoutResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id is not needed, checkout can be fetched by id alone' + in: path + required: true + type: string + - name: id + description: ID of the checkout to get + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id is not needed, checkout can be fetched by id alone' + in: query + required: false + type: string + tags: + - Checkout + /v1beta1/organizations/{org_id}/billing/invoices: + get: + summary: List invoices + description: List all invoices of a billing account. + operationId: FrontierService_ListInvoices2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListInvoicesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: query + required: false + type: string + - name: nonzero_amount_only + in: query + required: false + type: boolean + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Invoice + /v1beta1/organizations/{org_id}/billing/invoices/upcoming: + get: + summary: Get upcoming invoice + description: Get the upcoming invoice of a billing account. + operationId: FrontierService_GetUpcomingInvoice2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetUpcomingInvoiceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: query + required: false + type: string + tags: + - Invoice + /v1beta1/organizations/{org_id}/billing/subscriptions: + get: + summary: List subscriptions + description: List subscriptions of a billing account. + operationId: FrontierService_ListSubscriptions2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListSubscriptionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from org_id + ID of the billing account to list subscriptions for + in: query + required: false + type: string + - name: state + description: Filter subscriptions by state + in: query + required: false + type: string + - name: plan + in: query + required: false + type: string + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/subscriptions/{id}: + get: + summary: Get subscription + description: Get a subscription by ID. + operationId: FrontierService_GetSubscription2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: id + description: ID of the subscription to get + in: path + required: true + type: string + - name: billing_id + description: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to get the subscription for + in: query + required: false + type: string + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Subscription + post: + summary: Update subscription + description: Update a subscription by ID. + operationId: FrontierService_UpdateSubscription2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: id + description: ID of the subscription to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + billing_id: + type: string + title: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + metadata: + type: object + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/subscriptions/{id}/cancel: + post: + summary: Cancel subscription + description: Cancel a subscription by ID. + operationId: FrontierService_CancelSubscription2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CancelSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: id + description: ID of the subscription to cancel + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + billing_id: + type: string + title: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + immediate: + type: boolean + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/subscriptions/{id}/change: + post: + summary: Change subscription plan + description: Change a subscription plan by ID. + operationId: FrontierService_ChangeSubscription2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ChangeSubscriptionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: 'DEPRECATED: org_id will be inferred from subscription id' + in: path + required: true + type: string + - name: id + description: ID of the subscription to update + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + billing_id: + type: string + title: |- + DEPRECATED: billing_id will be inferred from subscription id + ID of the billing account to update the subscription for + plan: + type: string + title: |- + plan to change to + deprecated in favor of plan_change + immediate: + type: boolean + title: |- + should the change be immediate or at the end of the current billing period + deprecated in favor of plan_change + plan_change: + $ref: '#/definitions/ChangeSubscriptionRequestPlanChange' + phase_change: + $ref: '#/definitions/ChangeSubscriptionRequestPhaseChange' + tags: + - Subscription + /v1beta1/organizations/{org_id}/billing/transactions: + get: + summary: List billing transactions + description: List all transactions of a billing account. + operationId: FrontierService_ListBillingTransactions2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListBillingTransactionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: billing_id + description: 'DEPRECATED: billing_id will be inferred from org_id' + in: query + required: false + type: string + - name: since + in: query + required: false + type: string + format: date-time + - name: start_range + in: query + required: false + type: string + format: date-time + - name: end_range + in: query + required: false + type: string + format: date-time + - name: expand + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Transaction + /v1beta1/organizations/{org_id}/domains: + get: + summary: List org domains + description: Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation. + operationId: FrontierService_ListOrganizationDomains + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationDomainsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization for which whitelisted domains are to be listed + in: path + required: true + type: string + - name: state + description: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed + in: query + required: false + type: string + tags: + - Organization + post: + summary: Create org domain + description: Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users. + operationId: FrontierService_CreateOrganizationDomain + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateOrganizationDomainResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization for which whitelisted domains are to be added + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + domain: + type: string + description: domain name to be added to the trusted domain list + required: + - domain + tags: + - Organization + /v1beta1/organizations/{org_id}/domains/{id}: + get: + summary: Get org domain + description: Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID + operationId: FrontierService_GetOrganizationDomain + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetOrganizationDomainResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization for which whitelisted domain is to be retrieved + in: path + required: true + type: string + - name: id + description: unique id of the domain to be retrieved + in: path + required: true + type: string + tags: + - Organization + delete: + summary: Delete org domain + description: Remove a domain from the list of an organization's trusted domains list + operationId: FrontierService_DeleteOrganizationDomain + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteOrganizationDomainResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization for which whitelisted domains are to be deleted + in: path + required: true + type: string + - name: id + description: unique id of the domain to be deleted + in: path + required: true + type: string + tags: + - Organization + /v1beta1/organizations/{org_id}/domains/{id}/verify: + post: + summary: Verify org domain + description: Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification. + operationId: FrontierService_VerifyOrganizationDomain + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1VerifyOrganizationDomainResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization for which whitelisted domains are to be verified + in: path + required: true + type: string + - name: id + description: unique id of the domain to be verified + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Organization + /v1beta1/organizations/{org_id}/groups: + get: + summary: List organization groups + description: Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled. + operationId: FrontierService_ListOrganizationGroups + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationGroupsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: state + description: The state of the group to filter by. It can be enabled or disabled. + in: query + required: false + type: string + - name: group_ids + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: with_members + in: query + required: false + type: boolean + - name: with_member_count + in: query + required: false + type: boolean + tags: + - Group + post: + summary: Create group + description: Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups. + operationId: FrontierService_CreateGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the group belongs to. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1GroupRequestBody' + tags: + - Group + /v1beta1/organizations/{org_id}/groups/{id}: + get: + summary: Get group + operationId: FrontierService_GetGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: with_members + in: query + required: false + type: boolean + tags: + - Group + delete: + summary: Delete group + description: Delete an organization group permanently and all of its relations + operationId: FrontierService_DeleteGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Group + put: + summary: Update group + operationId: FrontierService_UpdateGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the group belongs to. + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1GroupRequestBody' + tags: + - Group + /v1beta1/organizations/{org_id}/groups/{id}/disable: + post: + summary: Disable group + description: Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled. + operationId: FrontierService_DisableGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DisableGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Group + /v1beta1/organizations/{org_id}/groups/{id}/enable: + post: + summary: Enable group + description: Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control. + operationId: FrontierService_EnableGroup + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1EnableGroupResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Group + /v1beta1/organizations/{org_id}/groups/{id}/users: + get: + summary: List group users + description: Returns a list of users that belong to a group. + operationId: FrontierService_ListGroupUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListGroupUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: with_roles + in: query + required: false + type: boolean + tags: + - Group + post: + summary: Add group user + description: Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members. + operationId: FrontierService_AddGroupUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AddGroupUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + user_ids: + type: array + items: + type: string + tags: + - Group + /v1beta1/organizations/{org_id}/groups/{id}/users/{user_id}: + delete: + summary: Remove group user + description: Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made. + operationId: FrontierService_RemoveGroupUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RemoveGroupUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: user_id + in: path + required: true + type: string + tags: + - Group + /v1beta1/organizations/{org_id}/invitations: + get: + summary: List pending invitations + description: Returns all pending invitations queued for an organization + operationId: FrontierService_ListOrganizationInvitations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationInvitationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization to which user is invited + in: path + required: true + type: string + - name: user_id + description: user_id filter is the email id of user who are invited inside the organization. + in: query + required: false + type: string + tags: + - Organization + post: + summary: Invite user + description: Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days + operationId: FrontierService_CreateOrganizationInvitation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateOrganizationInvitationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: unique id of the organization to which user is invited + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + user_ids: + type: array + items: + type: string + description: user_id is email id of user who are invited inside the organization. If user is not registered on the platform, it will be notified + group_ids: + type: array + items: + type: string + description: list of group ids to which user needs to be added as a member. + role_ids: + type: array + items: + type: string + description: list of role ids to which user needs to be added as a member. Roles are binded at organization level by default. + required: + - user_ids + tags: + - Organization + /v1beta1/organizations/{org_id}/invitations/{id}: + get: + summary: Get pending invitation + description: Returns a pending invitation queued for an organization + operationId: FrontierService_GetOrganizationInvitation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetOrganizationInvitationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Organization + delete: + summary: Delete pending invitation + description: Delete a pending invitation queued for an organization + operationId: FrontierService_DeleteOrganizationInvitation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteOrganizationInvitationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Organization + /v1beta1/organizations/{org_id}/invitations/{id}/accept: + post: + summary: Accept pending invitation + description: Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation + operationId: FrontierService_AcceptOrganizationInvitation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1AcceptOrganizationInvitationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Organization + /v1beta1/organizations/{org_id}/join: + post: + summary: Join organization + description: Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains. + operationId: FrontierService_JoinOrganization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1JoinOrganizationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Organization + /v1beta1/organizations/{org_id}/kyc: + get: + summary: Get KYC info of an organization + description: Get KYC info of an organization using ID or name + operationId: FrontierService_GetOrganizationKyc + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetOrganizationKycResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + tags: + - OrganizationKyc + /v1beta1/organizations/{org_id}/roles: + get: + summary: List organization roles + description: Returns a list of custom roles created under an organization with their associated permissions + operationId: FrontierService_ListOrganizationRoles + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationRolesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: state + in: query + required: false + type: string + - name: scopes + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Role + post: + summary: Create organization role + description: Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. + operationId: FrontierService_CreateOrganizationRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateOrganizationRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the role belongs to. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RoleRequestBody' + tags: + - Role + /v1beta1/organizations/{org_id}/roles/{id}: + get: + summary: Get organization role + description: Returns a custom role under an organization along with its associated permissions + operationId: FrontierService_GetOrganizationRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetOrganizationRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Role + delete: + summary: Delete organization role + description: Delete a custom role and all of its relations under an organization permanently. + operationId: FrontierService_DeleteOrganizationRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteOrganizationRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Role + put: + summary: Update organization role + description: Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. + operationId: FrontierService_UpdateOrganizationRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateOrganizationRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RoleRequestBody' + tags: + - Role + /v1beta1/organizations/{org_id}/serviceusers: + post: + summary: Create service user + description: Create a service user. + operationId: FrontierService_CreateServiceUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateServiceUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + body: + $ref: '#/definitions/v1beta1ServiceUserRequestBody' + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}: + get: + summary: Get service user + description: Get service user details by its id. + operationId: FrontierService_GetServiceUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetServiceUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to get. + in: path + required: true + type: string + tags: + - ServiceUser + delete: + summary: Delete service user + description: Delete a service user permanently and all of its relations (keys, organizations, roles, etc) + operationId: FrontierService_DeleteServiceUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteServiceUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to delete. + in: path + required: true + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/keys: + get: + summary: List service user keys + description: List all the keys of a service user with its details except jwk. + operationId: FrontierService_ListServiceUserJWKs + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListServiceUserJWKsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to list keys for. + in: path + required: true + type: string + tags: + - ServiceUser + post: + summary: Create service user public/private key pair + description: Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client. + operationId: FrontierService_CreateServiceUserJWK + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateServiceUserJWKResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to create a key for. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + title: + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/keys/{key_id}: + get: + summary: Get service user key + description: Get a service user public RSA JWK set. + operationId: FrontierService_GetServiceUserJWK + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetServiceUserJWKResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to get a key for. + in: path + required: true + type: string + - name: key_id + description: The unique ID of the key to get. + in: path + required: true + type: string + tags: + - ServiceUser + delete: + summary: Delete service user key + description: Delete a service user key permanently. + operationId: FrontierService_DeleteServiceUserJWK + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteServiceUserJWKResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to delete a key for. + in: path + required: true + type: string + - name: key_id + description: The unique ID of the key to delete. + in: path + required: true + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/projects: + get: + summary: List service sser projects + description: List all projects the service user belongs to + operationId: FrontierService_ListServiceUserProjects + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListServiceUserProjectsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to list projects for. + in: path + required: true + type: string + - name: with_permissions + description: |- + list of permissions needs to be checked against each project + query params are set as with_permissions=get&with_permissions=delete + to be represented as array + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/secrets: + get: + summary: List service user credentials + description: List all the credentials of a service user. + operationId: FrontierService_ListServiceUserCredentials + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListServiceUserCredentialsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to list secrets for. + in: path + required: true + type: string + tags: + - ServiceUser + post: + summary: Create service user client credentials + description: Generate a service user credential and return it. The credential value will not be persisted and should be securely stored by client. + operationId: FrontierService_CreateServiceUserCredential + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateServiceUserCredentialResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to create a key for. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + title: + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/secrets/{secret_id}: + delete: + summary: Delete service user credentials + description: Delete a service user credential. + operationId: FrontierService_DeleteServiceUserCredential + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteServiceUserCredentialResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to delete a secret for. + in: path + required: true + type: string + - name: secret_id + description: The unique ID of the secret to delete. + in: path + required: true + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/tokens: + get: + summary: List service user tokens + description: List all the tokens of a service user. + operationId: FrontierService_ListServiceUserTokens + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListServiceUserTokensResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to list tokens for. + in: path + required: true + type: string + tags: + - ServiceUser + post: + summary: Create service user token + description: Generate a service user token and return it. The token value will not be persisted and should be securely stored by client. + operationId: FrontierService_CreateServiceUserToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateServiceUserTokenResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to create a token for. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + title: + type: string + tags: + - ServiceUser + /v1beta1/organizations/{org_id}/serviceusers/{id}/tokens/{token_id}: + delete: + summary: Delete service user token + description: Delete a service user token. + operationId: FrontierService_DeleteServiceUserToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteServiceUserTokenResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to which the service user belongs to. + in: path + required: true + type: string + - name: id + description: The unique ID of the service user to delete a token for. + in: path + required: true + type: string + - name: token_id + description: The unique ID of the token to delete. + in: path + required: true + type: string + tags: + - ServiceUser + /v1beta1/organizations/billing/check: + post: + summary: Check entitlement + description: Check if a billing account is entitled to a feature. + operationId: FrontierService_CheckFeatureEntitlement2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CheckFeatureEntitlementResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CheckFeatureEntitlementRequest' + tags: + - Entitlement + /v1beta1/organizations/billing/usages: + post: + summary: Create billing usage + description: Report a new billing usage for a billing account. + operationId: FrontierService_CreateBillingUsage2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateBillingUsageResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateBillingUsageRequest' + tags: + - Usage + /v1beta1/organizations/billing/usages/revert: + post: + summary: Revert billing usage + description: Revert billing usage for a billing account. + operationId: AdminService_RevertBillingUsage2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1RevertBillingUsageResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RevertBillingUsageRequest' + tags: + - Billing + /v1beta1/permissions: + get: + summary: Get all permissions + operationId: FrontierService_ListPermissions + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListPermissionsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Permission + post: + summary: Create platform permission + description: Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance. + operationId: AdminService_CreatePermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreatePermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreatePermissionRequest' + tags: + - Permission + /v1beta1/permissions/{id}: + get: + summary: Get permission + description: Returns a permission by ID + operationId: FrontierService_GetPermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetPermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Permission + delete: + summary: Delete platform permission + operationId: AdminService_DeletePermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeletePermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Permission + put: + summary: Update platform permission + description: Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance. + operationId: AdminService_UpdatePermission + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdatePermissionResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1PermissionRequestBody' + tags: + - Permission + /v1beta1/policies: + get: + summary: List all policies + description: Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group. + operationId: FrontierService_ListPolicies + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListPoliciesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization id to filter by. + in: query + required: false + type: string + - name: project_id + description: The project id to filter by. + in: query + required: false + type: string + - name: user_id + description: The user id to filter by. + in: query + required: false + type: string + - name: role_id + description: The role id to filter by. + in: query + required: false + type: string + - name: group_id + description: The group id to filter by. + in: query + required: false + type: string + tags: + - Policy + post: + summary: Create policy + description: 'Creates a policy ' + operationId: FrontierService_CreatePolicy + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreatePolicyResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1PolicyRequestBody' + tags: + - Policy + /v1beta1/policies/{id}: + get: + summary: Get policy + description: Returns a policy by ID + operationId: FrontierService_GetPolicy + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetPolicyResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Policy + delete: + summary: Delete Policy + description: Delete a policy all of its relations permanently. + operationId: FrontierService_DeletePolicy + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeletePolicyResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Policy + put: + summary: Update policy + description: Updates a policy by ID + operationId: FrontierService_UpdatePolicy + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdatePolicyResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1PolicyRequestBody' + tags: + - Policy + /v1beta1/policies/projects/{project_id}: + post: + summary: Create Policy for Project + description: Create a policy for a project + operationId: FrontierService_CreatePolicyForProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreatePolicyForProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreatePolicyForProjectBody' + tags: + - Policy + /v1beta1/preferences: + get: + summary: List platform preferences + description: Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc + operationId: AdminService_ListPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Preference + post: + summary: Create platform preferences + description: Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores. + operationId: AdminService_CreatePreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreatePreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreatePreferencesRequest' + tags: + - Preference + /v1beta1/preferences/traits: + get: + summary: Describe preferences + description: Returns a list of all preferences supported by Frontier. + operationId: FrontierService_DescribePreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DescribePreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Preference + /v1beta1/projects: + post: + summary: Create project + operationId: FrontierService_CreateProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1ProjectRequestBody' + tags: + - Project + /v1beta1/projects/{id}: + get: + summary: Get project + description: Returns a project by ID + operationId: FrontierService_GetProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Project + delete: + summary: Delete Project + description: Delete a project all of its relations permanently. + operationId: FrontierService_DeleteProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Project + put: + summary: Update project + description: Updates a project by ID + operationId: FrontierService_UpdateProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1ProjectRequestBody' + tags: + - Project + /v1beta1/projects/{id}/admins: + get: + summary: List project admins + description: Returns a collection of admins of a project + operationId: FrontierService_ListProjectAdmins + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectAdminsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Project + /v1beta1/projects/{id}/disable: + post: + summary: Disable project + operationId: FrontierService_DisableProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DisableProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Project + /v1beta1/projects/{id}/enable: + post: + summary: Enable project + operationId: FrontierService_EnableProject + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1EnableProjectResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - Project + /v1beta1/projects/{id}/groups: + get: + summary: List project groups + description: Returns a collection of groups of a project. + operationId: FrontierService_ListProjectGroups + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectGroupsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: with_roles + in: query + required: false + type: boolean + tags: + - Project + /v1beta1/projects/{id}/preferences: + get: + summary: List project preferences + description: List a project preferences by ID. + operationId: FrontierService_ListProjectPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Preference + post: + summary: Create project preferences + description: Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores. + operationId: FrontierService_CreateProjectPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProjectPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + tags: + - Preference + /v1beta1/projects/{id}/serviceusers: + get: + summary: List project serviceusers + description: Returns a collection of users of a project. + operationId: FrontierService_ListProjectServiceUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectServiceUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: with_roles + in: query + required: false + type: boolean + tags: + - Project + /v1beta1/projects/{id}/users: + get: + summary: List project users + description: Returns a collection of users of a project. Filter by user permissions is supported. + operationId: FrontierService_ListProjectUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: permission_filter + in: query + required: false + type: string + - name: with_roles + in: query + required: false + type: boolean + tags: + - Project + /v1beta1/projects/{project_id}/resources: + get: + summary: Get all resources + operationId: FrontierService_ListProjectResources + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectResourcesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + in: path + required: true + type: string + - name: namespace + in: query + required: false + type: string + tags: + - Resource + post: + summary: Create resource + description: Creates a resource in a project + operationId: FrontierService_CreateProjectResource + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProjectResourceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + description: project uuid or name + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1ResourceRequestBody' + - name: id + description: Autogenerated if skipped. + in: query + required: false + type: string + tags: + - Resource + /v1beta1/projects/{project_id}/resources/{id}: + get: + summary: Get resource + description: Returns a project resource by ID + operationId: FrontierService_GetProjectResource + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetProjectResourceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Resource + delete: + summary: Delete resource + description: Deletes a resource from a project permanently + operationId: FrontierService_DeleteProjectResource + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteProjectResourceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Resource + put: + summary: Update resource + description: Updates a resource in a project + operationId: FrontierService_UpdateProjectResource + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateProjectResourceResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: project_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1ResourceRequestBody' + tags: + - Resource + /v1beta1/prospects: + post: + summary: Create prospect + description: Create prospect for given email and activity. Available for public access. + operationId: FrontierService_CreateProspectPublic + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateProspectPublicResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateProspectPublicRequest' + tags: + - Prospect + /v1beta1/relations: + post: + summary: Create relation + operationId: FrontierService_CreateRelation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateRelationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RelationRequestBody' + tags: + - Relation + /v1beta1/relations/{id}: + get: + summary: Get relation + description: Returns a relation by ID + operationId: FrontierService_GetRelation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetRelationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - Relation + /v1beta1/relations/{relation}/object/{object}/subject/{subject}: + delete: + summary: Delete relation + description: Remove a subject having a relation from an object + operationId: FrontierService_DeleteRelation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteRelationResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: relation + in: path + required: true + type: string + - name: object + description: objectnamespace:uuid + in: path + required: true + type: string + - name: subject + description: subjectnamespace:uuid + in: path + required: true + type: string + tags: + - Relation + /v1beta1/roles: + get: + summary: List platform roles + description: Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions + operationId: FrontierService_ListRoles + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListRolesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: state + in: query + required: false + type: string + - name: scopes + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Role + post: + summary: Create platform role + description: Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance. + operationId: AdminService_CreateRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RoleRequestBody' + tags: + - Role + /v1beta1/roles/{id}: + delete: + summary: Delete platform role + description: Delete a platform wide role and all of its relations. + operationId: AdminService_DeleteRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The role id to delete. + in: path + required: true + type: string + tags: + - Role + put: + summary: Update role + description: Update a role title, description and permissions. + operationId: AdminService_UpdateRole + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateRoleResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The role id to update. + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1RoleRequestBody' + tags: + - Role + /v1beta1/serviceusers: + get: + summary: List org service users + description: Returns the service user of an organization in a Frontier instance. It can be filter by it's state + operationId: FrontierService_ListServiceUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListServiceUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: The organization ID to filter service users by. + in: query + required: true + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + tags: + - ServiceUser + /v1beta1/users: + get: + summary: List public users + description: Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination. + operationId: FrontierService_ListUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListUsersResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: page_size + description: The maximum number of users to return per page. The default is 1000. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + - name: keyword + description: The keyword to search for in name or email. + in: query + required: false + type: string + - name: org_id + description: The organization ID to filter users by. + in: query + required: false + type: string + - name: group_id + description: The group id to filter by. + in: query + required: false + type: string + - name: state + description: The state to filter by. It can be enabled or disabled. + in: query + required: false + type: string + tags: + - User + post: + summary: Create user + description: 'Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.

*Example:*`{"email":"john.doe@raystack.org","title":"John Doe",metadata:{"label": {"key1": "value1"}, "description": "User Description"}}`' + operationId: FrontierService_CreateUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1UserRequestBody' + tags: + - User + security: [] + /v1beta1/users/{id}: + get: + summary: Get user + description: Get a user by id searched over all organizations in Frontier. + operationId: FrontierService_GetUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - User + delete: + summary: Delete user + description: Delete an user permanently forever and all of its relations (organizations, groups, etc) + operationId: FrontierService_DeleteUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DeleteUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - User + put: + summary: Update user + operationId: FrontierService_UpdateUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1UserRequestBody' + tags: + - User + /v1beta1/users/{id}/disable: + post: + summary: Disable user + description: Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance. + operationId: FrontierService_DisableUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1DisableUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - User + /v1beta1/users/{id}/enable: + post: + summary: Enable user + description: Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance. + operationId: FrontierService_EnableUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1EnableUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + tags: + - User + /v1beta1/users/{id}/groups: + get: + summary: List user groups + description: Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter. + operationId: FrontierService_ListUserGroups + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListUserGroupsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The unique ID of the user to get groups for. + in: path + required: true + type: string + - name: org_id + description: The organization ID to filter groups by. If not provided, groups from all organizations are returned. + in: query + required: false + type: string + tags: + - User + /v1beta1/users/{id}/invitations: + get: + summary: List user invitations + description: List all the invitations sent to a user. + operationId: FrontierService_ListUserInvitations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListUserInvitationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + description: The user email to list the invitations for. + in: path + required: true + type: string + tags: + - User + /v1beta1/users/{id}/organizations: + get: + summary: Get user organizations + description: 'This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain' + operationId: FrontierService_ListOrganizationsByUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationsByUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: state + in: query + required: false + type: string + tags: + - User + /v1beta1/users/{id}/preferences: + get: + summary: List user preferences + description: List a user preferences by ID. + operationId: FrontierService_ListUserPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListUserPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: scope_type + description: |- + scope_type filters preferences by context type (e.g., "app/organization") + If empty, returns all user preferences (global + all scoped) + If set with scope_id, returns preferences for the specific scope, + with trait defaults for any unset preferences + in: query + required: false + type: string + - name: scope_id + description: |- + scope_id filters preferences by scope identifier (e.g., organization ID) + Only applicable when scope_type is set + in: query + required: false + type: string + tags: + - Preference + post: + summary: Create user preferences + description: Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. + operationId: FrontierService_CreateUserPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateUserPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + - name: body + in: body + required: true + schema: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + tags: + - Preference + /v1beta1/users/{id}/projects: + get: + summary: Get user projects + description: Get all the projects a user belongs to. + operationId: FrontierService_ListProjectsByUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectsByUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: id + in: path + required: true + type: string + tags: + - User + /v1beta1/users/self: + get: + summary: Get current user + operationId: FrontierService_GetCurrentUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1GetCurrentUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - User + put: + summary: Update current user + operationId: FrontierService_UpdateCurrentUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1UpdateCurrentUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1UserRequestBody' + tags: + - User + /v1beta1/users/self/groups: + get: + summary: List my groups + operationId: FrontierService_ListCurrentUserGroups + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListCurrentUserGroupsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: org_id is optional filter over an organization + in: query + required: false + type: string + - name: with_permissions + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: with_member_count + in: query + required: false + type: boolean + tags: + - User + /v1beta1/users/self/invitations: + get: + summary: List user invitations + description: List all the invitations sent to current user. + operationId: FrontierService_ListCurrentUserInvitations + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListCurrentUserInvitationsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - User + /v1beta1/users/self/organizations: + get: + summary: Get my organizations + description: 'This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain' + operationId: FrontierService_ListOrganizationsByCurrentUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListOrganizationsByCurrentUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: state + in: query + required: false + type: string + tags: + - User + /v1beta1/users/self/preferences: + get: + summary: List current user preferences + description: List a user preferences by ID. + operationId: FrontierService_ListCurrentUserPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListCurrentUserPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: scope_type + description: |- + scope_type filters preferences by context type (e.g., "app/organization") + If empty, returns all user preferences (global + all scoped) + If set with scope_id, returns global preferences + preferences for the specific scope, + with trait defaults for any unset preferences + in: query + required: false + type: string + - name: scope_id + description: |- + scope_id filters preferences by scope identifier (e.g., organization ID) + Only applicable when scope_type is set + in: query + required: false + type: string + tags: + - Preference + post: + summary: Create current user preferences + description: Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. + operationId: FrontierService_CreateCurrentUserPreferences + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1CreateCurrentUserPreferencesResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1beta1CreateCurrentUserPreferencesRequest' + tags: + - Preference + /v1beta1/users/self/projects: + get: + summary: Get my projects + description: Get all projects the current user belongs to + operationId: FrontierService_ListProjectsByCurrentUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListProjectsByCurrentUserResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/googlerpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/googlerpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/googlerpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/googlerpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/googlerpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: org_id + description: org_id is optional and filter projects by org + in: query + required: false + type: string + - name: with_permissions + description: |- + list of permissions needs to be checked against each project + query params are set as with_permissions=get&with_permissions=delete + to be represented as array + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: non_inherited + description: |- + Note: this is a bad design and would recommend against using this filter + It is used to list only projects which are explicitly given permission + to user. A user could get permission to access a project either via getting + access from organization level role or a group. But for some reason we want + only users who could have inherited these permissions from top but we only + want explictly added ones. + in: query + required: false + type: boolean + - name: with_member_count + in: query + required: false + type: boolean + - name: page_size + description: The maximum number of users to return per page. The default is 1000. + in: query + required: false + type: integer + format: int32 + - name: page_num + description: The page number to return. The default is 1. + in: query + required: false + type: integer + format: int32 + tags: + - User +definitions: + BillingAccountAddress: + type: object + properties: + line1: + type: string + line2: + type: string + city: + type: string + state: + type: string + postal_code: + type: string + country: + type: string + BillingAccountBalance: + type: object + properties: + amount: + type: string + format: int64 + currency: + type: string + updated_at: + type: string + format: date-time + BillingAccountTax: + type: object + properties: + type: + type: string + title: |- + tax type like "vat", "gst", "sales_tax" or if it's + provider specific us_ein, uk_vat, in_gst, etc + id: + type: string + title: unique identifier provided by the tax agency + ChangeSubscriptionRequestPhaseChange: + type: object + properties: + cancel_upcoming_changes: + type: boolean + title: should the upcoming changes be cancelled + ChangeSubscriptionRequestPlanChange: + type: object + properties: + plan: + type: string + title: plan to change to + immediate: + type: boolean + title: should the change be immediate or at the end of the current billing period + PreferenceTraitInputType: + type: string + enum: + - INPUT_TYPE_UNSPECIFIED + - INPUT_TYPE_TEXT + - INPUT_TYPE_TEXTAREA + - INPUT_TYPE_SELECT + - INPUT_TYPE_COMBOBOX + - INPUT_TYPE_CHECKBOX + - INPUT_TYPE_MULTISELECT + - INPUT_TYPE_NUMBER + default: INPUT_TYPE_UNSPECIFIED + ProductBehaviorConfig: + type: object + properties: + credit_amount: + type: string + format: int64 + seat_limit: + type: string + format: int64 + min_quantity: + type: string + format: int64 + max_quantity: + type: string + format: int64 + SearchOrganizationInvoicesResponseOrganizationInvoice: + type: object + properties: + id: + type: string + amount: + type: string + format: int64 + currency: + type: string + state: + type: string + invoice_link: + type: string + created_at: + type: string + format: date-time + org_id: + type: string + SearchOrganizationProjectsResponseOrganizationProject: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + state: + type: string + member_count: + type: string + format: int64 + user_ids: + type: array + items: + type: string + created_at: + type: string + format: date-time + organization_id: + type: string + SearchOrganizationServiceUserCredentialsResponseOrganizationServiceUserCredential: + type: object + properties: + title: + type: string + serviceuser_title: + type: string + created_at: + type: string + format: date-time + org_id: + type: string + SearchOrganizationServiceUsersResponseOrganizationServiceUser: + type: object + properties: + id: + type: string + title: + type: string + org_id: + type: string + projects: + type: array + items: + type: object + $ref: '#/definitions/v1beta1SearchOrganizationServiceUsersResponseProject' + created_at: + type: string + format: date-time + SearchOrganizationTokensResponseOrganizationToken: + type: object + properties: + amount: + type: string + format: int64 + type: + type: string + description: + type: string + user_id: + type: string + user_title: + type: string + user_avatar: + type: string + created_at: + type: string + format: date-time + org_id: + type: string + SearchOrganizationUsersResponseOrganizationUser: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + email: + type: string + org_joined_at: + type: string + format: date-time + state: + type: string + avatar: + type: string + role_names: + type: array + items: + type: string + role_titles: + type: array + items: + type: string + role_ids: + type: array + items: + type: string + organization_id: + type: string + SearchOrganizationsResponseOrganizationResult: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + state: + type: string + avatar: + type: string + created_by: + type: string + plan_name: + type: string + payment_mode: + type: string + subscription_cycle_end_at: + type: string + format: date-time + country: + type: string + subscription_state: + type: string + plan_interval: + type: string + plan_id: + type: string + SearchProjectUsersResponseProjectUser: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + email: + type: string + avatar: + type: string + role_names: + type: array + items: + type: string + role_titles: + type: array + items: + type: string + role_ids: + type: array + items: + type: string + project_id: + type: string + SearchUserOrganizationsResponseUserOrganization: + type: object + properties: + org_id: + type: string + org_title: + type: string + org_name: + type: string + org_avatar: + type: string + project_count: + type: string + format: int64 + role_names: + type: array + items: + type: string + role_titles: + type: array + items: + type: string + role_ids: + type: array + items: + type: string + org_joined_on: + type: string + format: date-time + user_id: + type: string + SearchUserProjectsResponseUserProject: + type: object + properties: + project_id: + type: string + project_title: + type: string + project_name: + type: string + project_created_on: + type: string + format: date-time + user_names: + type: array + items: + type: string + user_titles: + type: array + items: + type: string + user_ids: + type: array + items: + type: string + user_avatars: + type: array + items: + type: string + org_id: + type: string + user_id: + type: string + SessionMeta: + type: object + properties: + operating_system: + type: string + browser: + type: string + ip_address: + type: string + location: + $ref: '#/definitions/SessionMetaLocation' + SessionMetaLocation: + type: object + properties: + city: + type: string + country: + type: string + latitude: + type: string + longitude: + type: string + SubscriptionPhase: + type: object + properties: + effective_at: + type: string + format: date-time + plan_id: + type: string + reason: + type: string + WebhookSecret: + type: object + properties: + id: + type: string + value: + type: string + apiHttpBody: + type: object + properties: + content_type: + type: string + description: The HTTP Content-Type header value specifying the content type of the body. + data: + type: string + format: byte + description: The HTTP request/response body as raw binary. + extensions: + type: array + items: + type: object + $ref: '#/definitions/protobufAny' + description: |- + Application specific response metadata. Must be set in the first response + for streaming APIs. + description: |- + Message that represents an arbitrary HTTP body. It should only be used for + payload formats that can't be represented as JSON, such as raw binary or + an HTML page. + + + This message can be used both in streaming and non-streaming API methods in + the request as well as the response. + + It can be used as a top-level request field, which is convenient if one + wants to extract parameters from either the URL or HTTP template into the + request fields and also want access to the raw HTTP body. + + Example: + + message GetResourceRequest { + // A unique request id. + string request_id = 1; + + // The raw HTTP body is bound to this field. + google.api.HttpBody http_body = 2; + + } + + service ResourceService { + rpc GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); + + } + + Example with streaming methods: + + service CaldavService { + rpc GetCalendar(stream google.api.HttpBody) + returns (stream google.api.HttpBody); + rpc UpdateCalendar(stream google.api.HttpBody) + returns (stream google.api.HttpBody); + + } + + Use of this type only changes how the request and response bodies are + handled, all other features will continue to work unchanged. + frontierv1beta1Invoice: + type: object + properties: + id: + type: string + customer_id: + type: string + provider_id: + type: string + state: + type: string + currency: + type: string + amount: + type: string + format: int64 + hosted_url: + type: string + due_date: + type: string + format: date-time + title: The date on which payment for this invoice is due + effective_at: + type: string + format: date-time + description: The date when this invoice is in effect. + period_start_at: + type: string + format: date-time + period_end_at: + type: string + format: date-time + metadata: + type: object + created_at: + type: string + format: date-time + customer: + $ref: '#/definitions/v1beta1BillingAccount' + readOnly: true + frontierv1beta1OrganizationRequestBody: + type: object + properties: + name: + type: string + description: The name of the organization. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:*`"frontier-org1-acme"` + title: + type: string + description: 'The title can contain any UTF-8 character, used to provide a human-readable name for the organization. Can also be left empty.
*Example*: `"Acme Inc"`' + metadata: + type: object + description: 'Metadata object for organizations that can hold key value pairs defined in Organization Metaschema. The metadata object can be used to store arbitrary information about the organization such as labels, descriptions etc. The default Organization Metaschema contains labels and descripton fields. Update the Organization Metaschema to add more fields.
*Example*:`{"labels": {"key": "value"}, "description": "Organization description"}`' + avatar: + type: string + example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAA + description: The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`. + required: + - name + frontierv1beta1Project: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + org_id: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the project was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the project was last updated. + members_count: + type: integer + format: int32 + example: 2 + description: The number of members explicitly added in the project. + readOnly: true + googlerpcStatus: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + $ref: '#/definitions/protobufAny' + protobufAny: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + protobufNullValue: + type: string + enum: + - NULL_VALUE + default: NULL_VALUE + description: |- + `NullValue` is a singleton enumeration to represent the null value for the + `Value` type union. + + The JSON representation for `NullValue` is JSON `null`. + + - NULL_VALUE: Null value. + v1beta1AcceptOrganizationInvitationResponse: + type: object + v1beta1AddGroupUsersResponse: + type: object + v1beta1AddOrganizationUsersResponse: + type: object + v1beta1AddPlatformUserRequest: + type: object + properties: + user_id: + type: string + description: The user id to add to the platform. + serviceuser_id: + type: string + description: The service user id to add to the platform. + relation: + type: string + description: The relation to add as in the platform. It can be admin or member. + required: + - relation + v1beta1AddPlatformUserResponse: + type: object + v1beta1AdminCreateOrganizationRequestOrganizationRequestBody: + type: object + properties: + name: + type: string + description: The name of the organization. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:*`"frontier-org1-acme"` + title: + type: string + description: 'The title can contain any UTF-8 character, used to provide a human-readable name for the organization. Can also be left empty.
*Example*: `"Acme Inc"`' + metadata: + type: object + description: 'Metadata object for organizations that can hold key value pairs defined in Organization Metaschema. The metadata object can be used to store arbitrary information about the organization such as labels, descriptions etc. The default Organization Metaschema contains labels and descripton fields. Update the Organization Metaschema to add more fields.
*Example*:`{"labels": {"key": "value"}, "description": "Organization description"}`' + avatar: + type: string + example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAA + description: The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`. + org_owner_email: + type: string + description: The email of the user. The email must be unique within the entire Frontier instance.
*Example:*`"john.doe@raystack.org"` + title: |- + this user will be invited to org as owner. + if this user doesn't exist, it will be created first + required: + - name + - org_owner_email + v1beta1AdminCreateOrganizationResponse: + type: object + properties: + organization: + $ref: '#/definitions/v1beta1Organization' + v1beta1AuditRecord: + type: object + properties: + id: + type: string + actor: + $ref: '#/definitions/v1beta1AuditRecordActor' + event: + type: string + resource: + $ref: '#/definitions/v1beta1AuditRecordResource' + target: + $ref: '#/definitions/v1beta1AuditRecordTarget' + occurred_at: + type: string + format: date-time + org_id: + type: string + org_name: + type: string + request_id: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + v1beta1AuditRecordActor: + type: object + properties: + id: + type: string + type: + type: string + title: not mandatory if id is zeroUUID + name: + type: string + title: + type: string + metadata: + type: object + required: + - id + v1beta1AuditRecordResource: + type: object + properties: + id: + type: string + type: + type: string + name: + type: string + metadata: + type: object + required: + - id + - type + v1beta1AuditRecordTarget: + type: object + properties: + id: + type: string + type: + type: string + name: + type: string + metadata: + type: object + v1beta1AuthCallbackRequest: + type: object + properties: + strategy_name: + type: string + title: strategy_name will not be set for oidc but can be utilized for methods like email magic links + state: + type: string + title: for oidc & magic links + code: + type: string + state_options: + type: object + title: |- + state_options has additional configurations for the authentication flow at hand + for example, in case of passkey, it has challenge and public key + v1beta1AuthCallbackResponse: + type: object + v1beta1AuthLogoutResponse: + type: object + v1beta1AuthStrategy: + type: object + properties: + name: + type: string + params: + type: object + v1beta1AuthTokenRequest: + type: object + properties: + grant_type: + type: string + title: |- + grant_type can be one of the following: + - client_credentials + - urn:ietf:params:oauth:grant-type:jwt-bearer + client_id: + type: string + title: client_id and client_secret are required for grant_type client_credentials + client_secret: + type: string + assertion: + type: string + title: assertion is required for grant_type urn:ietf:params:oauth:grant-type:jwt-bearer + v1beta1AuthTokenResponse: + type: object + properties: + access_token: + type: string + token_type: + type: string + v1beta1AuthenticateResponse: + type: object + properties: + endpoint: + type: string + title: endpoint specifies the url to redirect user for starting authentication flow + state: + type: string + title: state is used for resuming authentication flow in applicable strategies + state_options: + type: object + title: state_options has additional configurations for the authentication flow at hand + v1beta1BatchCheckPermissionBody: + type: object + properties: + permission: + type: string + description: the permission name to check.
*Example:* `get` or `list` + resource: + type: string + description: '`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`' + required: + - permission + v1beta1BatchCheckPermissionRequest: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BatchCheckPermissionBody' + v1beta1BatchCheckPermissionResponse: + type: object + properties: + pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BatchCheckPermissionResponsePair' + v1beta1BatchCheckPermissionResponsePair: + type: object + properties: + body: + $ref: '#/definitions/v1beta1BatchCheckPermissionBody' + status: + type: boolean + v1beta1BillingAccount: + type: object + properties: + id: + type: string + org_id: + type: string + name: + type: string + email: + type: string + phone: + type: string + address: + $ref: '#/definitions/BillingAccountAddress' + provider_id: + type: string + provider: + type: string + currency: + type: string + state: + type: string + tax_data: + type: array + items: + type: object + $ref: '#/definitions/BillingAccountTax' + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + organization: + $ref: '#/definitions/v1beta1Organization' + readOnly: true + v1beta1BillingAccountDetails: + type: object + properties: + credit_min: + type: string + format: int64 + title: |- + credit_min is the minimum credit limit for the billing account + default is 0, negative numbers work as overdraft, positive + numbers work as minimum purchase limit + due_in_days: + type: string + format: int64 + title: |- + due_in_days is the number of days after the invoice finalization + that it will be considered overdue, if set to 0, the customer will + be charged immediately + v1beta1BillingAccountRequestBody: + type: object + properties: + name: + type: string + email: + type: string + phone: + type: string + address: + $ref: '#/definitions/BillingAccountAddress' + currency: + type: string + tax_data: + type: array + items: + type: object + $ref: '#/definitions/BillingAccountTax' + metadata: + type: object + v1beta1BillingTransaction: + type: object + properties: + id: + type: string + customer_id: + type: string + source: + type: string + title: additional metadata for storing event/service that triggered this usage + amount: + type: string + format: int64 + type: + type: string + description: + type: string + user_id: + type: string + title: user_id is the user that triggered this usage + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + user: + $ref: '#/definitions/v1beta1User' + readOnly: true + customer: + $ref: '#/definitions/v1beta1BillingAccount' + readOnly: true + v1beta1BillingWebhookCallbackResponse: + type: object + v1beta1CancelSubscriptionResponse: + type: object + v1beta1ChangeSubscriptionResponse: + type: object + properties: + phase: + $ref: '#/definitions/SubscriptionPhase' + v1beta1CheckCreditEntitlementRequest: + type: object + properties: + org_id: + type: string + amount: + type: string + format: int64 + v1beta1CheckCreditEntitlementResponse: + type: object + properties: + status: + type: boolean + v1beta1CheckFeatureEntitlementRequest: + type: object + properties: + org_id: + type: string + billing_id: + type: string + title: 'DEPRECATED: billing_id will be inferred from org_id' + project_id: + type: string + title: DEPRECATED + feature: + type: string + title: feature or product name + v1beta1CheckFeatureEntitlementResponse: + type: object + properties: + status: + type: boolean + v1beta1CheckFederatedResourcePermissionRequest: + type: object + properties: + subject: + type: string + description: the subject to check.
*Example:* `user:..uuidofuser..` + resource: + type: string + description: '`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`' + permission: + type: string + description: the permission name to check.
*Example:* `get`, `list`, `compute.instance.create` + required: + - subject + - resource + - permission + v1beta1CheckFederatedResourcePermissionResponse: + type: object + properties: + status: + type: boolean + v1beta1CheckResourcePermissionRequest: + type: object + properties: + object_id: + type: string + description: Deprecated. Use `resource` field instead. + object_namespace: + type: string + description: Deprecated. Use `resource` field instead. + permission: + type: string + description: the permission name to check.
*Example:* `get`, `list`, `compute.instance.create` + resource: + type: string + description: '`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`' + required: + - permission + v1beta1CheckResourcePermissionResponse: + type: object + properties: + status: + type: boolean + v1beta1CheckoutProductBody: + type: object + properties: + product: + type: string + quantity: + type: string + format: int64 + v1beta1CheckoutSession: + type: object + properties: + id: + type: string + checkout_url: + type: string + success_url: + type: string + cancel_url: + type: string + state: + type: string + plan: + type: string + product: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + expire_at: + type: string + format: date-time + v1beta1CheckoutSetupBody: + type: object + properties: + payment_method: + type: boolean + customer_portal: + type: boolean + v1beta1CheckoutSubscriptionBody: + type: object + properties: + plan: + type: string + skip_trial: + type: boolean + cancel_after_trial: + type: boolean + provider_coupon_id: + type: string + title: |- + provider_coupon_id is the coupon code that will be applied to the subscription + generated by the billing provider, this will be deprecated once coupons are + managed by the platform + v1beta1CreateAuditRecordResponse: + type: object + properties: + audit_record: + $ref: '#/definitions/v1beta1AuditRecord' + v1beta1CreateBillingAccountResponse: + type: object + properties: + billing_account: + $ref: '#/definitions/v1beta1BillingAccount' + title: Created billing account + v1beta1CreateBillingUsageRequest: + type: object + properties: + org_id: + type: string + billing_id: + type: string + title: 'DEPRECATED: billing_id will be inferred from org_id' + project_id: + type: string + title: DEPRECATED + usages: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Usage' + title: Usage to create + v1beta1CreateBillingUsageResponse: + type: object + v1beta1CreateCheckoutResponse: + type: object + properties: + checkout_session: + $ref: '#/definitions/v1beta1CheckoutSession' + title: Checkout session + v1beta1CreateCurrentUserPreferencesRequest: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + v1beta1CreateCurrentUserPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateFeatureRequest: + type: object + properties: + body: + $ref: '#/definitions/v1beta1FeatureRequestBody' + title: Feature to create + v1beta1CreateFeatureResponse: + type: object + properties: + feature: + $ref: '#/definitions/v1beta1Feature' + title: Created feature + v1beta1CreateGroupPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateGroupResponse: + type: object + properties: + group: + $ref: '#/definitions/v1beta1Group' + v1beta1CreateMetaSchemaResponse: + type: object + properties: + metaschema: + $ref: '#/definitions/v1beta1MetaSchema' + v1beta1CreateOrganizationDomainResponse: + type: object + properties: + domain: + $ref: '#/definitions/v1beta1Domain' + v1beta1CreateOrganizationInvitationResponse: + type: object + properties: + invitations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Invitation' + v1beta1CreateOrganizationPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateOrganizationResponse: + type: object + properties: + organization: + $ref: '#/definitions/v1beta1Organization' + v1beta1CreateOrganizationRoleResponse: + type: object + properties: + role: + $ref: '#/definitions/v1beta1Role' + v1beta1CreatePermissionRequest: + type: object + properties: + bodies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PermissionRequestBody' + v1beta1CreatePermissionResponse: + type: object + properties: + permissions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Permission' + v1beta1CreatePlanRequest: + type: object + properties: + body: + $ref: '#/definitions/v1beta1PlanRequestBody' + title: Plan to create + v1beta1CreatePlanResponse: + type: object + properties: + plan: + $ref: '#/definitions/v1beta1Plan' + title: Created plan + v1beta1CreatePolicyForProjectBody: + type: object + properties: + role_id: + type: string + description: unique id of the role to which policy is assigned + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
*Example:* `Policy title` + principal: + type: string + description: principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal.
*Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825` + required: + - role_id + - principal + v1beta1CreatePolicyForProjectResponse: + type: object + v1beta1CreatePolicyResponse: + type: object + properties: + policy: + $ref: '#/definitions/v1beta1Policy' + v1beta1CreatePreferencesRequest: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceRequestBody' + v1beta1CreatePreferencesResponse: + type: object + properties: + preference: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateProductRequest: + type: object + properties: + body: + $ref: '#/definitions/v1beta1ProductRequestBody' + title: Product to create + v1beta1CreateProductResponse: + type: object + properties: + product: + $ref: '#/definitions/v1beta1Product' + title: Created product + v1beta1CreateProjectPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateProjectResourceResponse: + type: object + properties: + resource: + $ref: '#/definitions/v1beta1Resource' + v1beta1CreateProjectResponse: + type: object + properties: + project: + $ref: '#/definitions/frontierv1beta1Project' + v1beta1CreateProspectPublicRequest: + type: object + properties: + name: + type: string + description: full name of the user + email: + type: string + description: email of the user + phone: + type: string + description: phone number of the user + activity: + type: string + description: activity for which user is subscribing, e.g. newsletter, waitlist, blogs etc + source: + type: string + description: source of this user addition e.g. platform, website, admin etc + metadata: + type: object + description: additional info as key value pair + required: + - email + - activity + v1beta1CreateProspectPublicResponse: + type: object + v1beta1CreateProspectRequest: + type: object + properties: + name: + type: string + description: full name of the user + email: + type: string + description: email of the user + phone: + type: string + description: phone number of the user + activity: + type: string + description: activity for which user is subscribing, e.g. newsletter, waitlist, blogs etc + status: + $ref: '#/definitions/v1beta1ProspectStatus' + description: subscription status for this activity. Allowed values - 1 for UNSUBSCRIBED; 2 for SUBSCRIBED; + source: + type: string + description: source of this user addition e.g. platform, website, admin etc + verified: + type: boolean + description: verification status of this user addition e.g. true, false + metadata: + type: object + description: additional info as key value pair + required: + - email + - activity + - status + v1beta1CreateProspectResponse: + type: object + properties: + prospect: + $ref: '#/definitions/v1beta1Prospect' + v1beta1CreateRelationResponse: + type: object + properties: + relation: + $ref: '#/definitions/v1beta1Relation' + v1beta1CreateRoleResponse: + type: object + properties: + role: + $ref: '#/definitions/v1beta1Role' + v1beta1CreateServiceUserCredentialResponse: + type: object + properties: + secret: + $ref: '#/definitions/v1beta1SecretCredential' + v1beta1CreateServiceUserJWKResponse: + type: object + properties: + key: + $ref: '#/definitions/v1beta1KeyCredential' + v1beta1CreateServiceUserResponse: + type: object + properties: + serviceuser: + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1CreateServiceUserTokenResponse: + type: object + properties: + token: + $ref: '#/definitions/v1beta1ServiceUserToken' + v1beta1CreateUserPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1CreateUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + v1beta1CreateWebhookRequest: + type: object + properties: + body: + $ref: '#/definitions/v1beta1WebhookRequestBody' + v1beta1CreateWebhookResponse: + type: object + properties: + webhook: + $ref: '#/definitions/v1beta1Webhook' + v1beta1DelegatedCheckoutResponse: + type: object + properties: + subscription: + $ref: '#/definitions/v1beta1Subscription' + title: subscription if created + product: + $ref: '#/definitions/v1beta1Product' + title: product if bought + v1beta1DeleteBillingAccountResponse: + type: object + v1beta1DeleteGroupResponse: + type: object + v1beta1DeleteMetaSchemaResponse: + type: object + v1beta1DeleteOrganizationDomainResponse: + type: object + v1beta1DeleteOrganizationInvitationResponse: + type: object + v1beta1DeleteOrganizationResponse: + type: object + v1beta1DeleteOrganizationRoleResponse: + type: object + v1beta1DeletePermissionResponse: + type: object + v1beta1DeletePolicyResponse: + type: object + v1beta1DeleteProjectResourceResponse: + type: object + v1beta1DeleteProjectResponse: + type: object + v1beta1DeleteProspectResponse: + type: object + v1beta1DeleteRelationResponse: + type: object + v1beta1DeleteRoleResponse: + type: object + v1beta1DeleteServiceUserCredentialResponse: + type: object + v1beta1DeleteServiceUserJWKResponse: + type: object + v1beta1DeleteServiceUserResponse: + type: object + v1beta1DeleteServiceUserTokenResponse: + type: object + v1beta1DeleteUserResponse: + type: object + v1beta1DeleteWebhookResponse: + type: object + v1beta1DescribePreferencesResponse: + type: object + properties: + traits: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PreferenceTrait' + v1beta1DisableBillingAccountResponse: + type: object + v1beta1DisableGroupResponse: + type: object + v1beta1DisableOrganizationResponse: + type: object + v1beta1DisableProjectResponse: + type: object + v1beta1DisableUserResponse: + type: object + v1beta1Domain: + type: object + properties: + id: + type: string + example: 943e4567-e89b-12d3-a456-426655440000 + description: The domain id + name: + type: string + example: raystack.org + description: The domain name + org_id: + type: string + example: 123e4567-e89b-12d3-a456-426655440000 + description: The organization id + token: + type: string + example: _frontier-domain-verification=LB6U2lSQgGS55HOy6kpWFqkngRC8TMEjyrakfmYC2D0s+nfy/WkFSg== + description: The dns TXT record token to verify the domain + state: + type: string + example: pending + description: The domain state either pending or verified + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the domain whitelist request was created + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the org domain was updated + v1beta1EnableBillingAccountResponse: + type: object + v1beta1EnableGroupResponse: + type: object + v1beta1EnableOrganizationResponse: + type: object + v1beta1EnableProjectResponse: + type: object + v1beta1EnableUserResponse: + type: object + v1beta1Feature: + type: object + properties: + id: + type: string + name: + type: string + title: machine friendly name + product_ids: + type: array + items: + type: string + title: + type: string + title: human friendly name + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1FeatureRequestBody: + type: object + properties: + name: + type: string + title: machine friendly name + title: + type: string + title: human friendly title + product_ids: + type: array + items: + type: string + metadata: + type: object + v1beta1GenerateInvoicesRequest: + type: object + v1beta1GenerateInvoicesResponse: + type: object + v1beta1GetBillingAccountDetailsResponse: + type: object + properties: + credit_min: + type: string + format: int64 + title: |- + credit_min is the minimum credit limit for the billing account + default is 0, negative numbers work as overdraft, positive + numbers work as minimum purchase limit + due_in_days: + type: string + format: int64 + title: |- + due_in_days is the number of days after the invoice finalization + that it will be considered overdue, if set to 0, the customer will + be charged immediately + v1beta1GetBillingAccountResponse: + type: object + properties: + billing_account: + $ref: '#/definitions/v1beta1BillingAccount' + title: Billing account + payment_methods: + type: array + items: + type: object + $ref: '#/definitions/v1beta1PaymentMethod' + title: List of payment methods + billing_details: + $ref: '#/definitions/v1beta1BillingAccountDetails' + title: Billing details + v1beta1GetBillingBalanceResponse: + type: object + properties: + balance: + $ref: '#/definitions/BillingAccountBalance' + title: Balance of the billing account + v1beta1GetCheckoutResponse: + type: object + properties: + checkout_session: + $ref: '#/definitions/v1beta1CheckoutSession' + title: Checkout session + v1beta1GetCurrentAdminUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + service_user: + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1GetCurrentUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + serviceuser: + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1GetFeatureResponse: + type: object + properties: + feature: + $ref: '#/definitions/v1beta1Feature' + title: Feature + v1beta1GetGroupResponse: + type: object + properties: + group: + $ref: '#/definitions/v1beta1Group' + v1beta1GetJWKsResponse: + type: object + properties: + keys: + type: array + items: + type: object + $ref: '#/definitions/v1beta1JSONWebKey' + title: GetJWKsResponse is a valid JSON Web Key Set as specififed in rfc 7517 + v1beta1GetMetaSchemaResponse: + type: object + properties: + metaschema: + $ref: '#/definitions/v1beta1MetaSchema' + v1beta1GetNamespaceResponse: + type: object + properties: + namespace: + $ref: '#/definitions/v1beta1Namespace' + v1beta1GetOrganizationDomainResponse: + type: object + properties: + domain: + $ref: '#/definitions/v1beta1Domain' + v1beta1GetOrganizationInvitationResponse: + type: object + properties: + invitation: + $ref: '#/definitions/v1beta1Invitation' + v1beta1GetOrganizationKycResponse: + type: object + properties: + organization_kyc: + $ref: '#/definitions/v1beta1OrganizationKyc' + v1beta1GetOrganizationResponse: + type: object + properties: + organization: + $ref: '#/definitions/v1beta1Organization' + v1beta1GetOrganizationRoleResponse: + type: object + properties: + role: + $ref: '#/definitions/v1beta1Role' + v1beta1GetPermissionResponse: + type: object + properties: + permission: + $ref: '#/definitions/v1beta1Permission' + v1beta1GetPlanResponse: + type: object + properties: + plan: + $ref: '#/definitions/v1beta1Plan' + title: Plan + v1beta1GetPolicyResponse: + type: object + properties: + policy: + $ref: '#/definitions/v1beta1Policy' + v1beta1GetProductResponse: + type: object + properties: + product: + $ref: '#/definitions/v1beta1Product' + title: Product + v1beta1GetProjectResourceResponse: + type: object + properties: + resource: + $ref: '#/definitions/v1beta1Resource' + v1beta1GetProjectResponse: + type: object + properties: + project: + $ref: '#/definitions/frontierv1beta1Project' + v1beta1GetProspectResponse: + type: object + properties: + prospect: + $ref: '#/definitions/v1beta1Prospect' + v1beta1GetRelationResponse: + type: object + properties: + relation: + $ref: '#/definitions/v1beta1Relation' + v1beta1GetServiceUserJWKResponse: + type: object + properties: + keys: + type: array + items: + type: object + $ref: '#/definitions/v1beta1JSONWebKey' + v1beta1GetServiceUserResponse: + type: object + properties: + serviceuser: + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1GetSubscriptionResponse: + type: object + properties: + subscription: + $ref: '#/definitions/v1beta1Subscription' + v1beta1GetUpcomingInvoiceResponse: + type: object + properties: + invoice: + $ref: '#/definitions/frontierv1beta1Invoice' + title: Upcoming invoice + v1beta1GetUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + v1beta1Group: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + org_id: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the group was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the group was last updated. + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + readOnly: true + members_count: + type: integer + format: int32 + example: 2 + description: The number of members explicitly added in the project. + readOnly: true + v1beta1GroupRequestBody: + type: object + properties: + name: + type: string + description: The name of the group. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores. + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the group. Can also be left empty. + metadata: + type: object + description: 'Metadata object for groups that can hold key value pairs defined in Group Metaschema. The metadata object can be used to store arbitrary information about the group such as labels, descriptions etc. The default Group Metaschema contains labels and descripton fields. Update the Group Metaschema to add more fields.
*Example:*`{"labels": {"key": "value"}, "description": "Group description"}`' + required: + - name + v1beta1HasTrialedResponse: + type: object + properties: + trialed: + type: boolean + title: Has the billing account trialed the plan + v1beta1Invitation: + type: object + properties: + id: + type: string + example: k9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b + description: The unique invitation identifier. + user_id: + type: string + example: john.doe@raystack.org + description: The user email of the invited user. + org_id: + type: string + example: b9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b + description: The organization id to which the user is invited. + group_ids: + type: array + example: c9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b + items: + type: string + description: The list of group ids to which the user is invited. + metadata: + type: object + example: + key: value + description: The metadata of the invitation. + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the invitation was created. + expires_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the invitation expires. + role_ids: + type: array + example: d9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b + items: + type: string + description: The list of role ids to which the user is invited in an organization. + v1beta1JSONWebKey: + type: object + properties: + kty: + type: string + description: Key Type. + alg: + type: string + description: Algorithm. + use: + type: string + description: Permitted uses for the public keys. + kid: + type: string + description: Key ID. + "n": + type: string + description: Used for RSA keys. + e: + type: string + description: Used for RSA keys. + x: + type: string + description: Used for ECDSA keys. + "y": + type: string + description: Used for ECDSA keys. + crv: + type: string + description: Used for ECDSA keys. + title: JSON Web Key as specified in RFC 7517 + v1beta1JoinOrganizationResponse: + type: object + v1beta1KeyCredential: + type: object + properties: + type: + type: string + kid: + type: string + principal_id: + type: string + private_key: + type: string + title: RSA private key as string + readOnly: true + v1beta1ListAllBillingAccountsResponse: + type: object + properties: + billing_accounts: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BillingAccount' + v1beta1ListAllInvoicesResponse: + type: object + properties: + invoices: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Invoice' + count: + type: integer + format: int32 + description: Total number of records present + v1beta1ListAllOrganizationsResponse: + type: object + properties: + organizations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + count: + type: integer + format: int32 + description: Total number of records present + v1beta1ListAllServiceUsersResponse: + type: object + properties: + service_users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1ListAllUsersResponse: + type: object + properties: + count: + type: integer + format: int32 + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + v1beta1ListAuditRecordsResponse: + type: object + properties: + audit_records: + type: array + items: + type: object + $ref: '#/definitions/v1beta1AuditRecord' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1ListAuthStrategiesResponse: + type: object + properties: + strategies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1AuthStrategy' + v1beta1ListBillingAccountsResponse: + type: object + properties: + billing_accounts: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BillingAccount' + title: List of billing accounts + v1beta1ListBillingTransactionsResponse: + type: object + properties: + transactions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BillingTransaction' + title: List of transactions + v1beta1ListCheckoutsResponse: + type: object + properties: + checkout_sessions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1CheckoutSession' + title: List of checkouts + v1beta1ListCurrentUserGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Group' + access_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListCurrentUserGroupsResponseAccessPair' + v1beta1ListCurrentUserGroupsResponseAccessPair: + type: object + properties: + group_id: + type: string + permissions: + type: array + items: + type: string + v1beta1ListCurrentUserInvitationsResponse: + type: object + properties: + invitations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Invitation' + orgs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + v1beta1ListCurrentUserPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListFeaturesResponse: + type: object + properties: + features: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Feature' + v1beta1ListGroupPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListGroupUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + role_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListGroupUsersResponseRolePair' + v1beta1ListGroupUsersResponseRolePair: + type: object + properties: + user_id: + type: string + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Group' + v1beta1ListInvoicesResponse: + type: object + properties: + invoices: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Invoice' + title: List of invoices + v1beta1ListMetaSchemasResponse: + type: object + properties: + metaschemas: + type: array + items: + type: object + $ref: '#/definitions/v1beta1MetaSchema' + v1beta1ListNamespacesResponse: + type: object + properties: + namespaces: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Namespace' + v1beta1ListOrganizationAdminsResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + v1beta1ListOrganizationDomainsResponse: + type: object + properties: + domains: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Domain' + v1beta1ListOrganizationGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Group' + v1beta1ListOrganizationInvitationsResponse: + type: object + properties: + invitations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Invitation' + v1beta1ListOrganizationPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListOrganizationProjectsResponse: + type: object + properties: + projects: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Project' + v1beta1ListOrganizationRolesResponse: + type: object + properties: + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListOrganizationServiceUsersResponse: + type: object + properties: + serviceusers: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1ListOrganizationUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + role_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListOrganizationUsersResponseRolePair' + v1beta1ListOrganizationUsersResponseRolePair: + type: object + properties: + user_id: + type: string + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListOrganizationsByCurrentUserResponse: + type: object + properties: + organizations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + joinable_via_domain: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + v1beta1ListOrganizationsByUserResponse: + type: object + properties: + organizations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + joinable_via_domain: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + v1beta1ListOrganizationsKycResponse: + type: object + properties: + organizations_kyc: + type: array + items: + type: object + $ref: '#/definitions/v1beta1OrganizationKyc' + v1beta1ListOrganizationsResponse: + type: object + properties: + organizations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Organization' + v1beta1ListPermissionsResponse: + type: object + properties: + permissions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Permission' + v1beta1ListPlansResponse: + type: object + properties: + plans: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Plan' + title: List of plans + v1beta1ListPlatformUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + serviceusers: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1ListPoliciesResponse: + type: object + properties: + policies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Policy' + v1beta1ListPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListProductsResponse: + type: object + properties: + products: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Product' + title: List of products + v1beta1ListProjectAdminsResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + v1beta1ListProjectGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Group' + role_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListProjectGroupsResponseRolePair' + v1beta1ListProjectGroupsResponseRolePair: + type: object + properties: + group_id: + type: string + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListProjectPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListProjectResourcesResponse: + type: object + properties: + resources: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Resource' + v1beta1ListProjectServiceUsersResponse: + type: object + properties: + serviceusers: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUser' + role_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListProjectServiceUsersResponseRolePair' + v1beta1ListProjectServiceUsersResponseRolePair: + type: object + properties: + serviceuser_id: + type: string + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListProjectUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + role_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListProjectUsersResponseRolePair' + v1beta1ListProjectUsersResponseRolePair: + type: object + properties: + user_id: + type: string + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListProjectsByCurrentUserResponse: + type: object + properties: + projects: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Project' + access_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListProjectsByCurrentUserResponseAccessPair' + count: + type: integer + format: int32 + v1beta1ListProjectsByCurrentUserResponseAccessPair: + type: object + properties: + project_id: + type: string + permissions: + type: array + items: + type: string + v1beta1ListProjectsByUserResponse: + type: object + properties: + projects: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Project' + v1beta1ListProjectsResponse: + type: object + properties: + projects: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Project' + v1beta1ListProspectsResponse: + type: object + properties: + prospects: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Prospect' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1ListRelationsResponse: + type: object + properties: + relations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Relation' + v1beta1ListResourcesResponse: + type: object + properties: + resources: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Resource' + v1beta1ListRolesResponse: + type: object + properties: + roles: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Role' + v1beta1ListServiceUserCredentialsResponse: + type: object + properties: + secrets: + type: array + items: + type: object + $ref: '#/definitions/v1beta1SecretCredential' + title: secrets will be listed without the secret value + v1beta1ListServiceUserJWKsResponse: + type: object + properties: + keys: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUserJWK' + v1beta1ListServiceUserProjectsResponse: + type: object + properties: + projects: + type: array + items: + type: object + $ref: '#/definitions/frontierv1beta1Project' + access_pairs: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ListServiceUserProjectsResponseAccessPair' + v1beta1ListServiceUserProjectsResponseAccessPair: + type: object + properties: + project_id: + type: string + permissions: + type: array + items: + type: string + v1beta1ListServiceUserTokensResponse: + type: object + properties: + tokens: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUserToken' + v1beta1ListServiceUsersResponse: + type: object + properties: + serviceusers: + type: array + items: + type: object + $ref: '#/definitions/v1beta1ServiceUser' + v1beta1ListSessionsResponse: + type: object + properties: + sessions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Session' + v1beta1ListSubscriptionsResponse: + type: object + properties: + subscriptions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Subscription' + title: List of subscriptions + v1beta1ListUserGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Group' + v1beta1ListUserInvitationsResponse: + type: object + properties: + invitations: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Invitation' + v1beta1ListUserPreferencesResponse: + type: object + properties: + preferences: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Preference' + v1beta1ListUserSessionsResponse: + type: object + properties: + sessions: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Session' + v1beta1ListUsersResponse: + type: object + properties: + count: + type: integer + format: int32 + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + v1beta1ListWebhooksResponse: + type: object + properties: + webhooks: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Webhook' + v1beta1MetaSchema: + type: object + properties: + id: + type: string + example: a9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b + description: The unique metaschema uuid. + name: + type: string + schema: + type: string + example: + type: object + description: The metaschema json schema. + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the metaschema was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the metaschema was updated. + v1beta1MetaSchemaRequestBody: + type: object + properties: + name: + type: string + description: The name of the metaschema. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores. + schema: + type: string + description: The schema of the metaschema. The schema must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema. + required: + - name + - schema + v1beta1Namespace: + type: object + properties: + id: + type: string + name: + type: string + title: 'name could be in a format like: app/organization' + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the namespace was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the namespace was last updated. + v1beta1Organization: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the organization was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the organization was last updated. + state: + type: string + example: enabled + description: The state of the organization (enabled or disabled). + avatar: + type: string + description: The base64 encoded image string of the organization avatar. Should be less than 2MB. + v1beta1OrganizationKyc: + type: object + properties: + org_id: + type: string + status: + type: boolean + link: + type: string + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the organization kyc was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the organization kyc was last updated. + v1beta1PaymentMethod: + type: object + properties: + id: + type: string + customer_id: + type: string + provider_id: + type: string + type: + type: string + card_brand: + type: string + card_last4: + type: string + card_expiry_month: + type: string + format: int64 + card_expiry_year: + type: string + format: int64 + metadata: + type: object + created_at: + type: string + format: date-time + v1beta1Permission: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the permission was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the permission was last updated. + namespace: + type: string + metadata: + type: object + key: + type: string + example: compute.instance.get + description: Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. + v1beta1PermissionRequestBody: + type: object + properties: + name: + type: string + description: The name of the permission. It should be unique across a Frontier instance and can contain only alphanumeric characters. + namespace: + type: string + description: The namespace of the permission. The namespace should be in service/resource format.
*Example:*`compute/guardian` + title: namespace should be in service/resource format + metadata: + type: object + description: The metadata object for permissions that can hold key value pairs. + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the permissions. Can also be left empty. + key: + type: string + example: compute.instance.get + description: Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. Namespace name cannot be `app` as it's reserved for core permissions. + title: |- + key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. + Use this instead of using name and namespace fields + v1beta1PingUserSessionResponse: + type: object + properties: + metadata: + $ref: '#/definitions/SessionMeta' + v1beta1Plan: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + description: + type: string + products: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Product' + interval: + type: string + title: known intervals are "day", "week", "month", and "year" + on_start_credits: + type: string + format: int64 + trial_days: + type: string + format: int64 + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1PlanRequestBody: + type: object + properties: + name: + type: string + title: + type: string + description: + type: string + products: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Product' + interval: + type: string + title: known intervals are "day", "week", "month", and "year" + on_start_credits: + type: string + format: int64 + trial_days: + type: string + format: int64 + metadata: + type: object + v1beta1Policy: + type: object + properties: + id: + type: string + title: + type: string + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the policy was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the policy was last updated. + role_id: + type: string + resource: + type: string + title: namespace:uuid + principal: + type: string + title: namespace:uuid + metadata: + type: object + v1beta1PolicyRequestBody: + type: object + properties: + role_id: + type: string + description: unique id of the role to which policy is assigned + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
*Example:* `Policy title` + resource: + type: string + description: The resource to which policy is assigned in this format `namespace:uuid`.
*Example:* `app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2` + principal: + type: string + description: principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal.
*Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825` + metadata: + type: object + description: 'Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
*Example:* `{"labels": {"key": "value"}, "description": "Policy description"}`' + required: + - role_id + - resource + - principal + v1beta1Preference: + type: object + properties: + id: + type: string + name: + type: string + value: + type: string + resource_id: + type: string + resource_type: + type: string + scope_type: + type: string + title: |- + scope_type defines the context type for scoped preferences (e.g., "app/organization") + If empty, the preference is global (not scoped to any context) + scope_id: + type: string + title: |- + scope_id is the identifier of the scope context (e.g., organization ID) + Only applicable when scope_type is set + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the preference was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the preference was updated. + v1beta1PreferenceRequestBody: + type: object + properties: + name: + type: string + value: + type: string + scope_type: + type: string + title: |- + scope_type defines the context type for scoped preferences (e.g., "app/organization") + If empty, the preference is global (not scoped to any context) + scope_id: + type: string + title: |- + scope_id is the identifier of the scope context (e.g., organization ID) + Only applicable when scope_type is set + v1beta1PreferenceTrait: + type: object + properties: + resource_type: + type: string + name: + type: string + title: + type: string + description: + type: string + long_description: + type: string + heading: + type: string + sub_heading: + type: string + breadcrumb: + type: string + default: + type: string + input_hints: + type: string + input_type: + $ref: '#/definitions/PreferenceTraitInputType' + title: |- + PreferenceTrait is a trait that can be used to add preferences to a resource + it explains what preferences are available for a resource + v1beta1Price: + type: object + properties: + id: + type: string + product_id: + type: string + provider_id: + type: string + name: + type: string + interval: + type: string + title: known intervals are "day", "week", "month", and "year" + usage_type: + type: string + title: usage_type known types are "licensed" and "metered" + billing_scheme: + type: string + title: billing_scheme known schemes are "tiered" and "flat" + state: + type: string + currency: + type: string + title: currency like "usd", "eur", "gbp" + amount: + type: string + format: int64 + metered_aggregate: + type: string + title: metered_aggregate known aggregations are "sum", "last_during_period" and "max" + tier_mode: + type: string + title: tier_mode known modes are "graduated" and "volume" + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1Product: + type: object + properties: + id: + type: string + name: + type: string + title: + type: string + description: + type: string + plan_ids: + type: array + items: + type: string + state: + type: string + prices: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Price' + behavior: + type: string + features: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Feature' + behavior_config: + $ref: '#/definitions/ProductBehaviorConfig' + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1ProductRequestBody: + type: object + properties: + name: + type: string + title: + type: string + description: + type: string + plan_id: + type: string + prices: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Price' + behavior: + type: string + features: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Feature' + behavior_config: + $ref: '#/definitions/ProductBehaviorConfig' + metadata: + type: object + v1beta1ProjectRequestBody: + type: object + properties: + name: + type: string + description: The name of the project. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:* `frontier-playground` + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the project. Can also be left empty.
*Example:* `Frontier Playground` + metadata: + type: object + description: Metadata object for projects that can hold key value pairs defined in Project Metaschema. + org_id: + type: string + description: unique id of the organization to which project belongs + required: + - name + - org_id + v1beta1Prospect: + type: object + properties: + id: + type: string + name: + type: string + email: + type: string + phone: + type: string + activity: + type: string + status: + $ref: '#/definitions/v1beta1ProspectStatus' + changed_at: + type: string + format: date-time + source: + type: string + verified: + type: boolean + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + metadata: + type: object + v1beta1ProspectStatus: + type: string + enum: + - STATUS_UNSPECIFIED + - STATUS_UNSUBSCRIBED + - STATUS_SUBSCRIBED + default: STATUS_UNSPECIFIED + title: subscription status + v1beta1RQLExportRequest: + type: object + properties: + filters: + type: array + items: + type: object + $ref: '#/definitions/v1beta1RQLFilter' + search: + type: string + sort: + type: array + items: + type: object + $ref: '#/definitions/v1beta1RQLSort' + v1beta1RQLFilter: + type: object + properties: + name: + type: string + operator: + type: string + bool_value: + type: boolean + string_value: + type: string + number_value: + type: number + format: float + v1beta1RQLQueryGroupData: + type: object + properties: + name: + type: string + count: + type: integer + format: int64 + v1beta1RQLQueryGroupResponse: + type: object + properties: + name: + type: string + data: + type: array + items: + type: object + $ref: '#/definitions/v1beta1RQLQueryGroupData' + v1beta1RQLQueryPaginationResponse: + type: object + properties: + offset: + type: integer + format: int64 + limit: + type: integer + format: int64 + total_count: + type: integer + format: int64 + v1beta1RQLRequest: + type: object + properties: + filters: + type: array + items: + type: object + $ref: '#/definitions/v1beta1RQLFilter' + group_by: + type: array + items: + type: string + offset: + type: integer + format: int64 + limit: + type: integer + format: int64 + search: + type: string + sort: + type: array + items: + type: object + $ref: '#/definitions/v1beta1RQLSort' + v1beta1RQLSort: + type: object + properties: + name: + type: string + order: + type: string + v1beta1RegisterBillingAccountResponse: + type: object + v1beta1Relation: + type: object + properties: + id: + type: string + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the relation was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the relation was last updated. + subject_sub_relation: + type: string + relation: + type: string + object: + type: string + title: objectnamespace:id + subject: + type: string + title: subjectnamespace:id + v1beta1RelationRequestBody: + type: object + properties: + object: + type: string + title: objectnamespace:uuid + subject: + type: string + title: subjectnamespace:uuid + relation: + type: string + subject_sub_relation: + type: string + v1beta1RemoveGroupUserResponse: + type: object + v1beta1RemoveOrganizationUserResponse: + type: object + v1beta1RemovePlatformUserRequest: + type: object + properties: + user_id: + type: string + description: The user id to remove from the the platform. + serviceuser_id: + type: string + description: The service user id to remove from the the platform. + v1beta1RemovePlatformUserResponse: + type: object + v1beta1Resource: + type: object + properties: + id: + type: string + name: + type: string + description: Name of the resource. Must be unique within the project. + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the resource was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the resource was last updated. + urn: + type: string + project_id: + type: string + namespace: + type: string + principal: + type: string + metadata: + type: object + title: + type: string + v1beta1ResourceRequestBody: + type: object + properties: + name: + type: string + description: The name of the resource. Must be unique within the project.
*Example:* `my-resource` + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the resource. Can also be left empty. + namespace: + type: string + description: The namespace of the resource. The resource namespace are created when permissions for that resource is created in Frontier. If namespace doesn't exists the request will fail.
*Example:* `compute/instance` + principal: + type: string + description: UserID or ServiceUserID that should be marked as owner of the resource. If not provided, the current logged in user will be made the resource owner.
*Example:* `user:92f69c3a-334b-4f25-90b8-4d4f3be6b825` + title: format namespace:uuid or just uuid for user + metadata: + type: object + required: + - name + - namespace + v1beta1RevertBillingUsageRequest: + type: object + properties: + org_id: + type: string + project_id: + type: string + title: DEPRECATED + billing_id: + type: string + title: 'DEPRECATED: billing_id will be inferred from org_id' + usage_id: + type: string + title: usage id to revert, a usage can only be allowed to revert once + amount: + type: string + format: int64 + title: amount should be equal or less than the usage amount + v1beta1RevertBillingUsageResponse: + type: object + v1beta1RevokeSessionResponse: + type: object + v1beta1RevokeUserSessionResponse: + type: object + v1beta1Role: + type: object + properties: + id: + type: string + name: + type: string + permissions: + type: array + items: + type: string + title: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the role was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the role was last updated. + org_id: + type: string + state: + type: string + scopes: + type: array + items: + type: string + v1beta1RoleRequestBody: + type: object + properties: + name: + type: string + permissions: + type: array + items: + type: string + metadata: + type: object + title: + type: string + scopes: + type: array + items: + type: string + v1beta1SearchInvoicesResponse: + type: object + properties: + invoices: + type: array + items: + type: object + $ref: '#/definitions/v1beta1SearchInvoicesResponseInvoice' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchInvoicesResponseInvoice: + type: object + properties: + id: + type: string + amount: + type: string + format: int64 + currency: + type: string + state: + type: string + invoice_link: + type: string + created_at: + type: string + format: date-time + org_id: + type: string + org_name: + type: string + org_title: + type: string + v1beta1SearchOrganizationInvoicesResponse: + type: object + properties: + organization_invoices: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationInvoicesResponseOrganizationInvoice' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationProjectsResponse: + type: object + properties: + org_projects: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationProjectsResponseOrganizationProject' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationServiceUserCredentialsResponse: + type: object + properties: + organization_serviceuser_credentials: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationServiceUserCredentialsResponseOrganizationServiceUserCredential' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationServiceUsersResponse: + type: object + properties: + organization_service_users: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationServiceUsersResponseOrganizationServiceUser' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationServiceUsersResponseProject: + type: object + properties: + id: + type: string + title: + type: string + name: + type: string + v1beta1SearchOrganizationTokensResponse: + type: object + properties: + organization_tokens: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationTokensResponseOrganizationToken' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationUsersResponse: + type: object + properties: + org_users: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationUsersResponseOrganizationUser' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchOrganizationsResponse: + type: object + properties: + organizations: + type: array + items: + type: object + $ref: '#/definitions/SearchOrganizationsResponseOrganizationResult' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchProjectUsersResponse: + type: object + properties: + project_users: + type: array + items: + type: object + $ref: '#/definitions/SearchProjectUsersResponseProjectUser' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchUserOrganizationsResponse: + type: object + properties: + user_organizations: + type: array + items: + type: object + $ref: '#/definitions/SearchUserOrganizationsResponseUserOrganization' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchUserProjectsResponse: + type: object + properties: + user_projects: + type: array + items: + type: object + $ref: '#/definitions/SearchUserProjectsResponseUserProject' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SearchUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1beta1User' + pagination: + $ref: '#/definitions/v1beta1RQLQueryPaginationResponse' + group: + $ref: '#/definitions/v1beta1RQLQueryGroupResponse' + v1beta1SecretCredential: + type: object + properties: + id: + type: string + title: + type: string + secret: + type: string + title: |- + secret will only be returned once as part of the create process + this value is never persisted in the system so if lost, can't be recovered + readOnly: true + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the secret was created. + v1beta1ServiceUser: + type: object + properties: + id: + type: string + title: + type: string + example: Order Service + description: User friendly name of the service user. + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the user was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the user was last updated. + state: + type: string + org_id: + type: string + v1beta1ServiceUserJWK: + type: object + properties: + id: + type: string + title: + type: string + principal_id: + type: string + public_key: + type: string + readOnly: true + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the secret was created. + v1beta1ServiceUserRequestBody: + type: object + properties: + title: + type: string + example: Order Service + description: User friendly name of the service user. + metadata: + type: object + v1beta1ServiceUserToken: + type: object + properties: + id: + type: string + title: + type: string + token: + type: string + title: |- + token will only be returned once as part of the create process + this value is never persisted in the system so if lost, can't be recovered + readOnly: true + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time when the token was created. + v1beta1Session: + type: object + properties: + id: + type: string + metadata: + $ref: '#/definitions/SessionMeta' + is_current_session: + type: boolean + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1SetOrganizationKycResponse: + type: object + properties: + organization_kyc: + $ref: '#/definitions/v1beta1OrganizationKyc' + v1beta1Subscription: + type: object + properties: + id: + type: string + customer_id: + type: string + provider_id: + type: string + plan_id: + type: string + state: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + canceled_at: + type: string + format: date-time + ended_at: + type: string + format: date-time + trial_ends_at: + type: string + format: date-time + current_period_start_at: + type: string + format: date-time + current_period_end_at: + type: string + format: date-time + billing_cycle_anchor_at: + type: string + format: date-time + phases: + type: array + items: + type: object + $ref: '#/definitions/SubscriptionPhase' + customer: + $ref: '#/definitions/v1beta1BillingAccount' + readOnly: true + plan: + $ref: '#/definitions/v1beta1Plan' + readOnly: true + v1beta1TotalDebitedTransactionsResponse: + type: object + properties: + debited: + $ref: '#/definitions/BillingAccountBalance' + title: Total debited amount in the billing account + v1beta1UpdateBillingAccountDetailsResponse: + type: object + v1beta1UpdateBillingAccountLimitsResponse: + type: object + v1beta1UpdateBillingAccountResponse: + type: object + properties: + billing_account: + $ref: '#/definitions/v1beta1BillingAccount' + title: Updated billing account + v1beta1UpdateCurrentUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + v1beta1UpdateFeatureResponse: + type: object + properties: + feature: + $ref: '#/definitions/v1beta1Feature' + title: Updated feature + v1beta1UpdateGroupResponse: + type: object + properties: + group: + $ref: '#/definitions/v1beta1Group' + v1beta1UpdateMetaSchemaResponse: + type: object + properties: + metaschema: + $ref: '#/definitions/v1beta1MetaSchema' + v1beta1UpdateOrganizationResponse: + type: object + properties: + organization: + $ref: '#/definitions/v1beta1Organization' + v1beta1UpdateOrganizationRoleResponse: + type: object + properties: + role: + $ref: '#/definitions/v1beta1Role' + v1beta1UpdatePermissionResponse: + type: object + properties: + permission: + $ref: '#/definitions/v1beta1Permission' + v1beta1UpdatePlanResponse: + type: object + properties: + plan: + $ref: '#/definitions/v1beta1Plan' + title: Updated plan + v1beta1UpdatePolicyResponse: + type: object + properties: + policies: + type: array + items: + type: object + $ref: '#/definitions/v1beta1Policy' + v1beta1UpdateProductResponse: + type: object + properties: + product: + $ref: '#/definitions/v1beta1Product' + title: Updated product + v1beta1UpdateProjectResourceResponse: + type: object + properties: + resource: + $ref: '#/definitions/v1beta1Resource' + v1beta1UpdateProjectResponse: + type: object + properties: + project: + $ref: '#/definitions/frontierv1beta1Project' + v1beta1UpdateProspectResponse: + type: object + properties: + prospect: + $ref: '#/definitions/v1beta1Prospect' + v1beta1UpdateRoleResponse: + type: object + properties: + role: + $ref: '#/definitions/v1beta1Role' + v1beta1UpdateSubscriptionResponse: + type: object + properties: + subscription: + $ref: '#/definitions/v1beta1Subscription' + title: Updated subscription + v1beta1UpdateUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1beta1User' + v1beta1UpdateWebhookResponse: + type: object + properties: + webhook: + $ref: '#/definitions/v1beta1Webhook' + v1beta1Usage: + type: object + properties: + id: + type: string + title: uuid used as an idempotent key + customer_id: + type: string + source: + type: string + title: additional metadata for storing event/service that triggered this usage + description: + type: string + type: + type: string + title: |- + Type is the type of usage, it can be credit or feature + if credit, the amount is the amount of credits that were consumed + if feature, the amount is the amount of features that were used + amount: + type: string + format: int64 + user_id: + type: string + title: user_id is the user that triggered this usage + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1User: + type: object + properties: + id: + type: string + name: + type: string + example: johndoe + description: Unique name of the user. + title: can either be empty or must start with a character + title: + type: string + example: John Doe + description: Name of the user. + email: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the user was created. + updated_at: + type: string + format: date-time + example: "2023-06-07T05:39:56.961Z" + description: The time the user was last updated. + state: + type: string + example: enabled + description: The state of the user (enabled or disabled). + avatar: + type: string + description: The base64 encoded image string of the user avatar. Should be less than 2MB. + v1beta1UserRequestBody: + type: object + properties: + name: + type: string + description: 'The name of the user. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores and must start with a letter. If not provided, Frontier automatically generates a name from the user email. ' + email: + type: string + description: The email of the user. The email must be unique within the entire Frontier instance.
*Example:*`"john.doe@raystack.org"` + metadata: + type: object + description: 'Metadata object for users that can hold key value pairs pre-defined in User Metaschema. The metadata object can be used to store arbitrary information about the user such as label, description etc. By default the user metaschema contains labels and descriptions for the user. Update the same to add more fields to the user metadata object.
*Example:*`{"label": {"key1": "value1"}, "description": "User Description"}`' + title: + type: string + description: The title can contain any UTF-8 character, used to provide a human-readable name for the user. Can also be left empty.
*Example:*`"John Doe"` + avatar: + type: string + example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAA + description: The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`. + required: + - email + v1beta1VerifyOrganizationDomainResponse: + type: object + properties: + state: + type: string + v1beta1Webhook: + type: object + properties: + id: + type: string + description: + type: string + url: + type: string + subscribed_events: + type: array + items: + type: string + headers: + type: object + additionalProperties: + type: string + title: headers to be sent with the webhook + secrets: + type: array + items: + type: object + $ref: '#/definitions/WebhookSecret' + title: |- + secret to sign the payload, there could be multiple enabled secrets for a webhook + but only one will be used to sign the payload, this is useful for rotating secrets + state: + type: string + metadata: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + v1beta1WebhookRequestBody: + type: object + properties: + url: + type: string + title: URL to send the webhook to (valid absolute URI via RFC 3986) + description: + type: string + subscribed_events: + type: array + items: + type: string + title: events to subscribe to, if empty all events are subscribed + headers: + type: object + additionalProperties: + type: string + title: headers to be sent with the webhook + state: + type: string + metadata: + type: object +securityDefinitions: + Basic: + type: basic + description: use Client ID as username and Client Secret as password + name: 'Basic ' + in: header + Bearer: + type: oauth2 + description: 'Access token or JWT token, prefixed by Bearer: Bearer ' + name: 'Bearer ' + in: header +security: + - Basic: [] + - Bearer: [] diff --git a/examples/basic/petstore.json b/examples/basic/petstore.json new file mode 100644 index 00000000..0c7cc755 --- /dev/null +++ b/examples/basic/petstore.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.7","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"petstore.swagger.io","basePath":"/v2","tags":[{"name":"pet","description":"Everything about your Pets","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"store","description":"Access to Petstore orders"},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find out more about our store","url":"http://swagger.io"}}],"schemes":["https","http"],"paths":{"/pet/{petId}/uploadImage":{"post":{"tags":["pet"],"summary":"uploads an image","description":"","operationId":"uploadFile","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"type":"integer","format":"int64"},{"name":"additionalMetadata","in":"formData","description":"Additional data to pass to server","required":false,"type":"string"},{"name":"file","in":"formData","description":"file to upload","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiResponse"}}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet":{"post":{"tags":["pet"],"summary":"Add a new pet to the store","description":"","operationId":"addPet","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"put":{"tags":["pet"],"summary":"Update an existing pet","description":"","operationId":"updatePet","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Pet object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByStatus":{"get":{"tags":["pet"],"summary":"Finds Pets by status","description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","produces":["application/json","application/xml"],"parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByTags":{"get":{"tags":["pet"],"summary":"Finds Pets by tags","description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","produces":["application/json","application/xml"],"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"deprecated":true}},"/pet/{petId}":{"get":{"tags":["pet"],"summary":"Find pet by ID","description":"Returns a single pet","operationId":"getPetById","produces":["application/json","application/xml"],"parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Pet"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}]},"post":{"tags":["pet"],"summary":"Updates a pet in the store with form data","description":"","operationId":"updatePetWithForm","consumes":["application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"type":"integer","format":"int64"},{"name":"name","in":"formData","description":"Updated name of the pet","required":false,"type":"string"},{"name":"status","in":"formData","description":"Updated status of the pet","required":false,"type":"string"}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"delete":{"tags":["pet"],"summary":"Deletes a pet","description":"","operationId":"deletePet","produces":["application/json","application/xml"],"parameters":[{"name":"api_key","in":"header","required":false,"type":"string"},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"type":"integer","format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/store/inventory":{"get":{"tags":["store"],"summary":"Returns pet inventories by status","description":"Returns a map of status codes to quantities","operationId":"getInventory","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}},"security":[{"api_key":[]}]}},"/store/order":{"post":{"tags":["store"],"summary":"Place an order for a pet","description":"","operationId":"placeOrder","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"order placed for purchasing the pet","required":true,"schema":{"$ref":"#/definitions/Order"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid Order"}}}},"/store/order/{orderId}":{"get":{"tags":["store"],"summary":"Find purchase order by ID","description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions","operationId":"getOrderById","produces":["application/json","application/xml"],"parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"type":"integer","maximum":10,"minimum":1,"format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}},"delete":{"tags":["store"],"summary":"Delete purchase order by ID","description":"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors","operationId":"deleteOrder","produces":["application/json","application/xml"],"parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"type":"integer","minimum":1,"format":"int64"}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}}}},"/user/createWithList":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithListInput","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user/{username}":{"get":{"tags":["user"],"summary":"Get user by user name","description":"","operationId":"getUserByName","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/User"}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}},"put":{"tags":["user"],"summary":"Updated user","description":"This can only be done by the logged in user.","operationId":"updateUser","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"name that need to be updated","required":true,"type":"string"},{"in":"body","name":"body","description":"Updated user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}}},"delete":{"tags":["user"],"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"deleteUser","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"type":"string"}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}}}},"/user/login":{"get":{"tags":["user"],"summary":"Logs user into the system","description":"","operationId":"loginUser","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid username/password supplied"}}}},"/user/logout":{"get":{"tags":["user"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/user/createWithArray":{"post":{"tags":["user"],"summary":"Creates list of users with given input array","description":"","operationId":"createUsersWithArrayInput","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"List of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful operation"}}}},"/user":{"post":{"tags":["user"],"summary":"Create user","description":"This can only be done by the logged in user.","operationId":"createUser","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Created user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"default":{"description":"successful operation"}}}}},"securityDefinitions":{"api_key":{"type":"apiKey","name":"api_key","in":"header"},"petstore_auth":{"type":"oauth2","authorizationUrl":"https://petstore.swagger.io/oauth/authorize","flow":"implicit","scopes":{"read:pets":"read your pets","write:pets":"modify pets in your account"}}},"definitions":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}},"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Category"}},"Pet":{"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64"},"category":{"$ref":"#/definitions/Category"},"name":{"type":"string","example":"doggie"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"xml":{"name":"tag"},"$ref":"#/definitions/Tag"}},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"xml":{"name":"Pet"}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Tag"}},"Order":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"petId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean"}},"xml":{"name":"Order"}},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User Status"}},"xml":{"name":"User"}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}} \ No newline at end of file diff --git a/packages/chronicle/next-env.d.ts b/packages/chronicle/next-env.d.ts index 9edff1c7..c4b7818f 100644 --- a/packages/chronicle/next-env.d.ts +++ b/packages/chronicle/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/packages/chronicle/package.json b/packages/chronicle/package.json index c0139531..af1d4ab4 100644 --- a/packages/chronicle/package.json +++ b/packages/chronicle/package.json @@ -21,14 +21,21 @@ "@types/node": "^25.1.0", "@types/react": "^19.2.10", "@types/react-dom": "^19.2.3", + "openapi-types": "^12.1.3", "tsup": "^8.5.1", "tsx": "^4.21.0", "typescript": "5.9.3" }, "dependencies": { + "@codemirror/lang-json": "^6.0.2", + "@codemirror/state": "^6.5.4", + "@codemirror/theme-one-dark": "^6.1.3", + "@codemirror/view": "^6.39.14", "@heroicons/react": "^2.2.0", "@raystack/apsara": "^0.56.0", "chalk": "^5.6.2", + "class-variance-authority": "^0.7.1", + "codemirror": "^6.0.2", "commander": "^14.0.2", "fumadocs-core": "^16.4.9", "fumadocs-mdx": "^14.2.6", @@ -38,6 +45,7 @@ "react-device-detect": "^2.2.3", "react-dom": "^19.0.0", "remark-attr": "^0.11.1", + "slugify": "^1.6.6", "yaml": "^2.8.2", "zod": "^4.3.6" } diff --git a/packages/chronicle/src/app/api/apis-proxy/route.ts b/packages/chronicle/src/app/api/apis-proxy/route.ts new file mode 100644 index 00000000..1e2593c3 --- /dev/null +++ b/packages/chronicle/src/app/api/apis-proxy/route.ts @@ -0,0 +1,59 @@ +import { NextRequest, NextResponse } from "next/server"; +import { loadConfig } from "../../../lib/config"; +import { loadApiSpecs } from "../../../lib/openapi"; + +export async function POST(request: NextRequest) { + const { specName, method, path, headers, body } = await request.json(); + + if (!specName || !method || !path) { + return NextResponse.json( + { error: "Missing specName, method, or path" }, + { status: 400 }, + ); + } + + const config = loadConfig(); + const specs = loadApiSpecs(config.api ?? []); + const spec = specs.find((s) => s.name === specName); + + if (!spec) { + return NextResponse.json( + { error: `Unknown spec: ${specName}` }, + { status: 404 }, + ); + } + + const url = spec.server.url + path; + + try { + const response = await fetch(url, { + method, + headers, + body: body ? JSON.stringify(body) : undefined, + }); + + const contentType = response.headers.get("content-type") ?? ""; + const responseBody = contentType.includes("application/json") + ? await response.json() + : await response.text(); + + return NextResponse.json({ + status: response.status, + statusText: response.statusText, + body: responseBody, + }, { status: response.status }); + } catch (error) { + const message = + error instanceof Error + ? `${error.message}${error.cause ? `: ${(error.cause as Error).message}` : ""}` + : "Request failed"; + return NextResponse.json( + { + status: 502, + statusText: "Bad Gateway", + body: `Could not reach ${url}\n${message}`, + }, + { status: 502 }, + ); + } +} diff --git a/packages/chronicle/src/app/api/search/route.ts b/packages/chronicle/src/app/api/search/route.ts index b4e3a93b..328f31b6 100644 --- a/packages/chronicle/src/app/api/search/route.ts +++ b/packages/chronicle/src/app/api/search/route.ts @@ -1,6 +1,10 @@ import { source } from '../../../lib/source' import { createSearchAPI, type AdvancedIndex } from 'fumadocs-core/search/server' import type { StructuredData } from 'fumadocs-core/mdx-plugins' +import type { OpenAPIV3 } from 'openapi-types' +import { loadConfig } from '../../../lib/config' +import { loadApiSpecs, type ApiSpec } from '../../../lib/openapi' +import { getSpecSlug } from '../../../lib/api-routes' interface PageData { title?: string @@ -9,6 +13,52 @@ interface PageData { load?: () => Promise<{ structuredData?: StructuredData }> } +const HTTP_METHODS = ['get', 'post', 'put', 'delete', 'patch'] as const +type HttpMethod = (typeof HTTP_METHODS)[number] + +function getParamNames(op: OpenAPIV3.OperationObject): string[] { + const params = (op.parameters as OpenAPIV3.ParameterObject[] | undefined) ?? [] + return params.map((p) => p.name) +} + +function buildStructuredData(op: OpenAPIV3.OperationObject, method: string, pathStr: string) { + return { + headings: [{ id: op.operationId!, content: `${method.toUpperCase()} ${pathStr}` }], + contents: [{ heading: op.operationId!, content: `${method.toUpperCase()} ${[op.description, ...getParamNames(op)].filter(Boolean).join(' ')}` }], + } +} + +function operationToIndex(specSlug: string, pathStr: string, method: HttpMethod, op: OpenAPIV3.OperationObject): AdvancedIndex { + const url = `/apis/${specSlug}/${encodeURIComponent(op.operationId!)}` + return { + id: url, + url, + title: `${method.toUpperCase()} ${op.summary ?? op.operationId!}`, + description: op.description ?? '', + structuredData: buildStructuredData(op, method, pathStr), + } +} + +function pathEntryToIndexes(specSlug: string) { + return ([pathStr, pathItem]: [string, OpenAPIV3.PathItemObject | undefined]): AdvancedIndex[] => { + if (!pathItem) return [] + const hasOp = (m: HttpMethod) => !!pathItem[m]?.operationId + const toIndex = (m: HttpMethod) => operationToIndex(specSlug, pathStr, m, pathItem[m]!) + return HTTP_METHODS.filter(hasOp).map(toIndex) + } +} + +function specToIndexes(spec: ApiSpec): AdvancedIndex[] { + const specSlug = getSpecSlug(spec) + return Object.entries(spec.document.paths ?? {}).flatMap(pathEntryToIndexes(specSlug)) +} + +function buildApiIndexes(): AdvancedIndex[] { + const config = loadConfig() + if (!config.api?.length) return [] + return loadApiSpecs(config.api).flatMap(specToIndexes) +} + export const { GET } = createSearchAPI('advanced', { indexes: async (): Promise => { const pages = source.getPages() @@ -35,6 +85,6 @@ export const { GET } = createSearchAPI('advanced', { } }) ) - return indexes + return [...indexes, ...buildApiIndexes()] }, }) diff --git a/packages/chronicle/src/app/apis/[[...slug]]/layout.module.css b/packages/chronicle/src/app/apis/[[...slug]]/layout.module.css new file mode 100644 index 00000000..6e1094e7 --- /dev/null +++ b/packages/chronicle/src/app/apis/[[...slug]]/layout.module.css @@ -0,0 +1,17 @@ +.layout { + height: 100vh; + overflow: hidden; +} + +.body { + overflow: hidden; +} + +.sidebar { + height: 100%; +} + +.content { + height: 100%; + overflow-y: auto; +} diff --git a/packages/chronicle/src/app/apis/[[...slug]]/layout.tsx b/packages/chronicle/src/app/apis/[[...slug]]/layout.tsx new file mode 100644 index 00000000..b27b9c05 --- /dev/null +++ b/packages/chronicle/src/app/apis/[[...slug]]/layout.tsx @@ -0,0 +1,22 @@ +import { loadConfig } from '../../../lib/config' +import { loadApiSpecs } from '../../../lib/openapi' +import { buildApiPageTree } from '../../../lib/api-routes' +import { Layout } from '../../../themes/default' +import styles from './layout.module.css' + +export default function ApiLayout({ children }: { children: React.ReactNode }) { + const config = loadConfig() + const specs = loadApiSpecs(config.api ?? []) + const tree = buildApiPageTree(specs) + + return ( + + {children} + + ) +} diff --git a/packages/chronicle/src/app/apis/[[...slug]]/page.tsx b/packages/chronicle/src/app/apis/[[...slug]]/page.tsx new file mode 100644 index 00000000..7c2c6a93 --- /dev/null +++ b/packages/chronicle/src/app/apis/[[...slug]]/page.tsx @@ -0,0 +1,57 @@ +import { notFound } from 'next/navigation' +import type { OpenAPIV3 } from 'openapi-types' +import { Flex, Headline, Text } from '@raystack/apsara' +import { loadConfig } from '../../../lib/config' +import { loadApiSpecs } from '../../../lib/openapi' +import { buildApiRoutes, findApiOperation } from '../../../lib/api-routes' +import { EndpointPage } from '../../../components/api' + +interface PageProps { + params: Promise<{ slug?: string[] }> +} + +export default async function ApiPage({ params }: PageProps) { + const { slug } = await params + const config = loadConfig() + const specs = loadApiSpecs(config.api ?? []) + + if (!slug || slug.length === 0) { + return + } + + const match = findApiOperation(specs, slug) + if (!match) notFound() + + return ( + + ) +} + +function ApiLanding({ specs }: { specs: { name: string; document: OpenAPIV3.Document }[] }) { + return ( + + API Reference + {specs.map((spec) => ( + + {spec.name} + {spec.document.info.description && ( + {spec.document.info.description} + )} + + ))} + + ) +} + +export function generateStaticParams() { + const config = loadConfig() + const specs = loadApiSpecs(config.api ?? []) + return [{ slug: [] }, ...buildApiRoutes(specs)] +} diff --git a/packages/chronicle/src/app/layout.tsx b/packages/chronicle/src/app/layout.tsx index 40f38eb5..3c71cbff 100644 --- a/packages/chronicle/src/app/layout.tsx +++ b/packages/chronicle/src/app/layout.tsx @@ -1,3 +1,4 @@ +import '@raystack/apsara/normalize.css' import '@raystack/apsara/style.css' import type { Metadata } from 'next' import { loadConfig } from '../lib/config' diff --git a/packages/chronicle/src/components/api/code-snippets.module.css b/packages/chronicle/src/components/api/code-snippets.module.css new file mode 100644 index 00000000..2ec0429e --- /dev/null +++ b/packages/chronicle/src/components/api/code-snippets.module.css @@ -0,0 +1,7 @@ +.snippets { + width: 100%; +} + +.snippets :global([class*="code-block-module_header"]) { + justify-content: space-between; +} diff --git a/packages/chronicle/src/components/api/code-snippets.tsx b/packages/chronicle/src/components/api/code-snippets.tsx new file mode 100644 index 00000000..717f2e39 --- /dev/null +++ b/packages/chronicle/src/components/api/code-snippets.tsx @@ -0,0 +1,76 @@ +"use client"; + +import { useMemo, useState } from "react"; +import { CodeBlock } from "@raystack/apsara"; +import { + generateCurl, + generatePython, + generateGo, + generateTypeScript, +} from "../../lib/snippet-generators"; +import styles from "./code-snippets.module.css"; + +interface CodeSnippetsProps { + method: string; + url: string; + headers: Record; + body?: string; +} + +const languages = [ + { value: "curl", label: "cURL", lang: "curl", generate: generateCurl }, + { + value: "python", + label: "Python", + lang: "python", + generate: generatePython, + }, + { value: "go", label: "Go", lang: "go", generate: generateGo }, + { + value: "typescript", + label: "TypeScript", + lang: "typescript", + generate: generateTypeScript, + }, +]; + +export function CodeSnippets({ + method, + url, + headers, + body, +}: CodeSnippetsProps) { + const opts = { method, url, headers, body }; + const [selected, setSelected] = useState("curl"); + const current = languages.find((l) => l.value === selected) ?? languages[0]; + + const code = useMemo( + () => current.generate(opts), + [selected, method, url, headers, body], + ); + + return ( + + + + + + {languages.map((l) => ( + + {l.label} + + ))} + + + + + + {code} + + + ); +} diff --git a/packages/chronicle/src/components/api/endpoint-page.module.css b/packages/chronicle/src/components/api/endpoint-page.module.css new file mode 100644 index 00000000..a28a838b --- /dev/null +++ b/packages/chronicle/src/components/api/endpoint-page.module.css @@ -0,0 +1,58 @@ +.layout { + display: grid; + grid-template-columns: 1fr 1fr; + gap: var(--rs-space-9); + padding: var(--rs-space-7); + max-width: 1400px; +} + +.left { + gap: var(--rs-space-7); + min-width: 0; +} + +.right { + gap: var(--rs-space-5); + min-width: 0; +} + +.title { + margin: 0; +} + +.description { + color: var(--rs-color-foreground-base-secondary); +} + +.methodPath { + gap: var(--rs-space-3); + padding: var(--rs-space-4) var(--rs-space-5); + border: 1px solid var(--rs-color-border-base-primary); + border-radius: 8px; + background: var(--rs-color-background-base-secondary); + overflow: hidden; +} + +.path { + font-family: monospace; + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.tryButton { + margin-left: auto; + flex-shrink: 0; +} + +@media (max-width: 900px) { + .layout { + grid-template-columns: 1fr; + } + + .right { + position: static; + } +} diff --git a/packages/chronicle/src/components/api/endpoint-page.tsx b/packages/chronicle/src/components/api/endpoint-page.tsx new file mode 100644 index 00000000..bbe8d62b --- /dev/null +++ b/packages/chronicle/src/components/api/endpoint-page.tsx @@ -0,0 +1,283 @@ +'use client' + +import { useState, useCallback } from 'react' +import type { OpenAPIV3 } from 'openapi-types' +import { Flex, Text, Headline, Button, CodeBlock } from '@raystack/apsara' +import { MethodBadge } from './method-badge' +import { FieldSection } from './field-section' +import { KeyValueEditor, type KeyValueEntry } from './key-value-editor' +import { CodeSnippets } from './code-snippets' +import { ResponsePanel } from './response-panel' +import { flattenSchema, generateExampleJson, type SchemaField } from '../../lib/schema' +import styles from './endpoint-page.module.css' + +interface EndpointPageProps { + method: string + path: string + operation: OpenAPIV3.OperationObject + serverUrl: string + specName: string + auth?: { type: string; header: string; placeholder?: string } +} + +export function EndpointPage({ method, path, operation, serverUrl, specName, auth }: EndpointPageProps) { + const params = (operation.parameters ?? []) as OpenAPIV3.ParameterObject[] + const body = getRequestBody(operation.requestBody as OpenAPIV3.RequestBodyObject | undefined) + + const headerFields = paramsToFields(params.filter((p) => p.in === 'header')) + const headerLocations = Object.fromEntries(headerFields.map((f) => [f.name, 'header'])) + const pathFields = paramsToFields(params.filter((p) => p.in === 'path')) + const pathLocations = Object.fromEntries(pathFields.map((f) => [f.name, 'path'])) + const queryFields = paramsToFields(params.filter((p) => p.in === 'query')) + const queryLocations = Object.fromEntries(queryFields.map((f) => [f.name, 'query'])) + const responses = getResponseSections(operation.responses as Record) + + // State for editable fields + const [customHeaders, setCustomHeaders] = useState(() => { + const initial: KeyValueEntry[] = [] + if (auth) initial.push({ key: auth.header, value: '' }) + return initial + }) + const [headerValues, setHeaderValues] = useState>({}) + const [pathValues, setPathValues] = useState>({}) + const [queryValues, setQueryValues] = useState>({}) + const [bodyValues, setBodyValues] = useState>(() => { + try { return body?.jsonExample ? JSON.parse(body.jsonExample) : {} } + catch { return {} } + }) + const [bodyJsonStr, setBodyJsonStr] = useState(body?.jsonExample ?? '{}') + const [responseBody, setResponseBody] = useState<{ status: number; statusText: string; body: unknown } | null>(null) + const [loading, setLoading] = useState(false) + + // Two-way sync: fields → JSON + const handleBodyValuesChange = useCallback((values: Record) => { + setBodyValues(values) + setBodyJsonStr(JSON.stringify(values, null, 2)) + }, []) + + // Two-way sync: JSON → fields + const handleBodyJsonChange = useCallback((jsonStr: string) => { + setBodyJsonStr(jsonStr) + try { + setBodyValues(JSON.parse(jsonStr)) + } catch { /* ignore invalid JSON while typing */ } + }, []) + + // Try it handler + const handleTryIt = useCallback(async () => { + setLoading(true) + setResponseBody(null) + + let resolvedPath = path + for (const [key, value] of Object.entries(pathValues)) { + resolvedPath = resolvedPath.replace(`{${key}}`, encodeURIComponent(String(value))) + } + + const queryEntries = Object.entries(queryValues).filter(([, v]) => v !== undefined && v !== '') + const queryString = queryEntries + .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`) + .join('&') + const fullPath = queryString ? `${resolvedPath}?${queryString}` : resolvedPath + + const reqHeaders: Record = {} + for (const [key, value] of Object.entries(headerValues)) { + if (value !== undefined && value !== null && value !== '') reqHeaders[key] = String(value) + } + for (const entry of customHeaders) { + if (entry.key && entry.value) reqHeaders[entry.key] = entry.value + } + if (body && bodyJsonStr) { + reqHeaders['Content-Type'] = body.contentType ?? 'application/json' + } + + try { + const res = await fetch('/api/apis-proxy', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + specName, + method, + path: fullPath, + headers: reqHeaders, + body: body ? bodyValues : undefined, + }), + }) + const data = await res.json() + if (data.status !== undefined) { + setResponseBody(data) + } else { + setResponseBody({ status: res.status, statusText: res.statusText, body: data.error ?? data }) + } + } catch (err) { + console.error('API request failed:', err) + setResponseBody({ status: 0, statusText: 'Error', body: 'Failed to send request' }) + } finally { + setLoading(false) + } + }, [specName, method, path, pathValues, queryValues, headerValues, customHeaders, bodyValues, bodyJsonStr, body]) + + // Snippet display values + const fullUrl = '{domain}' + path + const snippetHeaders: Record = {} + if (auth) { + snippetHeaders[auth.header] = auth.placeholder ?? 'YOUR_API_KEY' + } + if (body) { + snippetHeaders['Content-Type'] = body.contentType ?? 'application/json' + } + + return ( +
+ + {operation.summary && ( + {operation.summary} + )} + {operation.description && ( + {operation.description} + )} + + + + {path} + + + + + + + + + {body && ( + + )} + + {responses.map((resp) => ( + + ))} + + + + + {responseBody && ( + + + Response — {responseBody.status} {responseBody.statusText} + + + + + + + + {typeof responseBody.body === 'string' + ? (responseBody.body || 'No response body') + : (JSON.stringify(responseBody.body, null, 2) ?? 'No response body')} + + + + + )} + +
+ ) +} + +function paramsToFields(params: OpenAPIV3.ParameterObject[]): SchemaField[] { + return params.map((p) => { + const schema = (p.schema ?? {}) as OpenAPIV3.SchemaObject + return { + name: p.name, + type: schema.type ? String(schema.type) : 'string', + required: p.required ?? false, + description: p.description, + default: schema.default, + } + }) +} + +interface RequestBody { + contentType: string + fields: SchemaField[] + jsonExample: string +} + +function getRequestBody(body: OpenAPIV3.RequestBodyObject | undefined): RequestBody | null { + if (!body?.content) return null + const contentType = Object.keys(body.content)[0] + if (!contentType) return null + const schema = body.content[contentType]?.schema as OpenAPIV3.SchemaObject | undefined + if (!schema) return null + return { + contentType, + fields: flattenSchema(schema), + jsonExample: JSON.stringify(generateExampleJson(schema), null, 2), + } +} + +interface ResponseSection { + status: string + description?: string + fields: SchemaField[] + jsonExample?: string +} + +function getResponseSections(responses: Record): ResponseSection[] { + return Object.entries(responses).map(([status, resp]) => { + const content = resp.content ?? {} + const contentType = Object.keys(content)[0] + const schema = contentType + ? (content[contentType]?.schema as OpenAPIV3.SchemaObject | undefined) + : undefined + + return { + status, + description: resp.description, + fields: schema ? flattenSchema(schema) : [], + jsonExample: schema ? JSON.stringify(generateExampleJson(schema), null, 2) : undefined, + } + }) +} diff --git a/packages/chronicle/src/components/api/field-row.module.css b/packages/chronicle/src/components/api/field-row.module.css new file mode 100644 index 00000000..44c12344 --- /dev/null +++ b/packages/chronicle/src/components/api/field-row.module.css @@ -0,0 +1,126 @@ +.row { + display: flex; + flex-direction: column; + gap: var(--rs-space-2); + padding: var(--rs-space-4) 0; +} + +.row + .row { + border-top: 1px solid var(--rs-color-border-base-primary); +} + +.main { + gap: var(--rs-space-2); +} + +.badges { + gap: var(--rs-space-3); + flex-wrap: wrap; +} + +.name { + font-family: monospace; + font-size: 13px; + color: var(--rs-color-foreground-base-primary); +} + +.type { + font-family: monospace; + font-size: 12px; + padding: 1px var(--rs-space-2); + border-radius: 4px; + background: var(--rs-color-background-neutral-secondary); + color: var(--rs-color-foreground-base-secondary); +} + +.location { + font-size: 12px; + padding: 1px var(--rs-space-2); + border-radius: 4px; + background: var(--rs-color-background-neutral-secondary); + color: var(--rs-color-foreground-base-secondary); +} + +.required { + font-size: 11px; + padding: 1px var(--rs-space-2); + border-radius: 4px; + background: var(--rs-color-background-danger-primary); + color: var(--rs-color-foreground-danger-primary); +} + +.description { + color: var(--rs-color-foreground-base-secondary); + font-size: 13px; +} + +.example { + color: var(--rs-color-foreground-base-secondary); + font-size: 12px; +} + +.example code { + font-family: monospace; + background: var(--rs-color-background-neutral-secondary); + padding: 1px var(--rs-space-2); + border-radius: 3px; +} + +.accordion { + border: none; +} + +.accordion :global([class*="accordion-header"]) { + margin: 0; +} + +.accordion button { + min-height: unset; + padding: 0; + border: none; + background: transparent; + box-shadow: none; +} + +.accordion button:hover, +.accordion button:focus-visible { + background: transparent; +} + +.accordion :global([class*="accordion-content-inner"]) { + padding: var(--rs-space-3) 0 0 0; + border: none; + box-shadow: none; +} + +.children { + display: flex; + flex-direction: column; + padding-left: var(--rs-space-5); + width: 100%; +} + +.trigger { + color: var(--rs-color-foreground-base-secondary); +} + +.fieldInfo { + flex: 1; + min-width: 0; +} + +.fieldInput { + flex: 1; + min-width: 0; +} + +.arrayItems { + gap: var(--rs-space-3); +} + +.arrayItem { + align-items: center; + border: 1px solid var(--rs-color-border-base-primary); + border-radius: 8px; + padding: var(--rs-space-3) var(--rs-space-4); +} diff --git a/packages/chronicle/src/components/api/field-row.tsx b/packages/chronicle/src/components/api/field-row.tsx new file mode 100644 index 00000000..c7458dfe --- /dev/null +++ b/packages/chronicle/src/components/api/field-row.tsx @@ -0,0 +1,204 @@ +'use client' + +import { Flex, Text, Accordion, InputField, Switch, Select, IconButton } from '@raystack/apsara' +import { TrashIcon, PlusIcon } from '@heroicons/react/24/outline' +import type { SchemaField } from '../../lib/schema' +import styles from './field-row.module.css' + +interface FieldRowProps { + field: SchemaField + location?: string + editable?: boolean + value?: unknown + onChange?: (name: string, value: unknown) => void +} + +export function FieldRow({ field, location, editable, value, onChange }: FieldRowProps) { + const hasChildren = field.children && field.children.length > 0 + const isArray = field.type.endsWith('[]') + + const label = ( + + {field.name} + {field.type} + {location && {location}} + {field.required && required} + + ) + + if (hasChildren && !isArray) { + const objValue = (value ?? {}) as Record + return ( +
+ + + {label} + +
+ {field.children!.map((child) => ( + { + onChange?.(field.name, { ...objValue, [name]: val }) + } : undefined} + /> + ))} +
+
+
+
+
+ ) + } + + if (isArray && editable) { + const items = (Array.isArray(value) ? value : []) as unknown[] + const itemChildren = field.children + + return ( +
+ + + {label} + { + const newItem = itemChildren ? {} : '' + onChange?.(field.name, [...items, newItem]) + }}> + + + + {field.description && {field.description}} + + {items.map((item, i) => ( + + {itemChildren ? ( + + {itemChildren.map((child) => ( + )?.[child.name]} + onChange={(name, val) => { + const updated = [...items] + updated[i] = { ...(updated[i] as Record), [name]: val } + onChange?.(field.name, updated) + }} + /> + ))} + + ) : ( + { + const updated = [...items] + updated[i] = val + onChange?.(field.name, updated) + }} + /> + )} + { + const updated = items.filter((_, j) => j !== i) + onChange?.(field.name, updated) + }}> + + + + ))} + + +
+ ) + } + + // Leaf field — inline layout + return ( +
+ + + {label} + {field.description && {field.description}} + + {editable ? ( +
+ +
+ ) : ( + field.default !== undefined && ( + + Default: {JSON.stringify(field.default)} + + ) + )} +
+
+ ) +} + +function EditableInput({ + field, + value, + onChange, +}: { + field: SchemaField + value: unknown + onChange?: (name: string, value: unknown) => void +}) { + if (field.enum) { + const enumMap = new Map(field.enum.map((opt) => [String(opt), opt])) + return ( + + ) + } + + const baseType = field.type.replace('[]', '').replace(/\(.*\)/, '') + + if (baseType === 'boolean') { + return ( + onChange?.(field.name, checked)} + /> + ) + } + + if (baseType === 'integer' || baseType === 'number') { + return ( + onChange?.(field.name, Number(e.target.value))} + /> + ) + } + + return ( + onChange?.(field.name, e.target.value)} + /> + ) +} diff --git a/packages/chronicle/src/components/api/field-section.module.css b/packages/chronicle/src/components/api/field-section.module.css new file mode 100644 index 00000000..279e047b --- /dev/null +++ b/packages/chronicle/src/components/api/field-section.module.css @@ -0,0 +1,24 @@ +.header { + padding-bottom: var(--rs-space-3); +} + +.label { + font-family: monospace; + color: var(--rs-color-foreground-base-secondary); + font-size: 13px; +} + +.separator { + height: 1px; + background: var(--rs-color-border-base-primary); +} + +.tabs { + margin-top: var(--rs-space-3); +} + +.noFields { + color: var(--rs-color-foreground-base-secondary); + padding: var(--rs-space-5); +} + diff --git a/packages/chronicle/src/components/api/field-section.tsx b/packages/chronicle/src/components/api/field-section.tsx new file mode 100644 index 00000000..2f9dd22e --- /dev/null +++ b/packages/chronicle/src/components/api/field-section.tsx @@ -0,0 +1,100 @@ +'use client' + +import { Flex, Text, Tabs, CodeBlock } from '@raystack/apsara' +import type { SchemaField } from '../../lib/schema' +import { FieldRow } from './field-row' +import { JsonEditor } from './json-editor' +import styles from './field-section.module.css' + +interface FieldSectionProps { + title: string + label?: string + fields: SchemaField[] + locations?: Record + jsonExample?: string + editableJson?: boolean + onJsonChange?: (value: string) => void + alwaysShow?: boolean + editable?: boolean + values?: Record + onValuesChange?: (values: Record) => void + children?: React.ReactNode +} + +export function FieldSection({ + title, label, fields, locations, jsonExample, + editableJson, onJsonChange, alwaysShow, + editable, values, onValuesChange, children, +}: FieldSectionProps) { + if (fields.length === 0 && !children && !alwaysShow) return null + + const fieldsContent = fields.length > 0 ? ( + + {fields.map((field) => ( + { + onValuesChange?.({ ...values, [name]: val }) + } : undefined} + /> + ))} + + ) : !children ? ( + No fields defined + ) : null + + if (jsonExample !== undefined || alwaysShow) { + return ( + + + {title} + {label && {label}} + +
+ + + Fields + JSON + + + {fieldsContent} + {children} + + + {editableJson ? ( + + ) : ( + + + + + + {jsonExample ?? '{}'} + + + )} + + + + ) + } + + return ( + + + {title} + {label && {label}} + +
+ {fieldsContent} + {children} + + ) +} diff --git a/packages/chronicle/src/components/api/index.ts b/packages/chronicle/src/components/api/index.ts new file mode 100644 index 00000000..26711154 --- /dev/null +++ b/packages/chronicle/src/components/api/index.ts @@ -0,0 +1,8 @@ +export { EndpointPage } from './endpoint-page' +export { MethodBadge } from './method-badge' +export { FieldSection } from './field-section' +export { FieldRow } from './field-row' +export { CodeSnippets } from './code-snippets' +export { ResponsePanel } from './response-panel' +export { JsonEditor } from './json-editor' +export { KeyValueEditor } from './key-value-editor' diff --git a/packages/chronicle/src/components/api/json-editor.module.css b/packages/chronicle/src/components/api/json-editor.module.css new file mode 100644 index 00000000..bf5dece7 --- /dev/null +++ b/packages/chronicle/src/components/api/json-editor.module.css @@ -0,0 +1,9 @@ +.editor { + border: 1px solid var(--rs-color-border-base-primary); + border-radius: 8px; + overflow: hidden; +} + +.editor .cm-editor { + font-size: var(--rs-font-size-small); +} diff --git a/packages/chronicle/src/components/api/json-editor.tsx b/packages/chronicle/src/components/api/json-editor.tsx new file mode 100644 index 00000000..730e9028 --- /dev/null +++ b/packages/chronicle/src/components/api/json-editor.tsx @@ -0,0 +1,61 @@ +'use client' + +import { useRef, useEffect } from 'react' +import { useTheme } from '@raystack/apsara' +import { EditorView, basicSetup } from 'codemirror' +import { EditorState } from '@codemirror/state' +import { json } from '@codemirror/lang-json' +import { oneDark } from '@codemirror/theme-one-dark' +import styles from './json-editor.module.css' + +interface JsonEditorProps { + value: string + onChange?: (value: string) => void + readOnly?: boolean +} + +export function JsonEditor({ value, onChange, readOnly }: JsonEditorProps) { + const containerRef = useRef(null) + const viewRef = useRef(null) + const { theme } = useTheme() + + const isDark = theme === 'dark' + + useEffect(() => { + if (!containerRef.current) return + + const extensions = [ + basicSetup, + json(), + EditorView.lineWrapping, + ...(isDark ? [oneDark] : []), + ...(readOnly ? [EditorState.readOnly.of(true)] : []), + ...(onChange + ? [EditorView.updateListener.of((update) => { + if (update.docChanged) { + onChange(update.state.doc.toString()) + } + })] + : []), + ] + + const state = EditorState.create({ doc: value, extensions }) + const view = new EditorView({ state, parent: containerRef.current }) + viewRef.current = view + + return () => view.destroy() + }, [isDark, readOnly, onChange]) + + useEffect(() => { + const view = viewRef.current + if (!view) return + const current = view.state.doc.toString() + if (value !== current) { + view.dispatch({ + changes: { from: 0, to: current.length, insert: value }, + }) + } + }, [value]) + + return
+} diff --git a/packages/chronicle/src/components/api/key-value-editor.module.css b/packages/chronicle/src/components/api/key-value-editor.module.css new file mode 100644 index 00000000..a972cdce --- /dev/null +++ b/packages/chronicle/src/components/api/key-value-editor.module.css @@ -0,0 +1,13 @@ +.editor { + padding: var(--rs-space-3) 0; +} + +.row { + width: 100%; +} + +.input { + flex: 1; + min-width: 0; +} + diff --git a/packages/chronicle/src/components/api/key-value-editor.tsx b/packages/chronicle/src/components/api/key-value-editor.tsx new file mode 100644 index 00000000..b2960897 --- /dev/null +++ b/packages/chronicle/src/components/api/key-value-editor.tsx @@ -0,0 +1,62 @@ +'use client' + +import { Flex, InputField, IconButton, Button } from '@raystack/apsara' +import { TrashIcon, PlusIcon } from '@heroicons/react/24/outline' +import styles from './key-value-editor.module.css' + +export interface KeyValueEntry { + key: string + value: string +} + +interface KeyValueEditorProps { + entries: KeyValueEntry[] + onChange: (entries: KeyValueEntry[]) => void +} + +export function KeyValueEditor({ entries, onChange }: KeyValueEditorProps) { + const updateEntry = (index: number, field: 'key' | 'value', val: string) => { + const updated = [...entries] + updated[index] = { ...updated[index], [field]: val } + onChange(updated) + } + + const removeEntry = (index: number) => { + onChange(entries.filter((_, i) => i !== index)) + } + + const addEntry = () => { + onChange([...entries, { key: '', value: '' }]) + } + + return ( + + {entries.map((entry, i) => ( + +
+ updateEntry(i, 'key', e.target.value)} + /> +
+
+ updateEntry(i, 'value', e.target.value)} + /> +
+ removeEntry(i)}> + + +
+ ))} + +
+ ) +} diff --git a/packages/chronicle/src/components/api/method-badge.module.css b/packages/chronicle/src/components/api/method-badge.module.css new file mode 100644 index 00000000..fd1fdcf5 --- /dev/null +++ b/packages/chronicle/src/components/api/method-badge.module.css @@ -0,0 +1,4 @@ +.badge { + font-family: monospace; + letter-spacing: 0.5px; +} diff --git a/packages/chronicle/src/components/api/method-badge.tsx b/packages/chronicle/src/components/api/method-badge.tsx new file mode 100644 index 00000000..278f3e7b --- /dev/null +++ b/packages/chronicle/src/components/api/method-badge.tsx @@ -0,0 +1,29 @@ +'use client' + +import { Badge } from '@raystack/apsara' +import styles from './method-badge.module.css' + +type BadgeVariant = 'accent' | 'danger' | 'success' | 'neutral' | 'warning' | 'gradient' + +const methodVariants: Record = { + GET: 'accent', + POST: 'success', + PUT: 'warning', + DELETE: 'danger', + PATCH: 'neutral', +} + +interface MethodBadgeProps { + method: string + size?: 'micro' | 'small' | 'regular' +} + +export function MethodBadge({ method, size = 'small' }: MethodBadgeProps) { + const variant = methodVariants[method.toUpperCase()] ?? 'neutral' + + return ( + + {method.toUpperCase()} + + ) +} diff --git a/packages/chronicle/src/components/api/response-panel.module.css b/packages/chronicle/src/components/api/response-panel.module.css new file mode 100644 index 00000000..55f1b581 --- /dev/null +++ b/packages/chronicle/src/components/api/response-panel.module.css @@ -0,0 +1,8 @@ +.panel { + width: 100%; +} + +/* stylelint-disable-next-line selector-pseudo-class-no-unknown */ +.panel :global([class*="code-block-module_header"]) { + justify-content: space-between; +} diff --git a/packages/chronicle/src/components/api/response-panel.tsx b/packages/chronicle/src/components/api/response-panel.tsx new file mode 100644 index 00000000..f1b9e05d --- /dev/null +++ b/packages/chronicle/src/components/api/response-panel.tsx @@ -0,0 +1,44 @@ +'use client' + +import { CodeBlock } from '@raystack/apsara' +import styles from './response-panel.module.css' + +interface ResponsePanelProps { + responses: { + status: string + description?: string + jsonExample?: string + }[] +} + +export function ResponsePanel({ responses }: ResponsePanelProps) { + const withExamples = responses.filter((r) => r.jsonExample) + if (withExamples.length === 0) return null + + const defaultValue = withExamples[0].status + + return ( + + + + + + {withExamples.map((resp) => ( + + {resp.status} {resp.description ?? resp.status} + + ))} + + + + + + {withExamples.map((resp) => ( + + {resp.jsonExample!} + + ))} + + + ) +} diff --git a/packages/chronicle/src/components/ui/search.tsx b/packages/chronicle/src/components/ui/search.tsx index 6775aa14..0f910be0 100644 --- a/packages/chronicle/src/components/ui/search.tsx +++ b/packages/chronicle/src/components/ui/search.tsx @@ -7,6 +7,7 @@ import { useDocsSearch } from "fumadocs-core/search/client"; import type { SortedResult } from "fumadocs-core/search"; import { DocumentIcon, HashtagIcon } from "@heroicons/react/24/outline"; import { isMacOs } from "react-device-detect"; +import { MethodBadge } from "../api/method-badge"; import styles from "./search.module.css"; function SearchShortcutKey({ className }: { className?: string }) { @@ -54,7 +55,9 @@ export function Search() { return () => document.removeEventListener("keydown", down); }, []); - const results = query.data === "empty" ? [] : (query.data ?? []); + const results = deduplicateByUrl( + query.data === "empty" ? [] : (query.data ?? []), + ); return ( <> @@ -100,9 +103,9 @@ export function Search() { className={styles.item} >
- + {getResultIcon(result)} - {result.content} + {stripMethod(result.content)}
@@ -118,16 +121,12 @@ export function Search() { className={styles.item} >
- {result.type === "page" ? ( - - ) : ( - - )} + {getResultIcon(result)}
{result.type === "heading" ? ( <> - {result.content} + {stripMethod(result.content)} - @@ -136,7 +135,7 @@ export function Search() { ) : ( - {result.content} + {stripMethod(result.content)} )}
@@ -151,6 +150,40 @@ export function Search() { ); } +function deduplicateByUrl(results: SortedResult[]): SortedResult[] { + const seen = new Set(); + return results.filter((r) => { + const base = r.url.split("#")[0]; + if (seen.has(base)) return false; + seen.add(base); + return true; + }); +} + +const API_METHODS = new Set(["GET", "POST", "PUT", "DELETE", "PATCH"]); + +function extractMethod(content: string): string | null { + const first = content.split(" ")[0]; + return API_METHODS.has(first) ? first : null; +} + +function stripMethod(content: string): string { + const first = content.split(" ")[0]; + return API_METHODS.has(first) ? content.slice(first.length + 1) : content; +} + +function getResultIcon(result: SortedResult): React.ReactNode { + if (!result.url.startsWith("/apis/")) { + return result.type === "page" ? ( + + ) : ( + + ); + } + const method = extractMethod(result.content); + return method ? : null; +} + function getPageTitle(url: string): string { const path = url.split("#")[0]; const segments = path.split("/").filter(Boolean); diff --git a/packages/chronicle/src/lib/api-routes.ts b/packages/chronicle/src/lib/api-routes.ts new file mode 100644 index 00000000..18108161 --- /dev/null +++ b/packages/chronicle/src/lib/api-routes.ts @@ -0,0 +1,120 @@ +import type { OpenAPIV3 } from 'openapi-types' +import slugify from 'slugify' +import type { PageTree, PageTreeItem } from '../types/content' +import type { ApiSpec } from './openapi' + +export function getSpecSlug(spec: ApiSpec): string { + return slugify(spec.name, { lower: true, strict: true }) +} + + +export function buildApiRoutes(specs: ApiSpec[]): { slug: string[] }[] { + const routes: { slug: string[] }[] = [] + + for (const spec of specs) { + const specSlug = getSpecSlug(spec) + const paths = spec.document.paths ?? {} + + for (const [, pathItem] of Object.entries(paths)) { + if (!pathItem) continue + for (const method of ['get', 'post', 'put', 'delete', 'patch'] as const) { + const op = pathItem[method] + if (!op?.operationId) continue + routes.push({ slug: [specSlug, encodeURIComponent(op.operationId)] }) + } + } + } + + return routes +} + +export interface ApiRouteMatch { + spec: ApiSpec + operation: OpenAPIV3.OperationObject + method: string + path: string +} + +export function findApiOperation(specs: ApiSpec[], slug: string[]): ApiRouteMatch | null { + if (slug.length !== 2) return null + const [specSlug, operationId] = slug + + const spec = specs.find((s) => getSpecSlug(s) === specSlug) + if (!spec) return null + + const paths = spec.document.paths ?? {} + for (const [pathStr, pathItem] of Object.entries(paths)) { + if (!pathItem) continue + for (const method of ['get', 'post', 'put', 'delete', 'patch'] as const) { + const op = pathItem[method] + if (op?.operationId && encodeURIComponent(op.operationId) === operationId) { + return { spec, operation: op, method: method.toUpperCase(), path: pathStr } + } + } + } + + return null +} + +export function buildApiPageTree(specs: ApiSpec[]): PageTree { + const children: PageTreeItem[] = [] + + for (const spec of specs) { + const specSlug = getSpecSlug(spec) + const paths = spec.document.paths ?? {} + const tags = spec.document.tags ?? [] + + // Group operations by tag (case-insensitive to avoid duplicates) + const opsByTag = new Map() + const tagDisplayName = new Map() + + for (const [, pathItem] of Object.entries(paths)) { + if (!pathItem) continue + for (const method of ['get', 'post', 'put', 'delete', 'patch'] as const) { + const op = pathItem[method] + if (!op?.operationId) continue + + const rawTag = op.tags?.[0] ?? 'default' + const tagKey = rawTag.toLowerCase() + if (!opsByTag.has(tagKey)) { + opsByTag.set(tagKey, []) + tagDisplayName.set(tagKey, rawTag.charAt(0).toUpperCase() + rawTag.slice(1)) + } + + opsByTag.get(tagKey)!.push({ + type: 'page', + name: op.summary ?? op.operationId, + url: `/apis/${specSlug}/${encodeURIComponent(op.operationId)}`, + icon: `method-${method}`, + }) + } + } + + // Use doc.tags display names where available + for (const t of tags) { + const key = t.name.toLowerCase() + if (opsByTag.has(key)) { + tagDisplayName.set(key, t.name.charAt(0).toUpperCase() + t.name.slice(1)) + } + } + + const tagFolders: PageTreeItem[] = Array.from(opsByTag.entries()).map(([key, ops]) => ({ + type: 'folder' as const, + name: tagDisplayName.get(key) ?? key, + icon: 'rectangle-stack', + children: ops, + })) + + if (specs.length > 1) { + children.push({ + type: 'folder', + name: spec.name, + children: tagFolders, + }) + } else { + children.push(...tagFolders) + } + } + + return { name: 'API Reference', children } +} diff --git a/packages/chronicle/src/lib/config.ts b/packages/chronicle/src/lib/config.ts index 63de7404..96c9f7b4 100644 --- a/packages/chronicle/src/lib/config.ts +++ b/packages/chronicle/src/lib/config.ts @@ -31,5 +31,6 @@ export function loadConfig(): ChronicleConfig { }, search: { ...defaultConfig.search, ...userConfig.search }, footer: userConfig.footer, + api: userConfig.api, } } \ No newline at end of file diff --git a/packages/chronicle/src/lib/openapi.ts b/packages/chronicle/src/lib/openapi.ts new file mode 100644 index 00000000..6767fc73 --- /dev/null +++ b/packages/chronicle/src/lib/openapi.ts @@ -0,0 +1,188 @@ +import fs from 'fs' +import path from 'path' +import { parse as parseYaml } from 'yaml' +import type { OpenAPIV2, OpenAPIV3 } from 'openapi-types' +import type { ApiConfig, ApiServerConfig, ApiAuthConfig } from '../types/config' + +type JsonObject = Record + +export interface ApiSpec { + name: string + basePath: string + server: ApiServerConfig + auth?: ApiAuthConfig + document: OpenAPIV3.Document +} + +export type { SchemaField } from './schema' +export { flattenSchema } from './schema' + +export function loadApiSpecs(apiConfigs: ApiConfig[]): ApiSpec[] { + const contentDir = process.env.CHRONICLE_CONTENT_DIR ?? process.cwd() + return apiConfigs.map((config) => loadApiSpec(config, contentDir)) +} + +export function loadApiSpec(config: ApiConfig, contentDir: string): ApiSpec { + const specPath = path.resolve(contentDir, config.spec) + const raw = fs.readFileSync(specPath, 'utf-8') + const isYaml = specPath.endsWith('.yaml') || specPath.endsWith('.yml') + const doc = (isYaml ? parseYaml(raw) : JSON.parse(raw)) as OpenAPIV2.Document | OpenAPIV3.Document + + let v3Doc: OpenAPIV3.Document + + if ('swagger' in doc && doc.swagger === '2.0') { + v3Doc = convertV2toV3(doc as OpenAPIV2.Document) + } else if ('openapi' in doc && doc.openapi.startsWith('3.')) { + v3Doc = resolveDocument(doc as OpenAPIV3.Document) + } else { + throw new Error(`Unsupported spec version in ${config.spec}`) + } + + return { + name: config.name, + basePath: config.basePath, + server: config.server, + auth: config.auth, + document: v3Doc, + } +} + +// --- $ref resolution --- + +function resolveRef(ref: string, root: JsonObject): JsonObject { + const parts = ref.replace(/^#\//, '').split('/') + let current: unknown = root + for (const part of parts) { + if (current && typeof current === 'object' && !Array.isArray(current)) { + current = (current as JsonObject)[part] + } else { + throw new Error(`Cannot resolve $ref: ${ref}`) + } + } + return current as JsonObject +} + +function deepResolveRefs( + obj: unknown, + root: JsonObject, + stack = new Set(), + cache = new Map(), +): unknown { + if (obj === null || obj === undefined || typeof obj !== 'object') return obj + + if (Array.isArray(obj)) { + return obj.map((item) => deepResolveRefs(item, root, stack, cache)) + } + + const record = obj as JsonObject + + if (typeof record.$ref === 'string') { + const ref = record.$ref + if (cache.has(ref)) return cache.get(ref) as JsonObject + if (stack.has(ref)) return { type: 'object', description: '[circular]' } + stack.add(ref) + const resolved = deepResolveRefs(resolveRef(ref, root), root, stack, cache) as JsonObject + stack.delete(ref) + cache.set(ref, resolved) + return resolved + } + + const result: JsonObject = {} + for (const [key, value] of Object.entries(record)) { + result[key] = deepResolveRefs(value, root, stack, cache) + } + return result +} + +function resolveDocument(doc: OpenAPIV3.Document): OpenAPIV3.Document { + const root = doc as unknown as JsonObject + return deepResolveRefs(doc, root) as unknown as OpenAPIV3.Document +} + +// --- V2 → V3 conversion --- + +function convertV2toV3(doc: OpenAPIV2.Document): OpenAPIV3.Document { + const root = doc as unknown as JsonObject + const resolved = deepResolveRefs(doc, root) as unknown as OpenAPIV2.Document + + const v3Paths: OpenAPIV3.PathsObject = {} + + for (const [pathStr, pathItem] of Object.entries(resolved.paths ?? {})) { + if (!pathItem) continue + const v3PathItem: OpenAPIV3.PathItemObject = {} + + for (const method of ['get', 'post', 'put', 'delete', 'patch'] as const) { + const op = (pathItem as Record)[method] as OpenAPIV2.OperationObject | undefined + if (!op) continue + v3PathItem[method] = convertV2Operation(op) + } + + v3Paths[pathStr] = v3PathItem + } + + return { + openapi: '3.0.0', + info: resolved.info as unknown as OpenAPIV3.InfoObject, + paths: v3Paths, + tags: (resolved.tags ?? []) as unknown as OpenAPIV3.TagObject[], + } +} + +function convertV2Operation(op: OpenAPIV2.OperationObject): OpenAPIV3.OperationObject { + const params = (op.parameters ?? []) as OpenAPIV2.Parameter[] + + const v3Params: OpenAPIV3.ParameterObject[] = params + .filter((p) => p.in !== 'body') + .map((p) => ({ + name: p.name, + in: p.in as 'path' | 'query' | 'header' | 'cookie', + required: p.required ?? false, + description: p.description, + schema: { type: ((p as JsonObject).type as string) ?? 'string', format: (p as JsonObject).format as string | undefined } as OpenAPIV3.SchemaObject, + })) + + const bodyParam = params.find((p) => p.in === 'body') as JsonObject | undefined + let requestBody: OpenAPIV3.RequestBodyObject | undefined + if (bodyParam?.schema) { + requestBody = { + required: (bodyParam.required as boolean) ?? false, + content: { + 'application/json': { + schema: bodyParam.schema as OpenAPIV3.SchemaObject, + }, + }, + } + } + + const v3Responses: OpenAPIV3.ResponsesObject = {} + for (const [status, resp] of Object.entries(op.responses ?? {})) { + const v2Resp = resp as OpenAPIV2.ResponseObject + const v3Resp: OpenAPIV3.ResponseObject = { + description: v2Resp.description ?? '', + } + if ((v2Resp as unknown as JsonObject).schema) { + v3Resp.content = { + 'application/json': { + schema: (v2Resp as unknown as JsonObject).schema as OpenAPIV3.SchemaObject, + }, + } + } + v3Responses[status] = v3Resp + } + + const result: OpenAPIV3.OperationObject = { + operationId: op.operationId, + summary: op.summary, + description: op.description, + tags: op.tags, + parameters: v3Params, + responses: v3Responses, + } + + if (requestBody) { + result.requestBody = requestBody + } + + return result +} + diff --git a/packages/chronicle/src/lib/schema.ts b/packages/chronicle/src/lib/schema.ts new file mode 100644 index 00000000..ff846161 --- /dev/null +++ b/packages/chronicle/src/lib/schema.ts @@ -0,0 +1,99 @@ +import type { OpenAPIV3 } from 'openapi-types' + +export interface SchemaField { + name: string + type: string + required: boolean + description?: string + default?: unknown + enum?: unknown[] + children?: SchemaField[] +} + +export function flattenSchema( + schema: OpenAPIV3.SchemaObject, + requiredFields: string[] = [], +): SchemaField[] { + if (schema.type === 'array' && schema.items) { + const items = schema.items as OpenAPIV3.SchemaObject + const itemType = inferType(items) + const children = + itemType === 'object' || items.properties + ? flattenSchema(items, items.required ?? []) + : itemType.endsWith('[]') && (items as OpenAPIV3.ArraySchemaObject).items + ? flattenSchema((items as OpenAPIV3.ArraySchemaObject).items as OpenAPIV3.SchemaObject) + : undefined + return [{ + name: 'items', + type: `${itemType}[]`, + required: true, + description: items.description, + children: children?.length ? children : undefined, + }] + } + + if (schema.type === 'object' || schema.properties) { + const properties = (schema.properties ?? {}) as Record + const required = schema.required ?? requiredFields + + return Object.entries(properties).map(([name, prop]) => { + const fieldType = inferType(prop) + const children = + fieldType === 'object' || prop.properties + ? flattenSchema(prop, prop.required) + : fieldType.endsWith('[]') && (prop as OpenAPIV3.ArraySchemaObject).items + ? flattenSchema((prop as OpenAPIV3.ArraySchemaObject).items as OpenAPIV3.SchemaObject) + : undefined + + return { + name, + type: fieldType, + required: required.includes(name), + description: prop.description, + default: prop.default, + enum: prop.enum, + children: children?.length ? children : undefined, + } + }) + } + + return [] +} + +export function generateExampleJson(schema: OpenAPIV3.SchemaObject): unknown { + if (schema.example !== undefined) return schema.example + if (schema.default !== undefined) return schema.default + + if (schema.type === 'array') { + const items = schema.items as OpenAPIV3.SchemaObject | undefined + return items ? [generateExampleJson(items)] : [] + } + + if (schema.type === 'object' || schema.properties) { + const properties = (schema.properties ?? {}) as Record + const result: Record = {} + for (const [name, prop] of Object.entries(properties)) { + result[name] = generateExampleJson(prop) + } + return result + } + + const defaults: Record = { + string: 'string', + integer: 0, + number: 0, + boolean: true, + } + return defaults[schema.type as string] ?? null +} + +function inferType(schema: OpenAPIV3.SchemaObject): string { + if (schema.type === 'array') { + const items = schema.items as OpenAPIV3.SchemaObject | undefined + const itemType = items ? inferType(items) : 'unknown' + return `${itemType}[]` + } + + if (schema.format) return `${schema.type}(${schema.format})` + return (schema.type as string) ?? 'object' +} diff --git a/packages/chronicle/src/lib/snippet-generators.ts b/packages/chronicle/src/lib/snippet-generators.ts new file mode 100644 index 00000000..6b125a72 --- /dev/null +++ b/packages/chronicle/src/lib/snippet-generators.ts @@ -0,0 +1,87 @@ +interface SnippetOptions { + method: string + url: string + headers: Record + body?: string +} + +export function generateCurl({ method, url, headers, body }: SnippetOptions): string { + const parts = [`curl -X ${method} '${url}'`] + for (const [key, value] of Object.entries(headers)) { + parts.push(` -H '${key}: ${value}'`) + } + if (body) { + parts.push(` -d '${body}'`) + } + return parts.join(' \\\n') +} + +export function generatePython({ method, url, headers, body }: SnippetOptions): string { + const lines: string[] = ['import requests', ''] + const methodLower = method.toLowerCase() + const headerEntries = Object.entries(headers) + + lines.push(`response = requests.${methodLower}(`) + lines.push(` "${url}",`) + + if (headerEntries.length > 0) { + lines.push(' headers={') + for (const [key, value] of headerEntries) { + lines.push(` "${key}": "${value}",`) + } + lines.push(' },') + } + + if (body) { + lines.push(` json=${body},`) + } + + lines.push(')') + lines.push('print(response.json())') + return lines.join('\n') +} + +export function generateGo({ method, url, headers, body }: SnippetOptions): string { + const lines: string[] = [] + + if (body) { + lines.push('payload := strings.NewReader(`' + body + '`)') + lines.push('') + lines.push(`req, _ := http.NewRequest("${method}", "${url}", payload)`) + } else { + lines.push(`req, _ := http.NewRequest("${method}", "${url}", nil)`) + } + + for (const [key, value] of Object.entries(headers)) { + lines.push(`req.Header.Set("${key}", "${value}")`) + } + + lines.push('') + lines.push('resp, _ := http.DefaultClient.Do(req)') + lines.push('defer resp.Body.Close()') + return lines.join('\n') +} + +export function generateTypeScript({ method, url, headers, body }: SnippetOptions): string { + const lines: string[] = [] + const headerEntries = Object.entries(headers) + + lines.push(`const response = await fetch("${url}", {`) + lines.push(` method: "${method}",`) + + if (headerEntries.length > 0) { + lines.push(' headers: {') + for (const [key, value] of headerEntries) { + lines.push(` "${key}": "${value}",`) + } + lines.push(' },') + } + + if (body) { + lines.push(` body: JSON.stringify(${body}),`) + } + + lines.push('});') + lines.push('const data = await response.json();') + return lines.join('\n') +} diff --git a/packages/chronicle/src/themes/default/Layout.tsx b/packages/chronicle/src/themes/default/Layout.tsx index d6319b5c..e63d9960 100644 --- a/packages/chronicle/src/themes/default/Layout.tsx +++ b/packages/chronicle/src/themes/default/Layout.tsx @@ -1,18 +1,31 @@ "use client"; +import { useMemo } from "react"; import { usePathname } from "next/navigation"; +import NextLink from "next/link"; +import { cx } from "class-variance-authority"; import { Flex, Navbar, Headline, Link, Sidebar } from "@raystack/apsara"; +import { RectangleStackIcon } from "@heroicons/react/24/outline"; import { ClientThemeSwitcher } from "../../components/ui/client-theme-switcher"; import { Search } from "../../components/ui/search"; import { Footer } from "../../components/ui/footer"; +import { MethodBadge } from "../../components/api/method-badge"; import type { ThemeLayoutProps, PageTreeItem } from "../../types"; import styles from "./Layout.module.css"; -export function Layout({ children, config, tree }: ThemeLayoutProps) { +const iconMap: Record = { + "rectangle-stack": , + "method-get": , + "method-post": , + "method-put": , + "method-delete": , + "method-patch": , +}; + +export function Layout({ children, config, tree, classNames }: ThemeLayoutProps) { const pathname = usePathname(); - console.log(config); return ( - + @@ -31,8 +44,8 @@ export function Layout({ children, config, tree }: ThemeLayoutProps) { - - + + {tree.children.map((item) => ( -
{children}
+
{children}