From 2ab150f0156a9ab296497dbb0c5322aab919cc33 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:11:35 -0700 Subject: [PATCH 1/3] Fix role names --- content/nginx-one/rbac/roles.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/nginx-one/rbac/roles.md b/content/nginx-one/rbac/roles.md index 6fc089a73..3ba36bb6e 100644 --- a/content/nginx-one/rbac/roles.md +++ b/content/nginx-one/rbac/roles.md @@ -13,14 +13,14 @@ We provide three default **[roles](https://docs.cloud.f5.com/docs-v2/administrat ### Admin -The Admin role, identified as `f5xc-nginx-one-admin`, provides full read and write access to all endpoints and features within the NGINX One Console. -It also supports RBAC for related XC services, as described in [Role-based Access Control Concepts](https://flatrender.tora.reviews/docs-v2/administration/how-tos/user-mgmt/rbac). +The Admin role, identified as `f5xc-nginx-one-standard-admin`, provides full read and write access to all endpoints and features within the NGINX One Console. +It also supports Role-based access control for related XC services. ### User -Our standard User role, listed as `f5xc-nginx-one-user` in the role list, provides read and write access to all endpoints and features, save for those considered to be administrator level. An example of an administrator level feature would be **[Instance Settings](https://docs.nginx.com/nginx-one/how-to/nginx-configs/clean-up-unavailable-instances/)** where unavailable instance clean up logic is set. +Our standard User role, listed as `f5xc-nginx-one-standard-user` in the role list, provides read and write access to all endpoints and features, save for those considered to be administrator level. An example of an administrator level feature would be **[Instance Settings](https://docs.nginx.com/nginx-one/how-to/nginx-configs/clean-up-unavailable-instances/)** where unavailable instance clean up logic is set. ### Monitor -Our read only or Monitor role, `f5xc-nginx-one-monitor`, grants read only access to all non-administrator features and endpoints within the NGINX One Console. +Our read only or Monitor role, `f5xc-nginx-one-standard-monitor`, grants read only access to all non-administrator features and endpoints within the NGINX One Console. From 43906d3e4f365bdf0fa089a0542e6ea8421ec0a7 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:28:08 -0700 Subject: [PATCH 2/3] update --- content/nginx-one/rbac/roles.md | 6 +- static/nginx-one/api/one.json | 1658 ++++++++++++++++++++++++------- 2 files changed, 1306 insertions(+), 358 deletions(-) diff --git a/content/nginx-one/rbac/roles.md b/content/nginx-one/rbac/roles.md index 3ba36bb6e..646f0d5cb 100644 --- a/content/nginx-one/rbac/roles.md +++ b/content/nginx-one/rbac/roles.md @@ -14,13 +14,13 @@ We provide three default **[roles](https://docs.cloud.f5.com/docs-v2/administrat ### Admin The Admin role, identified as `f5xc-nginx-one-standard-admin`, provides full read and write access to all endpoints and features within the NGINX One Console. -It also supports Role-based access control for related XC services. +It also supports Role-based access control for related XC services. ### User -Our standard User role, listed as `f5xc-nginx-one-standard-user` in the role list, provides read and write access to all endpoints and features, save for those considered to be administrator level. An example of an administrator level feature would be **[Instance Settings](https://docs.nginx.com/nginx-one/how-to/nginx-configs/clean-up-unavailable-instances/)** where unavailable instance clean up logic is set. +Our standard User role, listed as `f5xc-nginx-one-user` in the role list, provides read and write access to all endpoints and features, save for those considered to be administrator level. An example of an administrator level feature would be **[Instance Settings](https://docs.nginx.com/nginx-one/how-to/nginx-configs/clean-up-unavailable-instances/)** where unavailable instance clean up logic is set. ### Monitor -Our read only or Monitor role, `f5xc-nginx-one-standard-monitor`, grants read only access to all non-administrator features and endpoints within the NGINX One Console. +Our read only or Monitor role, `f5xc-nginx-one-monitor`, grants read only access to all non-administrator features and endpoints within the NGINX One Console. diff --git a/static/nginx-one/api/one.json b/static/nginx-one/api/one.json index 500ad58aa..9bed47497 100644 --- a/static/nginx-one/api/one.json +++ b/static/nginx-one/api/one.json @@ -18,6 +18,17 @@ "default": "tenant-example" } } + }, + { + "url": "/api/v1/marketplace" + }, + { + "url": "/api/v1/namespaces/{namespace}", + "variables": { + "namespace": { + "default": "default" + } + } } ], "tags": [ @@ -63,6 +74,26 @@ "name": "Settings", "description": "Configuration option for different aspect of NGINX One service.\nYou can set NGINX Instance cleanup preferences.\n", "x-displayName": "Settings" + }, + { + "name": "Authorization", + "description": "TODO\n", + "x-displayName": "Authorization" + }, + { + "name": "Signup", + "description": "TODO\n", + "x-displayName": "Signup" + }, + { + "name": "User", + "description": "TODO\n", + "x-displayName": "User" + }, + { + "name": "Deployments", + "description": "Manage NAAS deployments.", + "x-displayName": "Deployments" } ], "paths": { @@ -2563,7 +2594,7 @@ "x-nginx-one-action": "create", "x-nginx-one-entity": "NGINX instance configuration", "summary": "Publish a configuration to an instance", - "description": "Publishes a new or updated NGINX configuration to the specified instance. \nIf no existing configuration is found, a new one is created; otherwise, the current configuration is overwritten. \nBefore publishing, use the `PUT /instances/{instanceObjectID}/config-report` endpoint to generate an analysis report for the provided configuration.\nYou can specify `payloads` in the request to deploy managed certificates and keys to the dataplane. Include file paths\nfor each payload component.\n", + "description": "Publishes a new or updated NGINX configuration to the specified instance.\nIn the specified `configs`, empty files are not allowed in the directory.\nIf no existing configuration is found, a new one is created; otherwise, the current configuration is overwritten. \nBefore publishing, use the `PUT /instances/{instanceObjectID}/config-report` endpoint to generate an analysis report for the provided configuration.\nYou can specify `payloads` in the request to deploy managed certificates and keys to the dataplane. Include file paths\nfor each payload component.\n", "operationId": "publishInstanceConfig", "requestBody": { "required": true, @@ -3729,6 +3760,8 @@ } } }, + "/staged-configs/{stagedConfigObjectID}/export": {}, + "/staged-configs/import": {}, "/monitor/metrics_query_topx": { "post": { "tags": [ @@ -3750,7 +3783,7 @@ "metrics": [ { "aggregate": "sum", - "name": "nginx.http.requests" + "name": "nginx.http.request.count" } ], "series_limit": 1, @@ -3865,136 +3898,564 @@ } } } - } - }, - "components": { - "parameters": { - "Paginated": { - "name": "paginated", - "in": "query", - "schema": { - "type": "boolean", - "default": true - }, - "description": "A boolean indicating if the results should be presented as a paginated list. Defaults to `true`. \nWhen set to `false`, the results are returned as a condensed, non-paginated list.\n", - "required": false - }, - "Limit": { - "name": "limit", - "in": "query", - "schema": { - "type": "integer", - "minimum": 0 - }, - "description": "An integer that specifies the maximum number of items to be returned. \nSetting this to `0` will result in no items being returned, but a total count will still be provided. \nThis parameter is not applicable if `paginated` is `false`.\n", - "required": false - }, - "Offset": { - "name": "offset", - "in": "query", - "schema": { - "type": "integer", - "minimum": 1 - }, - "description": "An integer that specifies the starting position of the results, starting at `1`.\nThis parameter is not applicable if `paginated` is `false`.\n" - }, - "FilterFieldDataPlaneKeys": { - "name": "filter_fields", - "in": "query", - "description": "Filter options for data plane keys; used in conjunction with other filter parameters having the same array length.\n\nWhen filtering on `status`, only the following `filter_values` are supported:\n * revoked\n * expired\n * valid\n", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterNameDataPlaneKeys" + }, + "/auth/google/authorize": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Returns a redirect to authenticate with Google.", + "operationId": "googleAuthorize", + "responses": { + "302": { + "description": "Redirect to authenticate with Google." + }, + "500": { + "description": "An unexpected error occurred on the server. Please try the request again later.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "FilterOperands": { - "name": "filter_ops", - "in": "query", - "description": "An array of strings defining the operands for filtering, to be used in conjunction with `filter_fields` and `filter_values`. \nAll filter parameters must have matching array lengths. Currently, the only supported operand is `\"IN\"`.\n", - "schema": { - "$ref": "#/components/schemas/FilterOperands" - } - }, - "FilterValues": { - "name": "filter_values", - "in": "query", - "description": "An array of strings containing the keywords for filtering. \nMultiple keywords can be chained using the `|` character. \nEnsure this parameter's array length matches those of `filter_fields` and `filter_ops` for effective filtering.\nThe total length of the filter string should not exceed 1024 characters.\n", - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "value1|value2|value3", - "minLength": 1, - "maxLength": 1024 + } + }, + "/auth/google/callback": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Callback after the Google login page.", + "description": "The Google callback endpoint is where the user will be redirected after logging in and authorizing our service. This callback carries the Google code we exchange for an authorization token.\n", + "operationId": "googleCallback", + "parameters": [ + { + "name": "code", + "in": "query", + "required": true, + "description": "The authorization code returned by the Google authorization server.", + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "required": true, + "description": "A signed state parameter used to mitigate CSRF attacks. In some cases, this may additionally be used to carry needed state from the redirect back to the callback.\n", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Authorization has been granted and an access token is generated. Use the returned access token to\nauthenticate future API requests.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthGoogleCallbackResponse" + } + } + } + }, + "401": { + "description": "The request is either missing or provided invalid input.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "The request contains valid input, but authorization cannot be granted." + }, + "500": { + "description": "An unexpected error occurred on the server. Please try the request again later.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "DataPlaneKeyParamObjectID": { - "name": "data_plane_key_id", - "in": "path", - "schema": { - "$ref": "#/components/schemas/DataPlaneKeyObjectID" + } + }, + "/auth/google/signup": { + "post": { + "tags": [ + "Signup" + ], + "summary": "Creates an account and first user.", + "operationId": "googleSignup", + "requestBody": { + "description": "Completed sign up form with Google account and user identity from the\nmarketplace token.\n", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignupWithGoogleRequest" + } + } + } }, - "description": "A globally unique identifier for the data plane key.\n", - "required": true - }, - "FilterFieldCertificates": { - "name": "filter_fields", - "in": "query", - "description": "Filter options for certificates; used in conjunction with other filter parameters having the same array length.\n", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterNameCertificates" + "responses": { + "200": { + "description": "The new account has been activated and first user created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignupWithGoogleResponse" + } + } + } + }, + "400": { + "description": "Request cannot be processed due to invalid input or parameters. Verify the request format and provided data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "An unexpected error occurred on the server. Please try the request again later.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "SortDirection": { - "name": "sort_dir", - "in": "query", - "description": "Sorting direction for the criteria and the resulting collection returned. Defaults to descending if not specified.\n", - "schema": { - "type": "string", - "enum": [ - "Ascending", - "Descending" - ], - "x-enum-varnames": [ - "ascending", - "descending" - ] - } - }, - "SortNameCertificates": { - "name": "sort_certificates", - "in": "query", - "description": "Sort certificates by enumerate value(s). Ordinal position determines primary, secondary, etc.\n", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "name", - "subject_name", - "not_before", - "not_after" - ], - "x-enum-varnames": [ - "sort_name_certificates_name", - "sort_name_certificates_subject_name", - "sort_name_certificates_not_before", - "sort_name_certificates_not_after" - ] + } + }, + "/users": { + "post": { + "tags": [ + "User" + ], + "x-nginx-one-action": "create", + "x-nginx-one-entity": "user", + "summary": "Create a user", + "description": "TODO\n", + "operationId": "createUser", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudUserCreateRequest" + }, + "examples": { + "CloudUserCreateRequest": { + "$ref": "#/components/examples/CloudUserResponse" + } + } + } } - } - }, - "CertificateParamObjectID": { - "name": "certificateObjectID", - "in": "path", - "schema": { - "$ref": "#/components/schemas/CertificateObjectID" + }, + "responses": { + "200": { + "description": "Successfully created the cloud user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudUser" + } + } + } + }, + "400": { + "description": "Request cannot be processed due to invalid input or parameters. Verify the request format and provided data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "An unexpected error occurred on the server. Please try the request again later.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/deployments": { + "get": { + "tags": [ + "Deployments" + ], + "summary": "List deployments", + "description": "Returns a list of deployments.", + "operationId": "listDeployments", + "responses": { + "200": { + "description": "Successfully returned the list of deployments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentListResponse" + }, + "examples": { + "DeploymentListResponse": { + "$ref": "#/components/examples/DeploymentListResponse" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerErr" + } + } + }, + "post": { + "tags": [ + "Deployments" + ], + "summary": "Create deployment", + "description": "Creates a new deployment.", + "operationId": "createDeployment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCreateRequest" + }, + "examples": { + "DeploymentCreateRequest": { + "$ref": "#/components/examples/DeploymentCreateRequest" + } + } + } + } + }, + "responses": { + "202": { + "description": "Successfully created the deployment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + }, + "examples": { + "DeploymentCreateResponse": { + "$ref": "#/components/examples/DeploymentCreateResponse" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerErr" + } + } + } + }, + "/deployments/{deployment_id}": { + "delete": { + "tags": [ + "Deployments" + ], + "summary": "Delete deployment", + "description": "Deletes the specified deployment.", + "operationId": "deleteDeployment", + "parameters": [ + { + "$ref": "#/components/parameters/DeploymentObjectID" + } + ], + "responses": { + "202": { + "description": "Successfully deleted the deployment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + }, + "examples": { + "DeploymentDeleteResponse": { + "$ref": "#/components/examples/DeploymentDeleteResponse" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerErr" + } + } + }, + "get": { + "tags": [ + "Deployments" + ], + "summary": "Get deployment", + "description": "Returns deployment details.", + "operationId": "getDeployment", + "parameters": [ + { + "$ref": "#/components/parameters/DeploymentObjectID" + } + ], + "responses": { + "200": { + "description": "Successfully returned the deployment details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + }, + "examples": { + "DeploymentGetResponse": { + "$ref": "#/components/examples/DeploymentGetResponse" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerErr" + } + } + }, + "patch": { + "tags": [ + "Deployments" + ], + "summary": "Update deployment", + "description": "Updates the specified deployment.", + "operationId": "updateDeployment", + "parameters": [ + { + "$ref": "#/components/parameters/DeploymentObjectID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentUpdateRequest" + }, + "examples": { + "DeploymentUpdateRequest": { + "$ref": "#/components/examples/DeploymentUpdateRequest" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successfully updated the deployment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + }, + "examples": { + "DeploymentUpdateResponse": { + "$ref": "#/components/examples/DeploymentUpdateResponse" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "500": { + "$ref": "#/components/responses/InternalServerErr" + } + } + } + } + }, + "components": { + "parameters": { + "Paginated": { + "name": "paginated", + "in": "query", + "schema": { + "type": "boolean", + "default": true + }, + "description": "A boolean indicating if the results should be presented as a paginated list. Defaults to `true`. \nWhen set to `false`, the results are returned as a condensed, non-paginated list.\n", + "required": false + }, + "Limit": { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0 + }, + "description": "An integer that specifies the maximum number of items to be returned. \nSetting this to `0` will result in no items being returned, but a total count will still be provided. \nThis parameter is not applicable if `paginated` is `false`.\n", + "required": false + }, + "Offset": { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1 + }, + "description": "An integer that specifies the starting position of the results, starting at `1`.\nThis parameter is not applicable if `paginated` is `false`.\n" + }, + "FilterFieldDataPlaneKeys": { + "name": "filter_fields", + "in": "query", + "description": "Filter options for data plane keys; used in conjunction with other filter parameters having the same array length.\n\nWhen filtering on `status`, only the following `filter_values` are supported:\n * revoked\n * expired\n * valid\n", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterNameDataPlaneKeys" + } + } + }, + "FilterOperands": { + "name": "filter_ops", + "in": "query", + "description": "An array of strings defining the operands for filtering, to be used in conjunction with `filter_fields` and `filter_values`. \nAll filter parameters must have matching array lengths. Currently, the only supported operand is `\"IN\"`.\n", + "schema": { + "$ref": "#/components/schemas/FilterOperands" + } + }, + "FilterValues": { + "name": "filter_values", + "in": "query", + "description": "An array of strings containing the keywords for filtering. \nMultiple keywords can be chained using the `|` character. \nEnsure this parameter's array length matches those of `filter_fields` and `filter_ops` for effective filtering.\nThe total length of the filter string should not exceed 1024 characters.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "value1|value2|value3", + "minLength": 1, + "maxLength": 1024 + } + } + }, + "DataPlaneKeyParamObjectID": { + "name": "data_plane_key_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/DataPlaneKeyObjectID" + }, + "description": "A globally unique identifier for the data plane key.\n", + "required": true + }, + "FilterFieldCertificates": { + "name": "filter_fields", + "in": "query", + "description": "Filter options for certificates; used in conjunction with other filter parameters having the same array length.\n", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterNameCertificates" + } + } + }, + "SortDirection": { + "name": "sort_dir", + "in": "query", + "description": "Sorting direction for the criteria and the resulting collection returned. Defaults to descending if not specified.\n", + "schema": { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ], + "x-enum-varnames": [ + "ascending", + "descending" + ] + } + }, + "SortNameCertificates": { + "name": "sort_certificates", + "in": "query", + "description": "Sort certificates by enumerate value(s). Ordinal position determines primary, secondary, etc.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "name", + "subject_name", + "not_before", + "not_after" + ], + "x-enum-varnames": [ + "sort_name_certificates_name", + "sort_name_certificates_subject_name", + "sort_name_certificates_not_before", + "sort_name_certificates_not_after" + ] + } + } + }, + "CertificateParamObjectID": { + "name": "certificateObjectID", + "in": "path", + "schema": { + "$ref": "#/components/schemas/CertificateObjectID" }, "description": "A globally unique identifier for the certificate.\n", "required": true @@ -4248,6 +4709,15 @@ }, "description": "A globally unique identifier for the NGINX staged config.\n", "required": true + }, + "DeploymentObjectID": { + "name": "deployment_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/DeploymentObjectID" + }, + "description": "A globally unique identifier for the deployment.", + "required": true } }, "schemas": { @@ -4290,11 +4760,11 @@ "properties": { "total": { "type": "integer", - "description": "The absolute total number of the resource in the NGINX One Console.\n" + "description": "The absolute total number of the resource in the NGINX One Console, ignoring any filter(s).\n" }, "count": { "type": "integer", - "description": "The total number of results generated by the list or query operation. \nThis number might be greater than the number of displayed resources, such as when pagination is in effect.\n" + "description": "The total number of results generated by the list or query operation, accounting for any filter(s).\nThis number can be greater than the number of returned resources when pagination is in effect and a page size limit (or maximum allowed) is reached.\n" }, "start_index": { "type": "integer", @@ -7734,7 +8204,7 @@ "MetricDimension": { "type": "string", "default": "display_name", - "description": "Static list of all metric dimensions.\n * `display_name` - The display name of the NGINX instance.\n * `file_path` - Path to a desired file.\n * `parent_hostname` - The hostname of the NGINX Plus instance.\n * `instance_object_id` - Instance Object ID is the unique identifier for an Instance registered with NGINX One Console.\n * `location_zone` - The name of an HTTP location zone.\n * `mount_point` - A filesystem mount point.\n * `namespace` - The Namespace associated with the metric data.\n * `network_interface` - A server network interface.\n * `nginx_id` - The unique identifier of an nginx instance running on the data plane.\n * `server_zone` - The name of an HTTP or Stream server zone.\n * `system_id` - The unique identifier of the the operating system where nginx-agent is running.\n * `tenant` - The Tenant associated with the metric data.\n * `csg_object_id` - Config Sync Group Object ID is the unique identifier for a Config Sync Group registered with NGINX One Console.\n * `mode` - Variant value associated with metric `system.cpu.time`.\n * `state` - Variant value associated with metrics `system.filesystem.usage`, `system.memory.usage`.\n * `io_direction` - Variant value associated with metric `system.network.io`.\n * `status_range` - Variant value associated with metric `nginx.http.response.status`.\n", + "description": "Static list of all metric dimensions.\n * `display_name` - The display name of the NGINX instance.\n * `file_path` - Path to a desired file.\n * `parent_hostname` - The hostname of the NGINX Plus instance.\n * `instance_object_id` - Instance Object ID is the unique identifier for an Instance registered with NGINX One Console.\n * `location_zone` - The name of an HTTP location zone.\n * `mount_point` - A filesystem mount point.\n * `namespace` - The Namespace associated with the metric data.\n * `network_interface` - A server network interface.\n * `nginx_id` - The unique identifier of an nginx instance running on the data plane.\n * `server_zone` - The name of an HTTP or Stream server zone.\n * `system_id` - The unique identifier of the the operating system where nginx-agent is running.\n * `tenant` - The Tenant associated with the metric data.\n * `csg_object_id` - Config Sync Group Object ID is the unique identifier for a Config Sync Group registered with NGINX One Console.\n * `mode` - Variant value associated with metric `system.cpu.utilization`.\n * `state` - Variant value associated with metrics `system.filesystem.usage`, `system.memory.usage`.\n * `io_direction` - Variant value associated with metric `system.network.io`.\n * `status_range` - Variant value associated with metric `nginx.http.response.count`.\n", "enum": [ "display_name", "file_path", @@ -7864,7 +8334,7 @@ }, "example": [ { - "name": "system.cpu.time", + "name": "system.cpu.utilization", "aggregate": "avg", "filter": [ { @@ -8053,10 +8523,10 @@ "MetricName": { "type": "string", "description": "Metric names available for querying.\n", - "example": "nginx.http.requests", + "example": "nginx.http.request.count", "oneOf": [ { - "$ref": "#/components/schemas/MetricSystemCpuTime" + "$ref": "#/components/schemas/MetricSystemCpuUtilization" }, { "$ref": "#/components/schemas/MetricSystemFilesystemUsage" @@ -8071,18 +8541,18 @@ "$ref": "#/components/schemas/MetricSystemNetworkIo" }, { - "$ref": "#/components/schemas/MetricNginxHttpRequests" + "$ref": "#/components/schemas/MetricNginxHttpRequestCount" }, { - "$ref": "#/components/schemas/MetricNginxHttpResponseStatus" + "$ref": "#/components/schemas/MetricNginxHttpResponseCount" } ] }, - "MetricSystemCpuTime": { + "MetricSystemCpuUtilization": { "type": "string", "description": "Total system CPU utilization for 'system' or 'user', percentage. A filter differentiator is needed for specific mode(s).\n\nReplacement for depreciated variant(s):\n * system.cpu.system\n * system.cpu.user\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * mode (applicable filter values: 'system', 'user')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n", "enum": [ - "system.cpu.time" + "system.cpu.utilization" ] }, "MetricSystemFilesystemUsage": { @@ -8113,18 +8583,18 @@ "system.network.io" ] }, - "MetricNginxHttpRequests": { + "MetricNginxHttpRequestCount": { "type": "string", - "description": "Total number of client requests received from clients.\n\nReplacement for depreciated variant(s):\n * nginx.http.request.count\n * plus.http.request.count\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n * server_zone\n * location_zone\n", + "description": "The current number of client requests received from clients.\n\nReplacement for depreciated variant(s):\n * nginx.http.request.count\n * plus.http.request.count\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n * server_zone\n * location_zone\n", "enum": [ - "nginx.http.requests" + "nginx.http.request.count" ] }, - "MetricNginxHttpResponseStatus": { + "MetricNginxHttpResponseCount": { "type": "string", - "description": "Number of responses for by status code range. A filter differentiator is needed for specific status range(s).\n\nReplacement for depreciated variant(s):\n * nginx.http.status.4xx\n * plus.http.status.4xx\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * status_range (applicable filter values: '4xx', '5xx')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id \n * server_zone\n * location_zone\n", + "description": "The current number of responses, grouped by status code range. A filter differentiator is needed for specific status range(s).\n\nReplacement for depreciated variant(s):\n * nginx.http.status.4xx\n * plus.http.status.4xx\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * status_range (applicable filter values: '4xx', '5xx')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id \n * server_zone\n * location_zone\n", "enum": [ - "nginx.http.response.status" + "nginx.http.response.count" ] }, "SettingsInstanceCleanup": { @@ -8322,15 +8792,15 @@ ] }, "NapPolicyEnforcementMode": { - "description": "The current enforcement mode of the NGINX App Protect policy, with the following possible values:\n* `blocking` - Any illegal or suspicious requests are logged and blocked.\n* `monitoring` - Any illegal or suspicious requests are logged but not blocked.\n", + "description": "The current enforcement mode of the NGINX App Protect policy, with the following possible values:\n* `blocking` - Any illegal or suspicious requests are logged and blocked.\n* `transparent` - Any illegal or suspicious requests are logged but not blocked.\n", "type": "string", "enum": [ "blocking", - "monitoring" + "transparent" ], "x-enum-varnames": [ "nap_enforcement_mode_blocking", - "nap_enforcement_mode_monitoring" + "nap_enforcement_mode_transparent" ] }, "NapDeploymentStatus": { @@ -8364,7 +8834,6 @@ "Version": { "description": "The version of the NGINX App Protect resource.", "type": "string", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "example": "2023.12.06" }, "VersionsList": { @@ -8380,11 +8849,6 @@ "$ref": "#/components/schemas/Version" } } - }, - "example": { - "items": [ - "2023.12.06" - ] } }, "ThreatCampaignVersionsListResponse": { @@ -8400,16 +8864,16 @@ "$ref": "#/components/schemas/VersionsList" }, "NapPolicy": { - "description": "The JSON contents of the NGINX App Protect policy.", + "description": "The base64-encoded contents of the NGINX App Protect policy.", "type": "object", "required": [ "policy" ], "properties": { "policy": { - "description": "The NGINX App Protect policy configuration.", - "type": "object", - "minProperties": 1 + "type": "string", + "format": "base64", + "maxLength": 3145728 } } }, @@ -8420,7 +8884,6 @@ "object_id", "name", "deployment_count", - "last_updated_by", "latest" ], "properties": { @@ -8435,70 +8898,17 @@ "description": "The number of NGINX One instances or config sync groups associated with the NGINX App Protect policy.", "type": "integer" }, - "last_updated_by": { - "description": "The NGINX One user who last modified the NGINX App Protect policy.", - "type": "string" - }, - "latest": { - "type": "object", - "required": [ - "enforcement_mode", - "deployed_on", - "version", - "created_on", - "last_updated_by" - ], - "properties": { - "enforcement_mode": { - "$ref": "#/components/schemas/NapPolicyEnforcementMode" - }, - "deployed_on": { - "description": "The date and time when the NGINX App Protect policy was last deployed.", - "type": "string", - "format": "date-time" - }, - "version": { - "description": "The latest version of the NGINX App Protect policy.", - "type": "string" - }, - "created_on": { - "description": "The date and time when the NGINX App Protect policy was created.", - "type": "string", - "format": "date-time" - } - } - }, - "description": { - "type": "string", - "description": "Some detail on the NGINX App Protect policy." - } - }, - "example": { - "object_id": "pol_-uvR3F2TQGm18jnl7bpaGw", - "name": "test-policy", - "last_updated_by": "john.doe@example.com", - "deployment_count": 5, - "decription": "test policy", "latest": { - "enforcement_mode": "blocking", - "deployed_on": "2023-12-06T22:37:24.120114Z", - "version": "2023-12-06 22:37:24", - "created_on": "2023-12-06T22:37:24.120114Z" - } - } - }, - "NapPolicyResponse": { - "description": "Summary information about NGINX App Protect policy.", - "allOf": [ - { - "$ref": "#/components/schemas/NapPolicyMetadata" - }, - { - "$ref": "#/components/schemas/NapPolicy" + "description": "Summary information about the latest NGINX App Protect policy version.", + "$ref": "#/components/schemas/NapPolicyVersionMetadata" + }, + "description": { + "type": "string", + "description": "Some detail on the NGINX App Protect policy." } - ] + } }, - "NapPoliciesListResponse": { + "NapPolicyListResponse": { "description": "List of all NGINX App Protect policies.", "allOf": [ { @@ -8525,11 +8935,16 @@ "object_id": "pol_-uvR3F2TQGm18jnl7bpaGw", "name": "test-policy", "decription": "test policy", - "created_on": "2023-12-06T22:37:24.120114Z", - "latest_version": "2023.12.06", - "last_updated_by": "john.doe@example.com", - "enforcement_mode": "blocking", - "last_deployed": "2023-12-06T22:37:24.120114Z" + "deployment_count": 25, + "latest": { + "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", + "created_on": "2023-12-06T22:37:24.120114Z", + "created_by": "john.doe@example.com", + "deployment_status": "deployed", + "enforcement_mode": "blocking", + "instance_count": 10, + "config_sync_group_count": 15 + } } ] } @@ -8584,18 +8999,6 @@ "bot_sigature_version": { "$ref": "#/components/schemas/Version" } - }, - "example": { - "object_id": "pub_-uvR3F2TQGm18jnl7bpaGw", - "name": "test-instance", - "type": "instance", - "status": "deployed", - "policy_version": "2023-12-06 22:37:24", - "deployed_on": "2023-12-06T22:37:24.120114Z", - "enforcement_mode": "blocking", - "threat_campaign_version": "2023.12.06", - "attack_signature_version": "2023.12.06", - "bot_sigature_version": "2023.12.06" } }, "NapPolicyDeploymentsListResponse": { @@ -8626,11 +9029,10 @@ "type": "instance", "status": "deployed", "policy_version": "2023-12-06 22:37:24", - "deployed_on": "2023-12-06T22:37:24.120114Z", "enforcement_mode": "blocking", "threat_campaign_version": "2023.12.06", "attack_signature_version": "2023.12.06", - "bot_sigature_version": "2023.12.06" + "bot_signature_version": "2023.12.06" } ] } @@ -8646,8 +9048,7 @@ "instance_count", "config_sync_group_count", "created_on", - "created_by", - "latest" + "created_by" ], "properties": { "object_id": { @@ -8669,28 +9070,17 @@ }, "created_on": { "description": "The date and time when the NGINX App Protect policy version was created.", - "type": "string", - "format": "date-time" + "type": "string" }, "created_by": { "description": "The NGINX One user who created the NGINX App Protect policy.", "type": "string" }, - "latest": { - "description": "Indicates whether the NGINX App Protect policy version is latest. Default (`false`) returns the current policy. \nWhen set to `true`, returns the latest policy.\n", - "type": "boolean", - "default": false + "deployed_on": { + "description": "The date and time when the NGINX App Protect policy was last deployed.", + "type": "string", + "format": "date-time" } - }, - "example": { - "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", - "created_on": "2023-12-06T22:37:24.120114Z", - "created_by": "john.doe@example.com", - "deployment_status": "deployed", - "enforcement_mode": "blocking", - "instance_count": 10, - "config_sync_group_count": 15, - "latest": false } }, "NapPolicyVersionResponse": { @@ -8704,6 +9094,27 @@ } ] }, + "NapPolicyVersionListMetadata": { + "description": "Summary information about NGINX App Protect policy version.", + "allOf": [ + { + "$ref": "#/components/schemas/NapPolicyVersionMetadata" + }, + { + "type": "object", + "required": [ + "latest" + ], + "properties": { + "latest": { + "description": "Indicates whether the NGINX App Protect policy version is latest. Default (`false`) returns the current policy. \nWhen set to `true`, returns the latest policy.\n", + "type": "boolean", + "default": false + } + } + } + ] + }, "NapPolicyVersionsListResponse": { "description": "List of all NGINX App Protect versions.", "allOf": [ @@ -8720,14 +9131,14 @@ "description": "An array of NGINX App Protect version objects.", "type": "array", "items": { - "$ref": "#/components/schemas/NapPolicyVersionMetadata" + "$ref": "#/components/schemas/NapPolicyVersionListMetadata" } } }, "example": { "items": [ { - "object_id": "appv_-uvR3F2TQGm18jnl7bpaGw", + "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", "created_on": "2023-12-06T22:37:24.120114Z", "created_by": "john.doe@example.com", "deployment_status": "deployed", @@ -8759,144 +9170,471 @@ "$ref": "#/components/schemas/NapLogProfileMetadata" } } - }, - "example": { - "items": [ - { - "name": "test-log-profile" - }, - { - "object_id": "lp_-uvR3F2TQGm18jnl7bpaGw" + } + } + ] + }, + "NapLogProfileResponse": { + "$ref": "#/components/schemas/NapLogProfileMetadata" + }, + "NapLogProfileMetadata": { + "type": "object", + "required": [ + "name", + "object_id" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the NGINX App Protect log profile." + }, + "object_id": { + "$ref": "#/components/schemas/NapLogProfileObjectID" + }, + "description": { + "description": "Optional field to describe the NGINX App Protect log profile.", + "type": "string", + "minLength": 5, + "maxLength": 256 + } + } + }, + "NapGlobalSettingsListResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginationResponse" + }, + { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "An array of NGINX App Protect global settings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NapGlobalSettingsMetadata" } - ] + } } } ] }, - "NapLogProfileResponse": { - "$ref": "#/components/schemas/NapLogProfileMetadata" + "NapGlobalSettingsResponse": { + "$ref": "#/components/schemas/NapGlobalSettingsMetadata" + }, + "NapGlobalSettingsMetadata": { + "type": "object", + "required": [ + "name", + "object_id" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the NGINX App Protect global settings object." + }, + "description": { + "description": "Optional field to describe the NGINX App Protect global setting object.", + "type": "string", + "minLength": 5, + "maxLength": 256 + }, + "object_id": { + "$ref": "#/components/schemas/NapGlobalSettingsObjectID" + } + } + }, + "NapPolicyObjectID": { + "description": "A globally unique identifier for the App Protect policy.", + "type": "string", + "format": "object_id", + "pattern": "^pol_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "NapPolicyVersionObjectID": { + "description": "A globally unique identifier for the App Protect policy version.", + "type": "string", + "format": "object_id", + "pattern": "^pv_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "NapLogProfileObjectID": { + "description": "A globally unique identifier for the App Protect log profile.", + "type": "string", + "format": "object_id", + "pattern": "^lp_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "NapGlobalSettingsObjectID": { + "description": "A globally unique identifier for the App Protect global settings object.", + "type": "string", + "format": "object_id", + "pattern": "^gs_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "CloudIdentity": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "properties": { + "google_identity": { + "$ref": "#/components/schemas/GoogleIdentity" + } + } + }, + "GoogleIdentity": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "example": "253092013665251357076" + } + } + }, + "CloudUserCreateRequest": { + "type": "object", + "description": "Request structure for creating a new cloud user.", + "required": [ + "cloud_identity" + ], + "properties": { + "cloud_identity": { + "$ref": "#/components/schemas/CloudIdentity" + } + } + }, + "CloudAccountObjectID": { + "description": "A globally unique identifier for the cloud account.", + "type": "string", + "format": "object_id", + "pattern": "^acc_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "CloudUserObjectID": { + "description": "A globally unique identifier for the cloud user.", + "type": "string", + "format": "object_id", + "pattern": "^usr_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "CloudUser": { + "type": "object", + "required": [ + "object_id", + "cloud_identity" + ], + "properties": { + "object_id": { + "$ref": "#/components/schemas/CloudUserObjectID" + }, + "cloud_identity": { + "$ref": "#/components/schemas/CloudIdentity" + } + } + }, + "AuthGoogleCallbackResponse": { + "type": "object", + "required": [ + "access_token" + ], + "properties": { + "access_token": { + "type": "string", + "description": "The signed access token to be used to authenticate API requests. This token should be treated as a \"secret\".\n" + } + } + }, + "SignupWithGoogleRequest": { + "required": [ + "account_id", + "google_user_id" + ], + "properties": { + "account_id": { + "type": "string", + "description": "Google marketplace account id" + }, + "google_user_id": { + "type": "string", + "description": "Google user identity of the user completing signup." + } + } + }, + "SignupWithGoogleResponse": { + "type": "object", + "required": [ + "account_id", + "user_id" + ], + "properties": { + "account_id": { + "$ref": "#/components/schemas/CloudAccountObjectID" + }, + "user_id": { + "$ref": "#/components/schemas/CloudUserObjectID" + } + } + }, + "DeploymentObjectID": { + "type": "string", + "description": "A globally unique identifier for the deployment.", + "format": "object_id", + "pattern": "^depl_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "DeploymentAccountID": { + "type": "string", + "description": "Account ID of deployment.", + "format": "object_id", + "pattern": "^acc_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "DeploymentName": { + "type": "string", + "description": "Name of deployment.", + "minLength": 3, + "maxLength": 30, + "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" + }, + "DeploymentDescription": { + "type": "string", + "description": "Description of deployment.", + "maxLength": 256 + }, + "DeploymentCloudName": { + "type": "string", + "description": "Name of the cloud where deployment resources are provisioned.", + "enum": [ + "google" + ] + }, + "DeploymentCloudInfo": { + "type": "object", + "description": "Cloud-specific deployment info.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleDeploymentInfo" + } + ] + }, + "GoogleDeploymentInfo": { + "type": "object", + "description": "Google deployment info.", + "required": [ + "region", + "network_attachment" + ], + "properties": { + "region": { + "$ref": "#/components/schemas/GoogleRegion" + }, + "network_attachment": { + "$ref": "#/components/schemas/GoogleNetworkAttachment" + }, + "service_attachment": { + "$ref": "#/components/schemas/GoogleServiceAttachment" + } + } }, - "NapLogProfileMetadata": { + "GoogleResourceName": { + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?" + }, + "GoogleRegion": { + "description": "Google region.", + "$ref": "#/components/schemas/GoogleResourceName" + }, + "GoogleNetworkAttachment": { + "type": "string", + "description": "Google network attachment.", + "pattern": "projects/[a-z]([-a-z0-9]*[a-z0-9])?/regions/[a-z]([-a-z0-9]*[a-z0-9])?/networkAttachments/[a-z]([-a-z0-9]*[a-z0-9])?" + }, + "GoogleServiceAttachment": { + "type": "string", + "description": "Google service attachment.", + "pattern": "projects/[a-z]([-a-z0-9]*[a-z0-9])?/regions/[a-z]([-a-z0-9]*[a-z0-9])?/serviceAttachments/[a-z]([-a-z0-9]*[a-z0-9])?" + }, + "Deployment": { "type": "object", + "description": "Deployment specification.", "required": [ + "id", + "account_id", "name", - "object_id" + "description", + "cloud", + "cloud_info", + "status", + "created_at", + "modified_at" ], "properties": { + "id": { + "$ref": "#/components/schemas/DeploymentObjectID" + }, + "account_id": { + "$ref": "#/components/schemas/DeploymentAccountID" + }, "name": { + "$ref": "#/components/schemas/DeploymentName" + }, + "description": { + "$ref": "#/components/schemas/DeploymentDescription" + }, + "cloud": { + "$ref": "#/components/schemas/DeploymentCloudName" + }, + "cloud_info": { + "$ref": "#/components/schemas/DeploymentCloudInfo" + }, + "status": { + "$ref": "#/components/schemas/DeploymentStatus" + }, + "created_at": { "type": "string", - "description": "The name of the NGINX App Protect log profile." + "description": "Datetime when request to create deployment was received.", + "format": "date-time" }, - "object_id": { - "$ref": "#/components/schemas/NapLogProfileObjectID" + "modified_at": { + "type": "string", + "description": "Datetime when deployment was last modified.", + "format": "date-time" }, - "description": { - "description": "Optional field to describe the NGINX App Protect log profile.", + "deleted_at": { "type": "string", - "minLength": 5, - "maxLength": 256 + "description": "Datetime when request to delete deployment was received.", + "format": "date-time" } } }, - "NapGlobalSettingsListResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginationResponse" - }, - { - "type": "object", - "required": [ - "items" - ], - "properties": { - "items": { - "description": "An array of NGINX App Protect global settings.", - "type": "array", - "items": { - "$ref": "#/components/schemas/NapGlobalSettingsMetadata" - } - } - }, - "example": { - "items": [ - { - "name": "test-global-settings" - }, - { - "object_id": "gs_-uvR3F2TQGm18jnl7bpaGw" - } - ] - } + "DeploymentStatus": { + "type": "object", + "description": "Deployment status info.", + "required": [ + "provisioning_state" + ], + "properties": { + "provisioning_state": { + "$ref": "#/components/schemas/DeploymentProvisioningState" } - ] - }, - "NapGlobalSettingsResponse": { - "$ref": "#/components/schemas/NapGlobalSettingsMetadata" + } }, - "NapGlobalSettingsMetadata": { + "DeploymentProvisioningState": { "type": "object", + "description": "Deployment provisioning state info.", "required": [ - "name", - "object_id" + "state", + "modified_at" ], "properties": { - "name": { + "state": { "type": "string", - "description": "The name of the NGINX App Protect global settings object." + "description": "Provisioning state name/value.", + "enum": [ + "deleting", + "failed", + "pending", + "ready" + ] }, - "description": { - "description": "Optional field to describe the NGINX App Protect global setting object.", + "details": { "type": "string", - "minLength": 5, + "description": "Provisioning state details.", "maxLength": 256 }, - "object_id": { - "$ref": "#/components/schemas/NapGlobalSettingsObjectID" + "modified_at": { + "type": "string", + "description": "Datetime of last state change.", + "format": "date-time" } } }, - "NapPolicyObjectID": { - "description": "A globally unique identifier for the App Protect policy.", - "type": "string", - "format": "object_id", - "pattern": "^pol_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "NapPolicyVersionObjectID": { - "description": "A globally unique identifier for the App Protect policy version.", - "type": "string", - "format": "object_id", - "pattern": "^pv_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + "DeploymentListResponse": { + "type": "object", + "description": "List of deployments.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment" + } + } } }, - "NapLogProfileObjectID": { - "description": "A globally unique identifier for the App Protect log profile.", - "type": "string", - "format": "object_id", - "pattern": "^lp_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + "DeploymentCreateRequest": { + "type": "object", + "description": "Request spec for creating a deployment.", + "required": [ + "name", + "cloud", + "cloud_info" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/DeploymentName" + }, + "description": { + "$ref": "#/components/schemas/DeploymentDescription" + }, + "cloud": { + "$ref": "#/components/schemas/DeploymentCloudName" + }, + "cloud_info": { + "$ref": "#/components/schemas/DeploymentCloudInfo" + } } }, - "NapGlobalSettingsObjectID": { - "description": "A globally unique identifier for the App Protect global settings object.", - "type": "string", - "format": "object_id", - "pattern": "^gs_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + "DeploymentUpdateRequest": { + "type": "object", + "description": "Request spec for updating a deployment.", + "properties": { + "name": { + "$ref": "#/components/schemas/DeploymentName" + }, + "description": { + "$ref": "#/components/schemas/DeploymentDescription" + } } } }, @@ -8953,6 +9691,172 @@ "object_id": "key_wN3IhLCmR3qmwybG_6ptEg", "instances_count": 3 } + }, + "CloudUserResponse": { + "value": { + "cloud_identity": { + "google_identity": { + "id": "253092013665251357076" + } + } + } + }, + "DeploymentListResponse": { + "value": { + "items": [ + { + "id": "depl_6zYc64JKR0uxnoEcLH1gGA", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "tst-foo", + "description": "", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", + "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" + }, + "status": { + "provisioning_state": { + "state": "ready", + "details": "", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "created_at": "2025-03-31T10:00:00Z", + "modified_at": "2025-03-31T10:05:00Z" + }, + { + "id": "depl_DrRnpntTRpGOxaroQ6aOFg", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "tst-bar", + "description": "test w/ network attachment from project bar", + "cloud": "google", + "cloud_info": { + "region": "eu-west-1", + "network_attachment": "projects/bar/regions/us-east-1/networkAttachments/bar" + }, + "status": { + "provisioning_state": { + "state": "failed", + "details": "network attachment 'bar' not found", + "modified_at": "2025-03-31T11:03:00Z" + } + }, + "created_at": "2025-03-31T11:00:00Z", + "modified_at": "2025-03-31T11:03:00Z" + } + ] + } + }, + "DeploymentCreateRequest": { + "value": { + "name": "tst-foo", + "description": "", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo" + } + } + }, + "DeploymentCreateResponse": { + "value": { + "id": "depl_6zYc64JKR0uxnoEcLH1gGA", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "tst-foo", + "description": "", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", + "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" + }, + "status": { + "provisioning_state": { + "state": "pending", + "details": "", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "created_at": "2025-03-31T10:00:00Z", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "DeploymentGetResponse": { + "value": { + "id": "depl_6zYc64JKR0uxnoEcLH1gGA", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "tst-foo", + "description": "", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", + "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" + }, + "status": { + "provisioning_state": { + "state": "ready", + "details": "", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "created_at": "2025-03-31T10:00:00Z", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "DeploymentUpdateRequest": { + "value": { + "name": "poc-foo", + "description": "test deployment for project foo" + } + }, + "DeploymentUpdateResponse": { + "value": { + "id": "depl_6zYc64JKR0uxnoEcLH1gGA", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "poc-foo", + "description": "test deployment for project foo", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", + "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" + }, + "status": { + "provisioning_state": { + "state": "ready", + "details": "", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "created_at": "2025-03-31T10:00:00Z", + "modified_at": "2025-03-31T10:05:00Z" + } + }, + "DeploymentDeleteResponse": { + "value": { + "id": "depl_6zYc64JKR0uxnoEcLH1gGA", + "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", + "name": "poc-foo", + "description": "test deployment for project foo", + "cloud": "google", + "cloud_info": { + "region": "us-east-1", + "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", + "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" + }, + "status": { + "provisioning_state": { + "state": "deleting", + "details": "", + "modified_at": "2025-03-31T10:15:00Z" + } + }, + "created_at": "2025-03-31T10:00:00Z", + "modified_at": "2025-03-31T10:05:00Z", + "deleted_at": "2025-03-31T10:15:00Z" + } } }, "responses": { @@ -8975,6 +9879,36 @@ } } } + }, + "Unauthorized": { + "description": "Client is not authorized to perform the requested operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "NotFound": { + "description": "Requested resource was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "Conflict": { + "description": "Requested operation cannot be performed at this time.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, "securitySchemes": { @@ -9014,6 +9948,20 @@ "tags": [ "Settings" ] + }, + { + "name": "TODO", + "tags": [ + "Authorization", + "Signup", + "User" + ] + }, + { + "name": "Manage NAAS deployments", + "tags": [ + "Deployments" + ] } ] } \ No newline at end of file From faf118d9e2d59b95e6d2549b5b09b4a0c484d28d Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:29:22 -0700 Subject: [PATCH 3/3] fix --- static/nginx-one/api/one.json | 1654 +++++++-------------------------- 1 file changed, 353 insertions(+), 1301 deletions(-) diff --git a/static/nginx-one/api/one.json b/static/nginx-one/api/one.json index 9bed47497..500ad58aa 100644 --- a/static/nginx-one/api/one.json +++ b/static/nginx-one/api/one.json @@ -18,17 +18,6 @@ "default": "tenant-example" } } - }, - { - "url": "/api/v1/marketplace" - }, - { - "url": "/api/v1/namespaces/{namespace}", - "variables": { - "namespace": { - "default": "default" - } - } } ], "tags": [ @@ -74,26 +63,6 @@ "name": "Settings", "description": "Configuration option for different aspect of NGINX One service.\nYou can set NGINX Instance cleanup preferences.\n", "x-displayName": "Settings" - }, - { - "name": "Authorization", - "description": "TODO\n", - "x-displayName": "Authorization" - }, - { - "name": "Signup", - "description": "TODO\n", - "x-displayName": "Signup" - }, - { - "name": "User", - "description": "TODO\n", - "x-displayName": "User" - }, - { - "name": "Deployments", - "description": "Manage NAAS deployments.", - "x-displayName": "Deployments" } ], "paths": { @@ -2594,7 +2563,7 @@ "x-nginx-one-action": "create", "x-nginx-one-entity": "NGINX instance configuration", "summary": "Publish a configuration to an instance", - "description": "Publishes a new or updated NGINX configuration to the specified instance.\nIn the specified `configs`, empty files are not allowed in the directory.\nIf no existing configuration is found, a new one is created; otherwise, the current configuration is overwritten. \nBefore publishing, use the `PUT /instances/{instanceObjectID}/config-report` endpoint to generate an analysis report for the provided configuration.\nYou can specify `payloads` in the request to deploy managed certificates and keys to the dataplane. Include file paths\nfor each payload component.\n", + "description": "Publishes a new or updated NGINX configuration to the specified instance. \nIf no existing configuration is found, a new one is created; otherwise, the current configuration is overwritten. \nBefore publishing, use the `PUT /instances/{instanceObjectID}/config-report` endpoint to generate an analysis report for the provided configuration.\nYou can specify `payloads` in the request to deploy managed certificates and keys to the dataplane. Include file paths\nfor each payload component.\n", "operationId": "publishInstanceConfig", "requestBody": { "required": true, @@ -3760,8 +3729,6 @@ } } }, - "/staged-configs/{stagedConfigObjectID}/export": {}, - "/staged-configs/import": {}, "/monitor/metrics_query_topx": { "post": { "tags": [ @@ -3783,7 +3750,7 @@ "metrics": [ { "aggregate": "sum", - "name": "nginx.http.request.count" + "name": "nginx.http.requests" } ], "series_limit": 1, @@ -3898,564 +3865,136 @@ } } } - }, - "/auth/google/authorize": { - "get": { - "tags": [ - "Authorization" - ], - "summary": "Returns a redirect to authenticate with Google.", - "operationId": "googleAuthorize", - "responses": { - "302": { - "description": "Redirect to authenticate with Google." - }, - "500": { - "description": "An unexpected error occurred on the server. Please try the request again later.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + } + }, + "components": { + "parameters": { + "Paginated": { + "name": "paginated", + "in": "query", + "schema": { + "type": "boolean", + "default": true + }, + "description": "A boolean indicating if the results should be presented as a paginated list. Defaults to `true`. \nWhen set to `false`, the results are returned as a condensed, non-paginated list.\n", + "required": false + }, + "Limit": { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0 + }, + "description": "An integer that specifies the maximum number of items to be returned. \nSetting this to `0` will result in no items being returned, but a total count will still be provided. \nThis parameter is not applicable if `paginated` is `false`.\n", + "required": false + }, + "Offset": { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1 + }, + "description": "An integer that specifies the starting position of the results, starting at `1`.\nThis parameter is not applicable if `paginated` is `false`.\n" + }, + "FilterFieldDataPlaneKeys": { + "name": "filter_fields", + "in": "query", + "description": "Filter options for data plane keys; used in conjunction with other filter parameters having the same array length.\n\nWhen filtering on `status`, only the following `filter_values` are supported:\n * revoked\n * expired\n * valid\n", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterNameDataPlaneKeys" } } - } - }, - "/auth/google/callback": { - "get": { - "tags": [ - "Authorization" - ], - "summary": "Callback after the Google login page.", - "description": "The Google callback endpoint is where the user will be redirected after logging in and authorizing our service. This callback carries the Google code we exchange for an authorization token.\n", - "operationId": "googleCallback", - "parameters": [ - { - "name": "code", - "in": "query", - "required": true, - "description": "The authorization code returned by the Google authorization server.", - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "required": true, - "description": "A signed state parameter used to mitigate CSRF attacks. In some cases, this may additionally be used to carry needed state from the redirect back to the callback.\n", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Authorization has been granted and an access token is generated. Use the returned access token to\nauthenticate future API requests.\n", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthGoogleCallbackResponse" - } - } - } - }, - "401": { - "description": "The request is either missing or provided invalid input.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "The request contains valid input, but authorization cannot be granted." - }, - "500": { - "description": "An unexpected error occurred on the server. Please try the request again later.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } + }, + "FilterOperands": { + "name": "filter_ops", + "in": "query", + "description": "An array of strings defining the operands for filtering, to be used in conjunction with `filter_fields` and `filter_values`. \nAll filter parameters must have matching array lengths. Currently, the only supported operand is `\"IN\"`.\n", + "schema": { + "$ref": "#/components/schemas/FilterOperands" } - } - }, - "/auth/google/signup": { - "post": { - "tags": [ - "Signup" - ], - "summary": "Creates an account and first user.", - "operationId": "googleSignup", - "requestBody": { - "description": "Completed sign up form with Google account and user identity from the\nmarketplace token.\n", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupWithGoogleRequest" - } - } + }, + "FilterValues": { + "name": "filter_values", + "in": "query", + "description": "An array of strings containing the keywords for filtering. \nMultiple keywords can be chained using the `|` character. \nEnsure this parameter's array length matches those of `filter_fields` and `filter_ops` for effective filtering.\nThe total length of the filter string should not exceed 1024 characters.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "value1|value2|value3", + "minLength": 1, + "maxLength": 1024 } + } + }, + "DataPlaneKeyParamObjectID": { + "name": "data_plane_key_id", + "in": "path", + "schema": { + "$ref": "#/components/schemas/DataPlaneKeyObjectID" }, - "responses": { - "200": { - "description": "The new account has been activated and first user created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignupWithGoogleResponse" - } - } - } - }, - "400": { - "description": "Request cannot be processed due to invalid input or parameters. Verify the request format and provided data.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "An unexpected error occurred on the server. Please try the request again later.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "description": "A globally unique identifier for the data plane key.\n", + "required": true + }, + "FilterFieldCertificates": { + "name": "filter_fields", + "in": "query", + "description": "Filter options for certificates; used in conjunction with other filter parameters having the same array length.\n", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterNameCertificates" } } - } - }, - "/users": { - "post": { - "tags": [ - "User" - ], - "x-nginx-one-action": "create", - "x-nginx-one-entity": "user", - "summary": "Create a user", - "description": "TODO\n", - "operationId": "createUser", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloudUserCreateRequest" - }, - "examples": { - "CloudUserCreateRequest": { - "$ref": "#/components/examples/CloudUserResponse" - } - } - } + }, + "SortDirection": { + "name": "sort_dir", + "in": "query", + "description": "Sorting direction for the criteria and the resulting collection returned. Defaults to descending if not specified.\n", + "schema": { + "type": "string", + "enum": [ + "Ascending", + "Descending" + ], + "x-enum-varnames": [ + "ascending", + "descending" + ] + } + }, + "SortNameCertificates": { + "name": "sort_certificates", + "in": "query", + "description": "Sort certificates by enumerate value(s). Ordinal position determines primary, secondary, etc.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "name", + "subject_name", + "not_before", + "not_after" + ], + "x-enum-varnames": [ + "sort_name_certificates_name", + "sort_name_certificates_subject_name", + "sort_name_certificates_not_before", + "sort_name_certificates_not_after" + ] } - }, - "responses": { - "200": { - "description": "Successfully created the cloud user.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloudUser" - } - } - } - }, - "400": { - "description": "Request cannot be processed due to invalid input or parameters. Verify the request format and provided data.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "An unexpected error occurred on the server. Please try the request again later.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/deployments": { - "get": { - "tags": [ - "Deployments" - ], - "summary": "List deployments", - "description": "Returns a list of deployments.", - "operationId": "listDeployments", - "responses": { - "200": { - "description": "Successfully returned the list of deployments.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeploymentListResponse" - }, - "examples": { - "DeploymentListResponse": { - "$ref": "#/components/examples/DeploymentListResponse" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/InvalidRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "500": { - "$ref": "#/components/responses/InternalServerErr" - } - } - }, - "post": { - "tags": [ - "Deployments" - ], - "summary": "Create deployment", - "description": "Creates a new deployment.", - "operationId": "createDeployment", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeploymentCreateRequest" - }, - "examples": { - "DeploymentCreateRequest": { - "$ref": "#/components/examples/DeploymentCreateRequest" - } - } - } - } - }, - "responses": { - "202": { - "description": "Successfully created the deployment.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - }, - "examples": { - "DeploymentCreateResponse": { - "$ref": "#/components/examples/DeploymentCreateResponse" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/InvalidRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "500": { - "$ref": "#/components/responses/InternalServerErr" - } - } - } - }, - "/deployments/{deployment_id}": { - "delete": { - "tags": [ - "Deployments" - ], - "summary": "Delete deployment", - "description": "Deletes the specified deployment.", - "operationId": "deleteDeployment", - "parameters": [ - { - "$ref": "#/components/parameters/DeploymentObjectID" - } - ], - "responses": { - "202": { - "description": "Successfully deleted the deployment.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - }, - "examples": { - "DeploymentDeleteResponse": { - "$ref": "#/components/examples/DeploymentDeleteResponse" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalServerErr" - } - } - }, - "get": { - "tags": [ - "Deployments" - ], - "summary": "Get deployment", - "description": "Returns deployment details.", - "operationId": "getDeployment", - "parameters": [ - { - "$ref": "#/components/parameters/DeploymentObjectID" - } - ], - "responses": { - "200": { - "description": "Successfully returned the deployment details.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - }, - "examples": { - "DeploymentGetResponse": { - "$ref": "#/components/examples/DeploymentGetResponse" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/InvalidRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalServerErr" - } - } - }, - "patch": { - "tags": [ - "Deployments" - ], - "summary": "Update deployment", - "description": "Updates the specified deployment.", - "operationId": "updateDeployment", - "parameters": [ - { - "$ref": "#/components/parameters/DeploymentObjectID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeploymentUpdateRequest" - }, - "examples": { - "DeploymentUpdateRequest": { - "$ref": "#/components/examples/DeploymentUpdateRequest" - } - } - } - } - }, - "responses": { - "200": { - "description": "Successfully updated the deployment.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - }, - "examples": { - "DeploymentUpdateResponse": { - "$ref": "#/components/examples/DeploymentUpdateResponse" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/InvalidRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "500": { - "$ref": "#/components/responses/InternalServerErr" - } - } - } - } - }, - "components": { - "parameters": { - "Paginated": { - "name": "paginated", - "in": "query", - "schema": { - "type": "boolean", - "default": true - }, - "description": "A boolean indicating if the results should be presented as a paginated list. Defaults to `true`. \nWhen set to `false`, the results are returned as a condensed, non-paginated list.\n", - "required": false - }, - "Limit": { - "name": "limit", - "in": "query", - "schema": { - "type": "integer", - "minimum": 0 - }, - "description": "An integer that specifies the maximum number of items to be returned. \nSetting this to `0` will result in no items being returned, but a total count will still be provided. \nThis parameter is not applicable if `paginated` is `false`.\n", - "required": false - }, - "Offset": { - "name": "offset", - "in": "query", - "schema": { - "type": "integer", - "minimum": 1 - }, - "description": "An integer that specifies the starting position of the results, starting at `1`.\nThis parameter is not applicable if `paginated` is `false`.\n" - }, - "FilterFieldDataPlaneKeys": { - "name": "filter_fields", - "in": "query", - "description": "Filter options for data plane keys; used in conjunction with other filter parameters having the same array length.\n\nWhen filtering on `status`, only the following `filter_values` are supported:\n * revoked\n * expired\n * valid\n", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterNameDataPlaneKeys" - } - } - }, - "FilterOperands": { - "name": "filter_ops", - "in": "query", - "description": "An array of strings defining the operands for filtering, to be used in conjunction with `filter_fields` and `filter_values`. \nAll filter parameters must have matching array lengths. Currently, the only supported operand is `\"IN\"`.\n", - "schema": { - "$ref": "#/components/schemas/FilterOperands" - } - }, - "FilterValues": { - "name": "filter_values", - "in": "query", - "description": "An array of strings containing the keywords for filtering. \nMultiple keywords can be chained using the `|` character. \nEnsure this parameter's array length matches those of `filter_fields` and `filter_ops` for effective filtering.\nThe total length of the filter string should not exceed 1024 characters.\n", - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "value1|value2|value3", - "minLength": 1, - "maxLength": 1024 - } - } - }, - "DataPlaneKeyParamObjectID": { - "name": "data_plane_key_id", - "in": "path", - "schema": { - "$ref": "#/components/schemas/DataPlaneKeyObjectID" - }, - "description": "A globally unique identifier for the data plane key.\n", - "required": true - }, - "FilterFieldCertificates": { - "name": "filter_fields", - "in": "query", - "description": "Filter options for certificates; used in conjunction with other filter parameters having the same array length.\n", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FilterNameCertificates" - } - } - }, - "SortDirection": { - "name": "sort_dir", - "in": "query", - "description": "Sorting direction for the criteria and the resulting collection returned. Defaults to descending if not specified.\n", - "schema": { - "type": "string", - "enum": [ - "Ascending", - "Descending" - ], - "x-enum-varnames": [ - "ascending", - "descending" - ] - } - }, - "SortNameCertificates": { - "name": "sort_certificates", - "in": "query", - "description": "Sort certificates by enumerate value(s). Ordinal position determines primary, secondary, etc.\n", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "name", - "subject_name", - "not_before", - "not_after" - ], - "x-enum-varnames": [ - "sort_name_certificates_name", - "sort_name_certificates_subject_name", - "sort_name_certificates_not_before", - "sort_name_certificates_not_after" - ] - } - } - }, - "CertificateParamObjectID": { - "name": "certificateObjectID", - "in": "path", - "schema": { - "$ref": "#/components/schemas/CertificateObjectID" + } + }, + "CertificateParamObjectID": { + "name": "certificateObjectID", + "in": "path", + "schema": { + "$ref": "#/components/schemas/CertificateObjectID" }, "description": "A globally unique identifier for the certificate.\n", "required": true @@ -4709,15 +4248,6 @@ }, "description": "A globally unique identifier for the NGINX staged config.\n", "required": true - }, - "DeploymentObjectID": { - "name": "deployment_id", - "in": "path", - "schema": { - "$ref": "#/components/schemas/DeploymentObjectID" - }, - "description": "A globally unique identifier for the deployment.", - "required": true } }, "schemas": { @@ -4760,11 +4290,11 @@ "properties": { "total": { "type": "integer", - "description": "The absolute total number of the resource in the NGINX One Console, ignoring any filter(s).\n" + "description": "The absolute total number of the resource in the NGINX One Console.\n" }, "count": { "type": "integer", - "description": "The total number of results generated by the list or query operation, accounting for any filter(s).\nThis number can be greater than the number of returned resources when pagination is in effect and a page size limit (or maximum allowed) is reached.\n" + "description": "The total number of results generated by the list or query operation. \nThis number might be greater than the number of displayed resources, such as when pagination is in effect.\n" }, "start_index": { "type": "integer", @@ -8204,7 +7734,7 @@ "MetricDimension": { "type": "string", "default": "display_name", - "description": "Static list of all metric dimensions.\n * `display_name` - The display name of the NGINX instance.\n * `file_path` - Path to a desired file.\n * `parent_hostname` - The hostname of the NGINX Plus instance.\n * `instance_object_id` - Instance Object ID is the unique identifier for an Instance registered with NGINX One Console.\n * `location_zone` - The name of an HTTP location zone.\n * `mount_point` - A filesystem mount point.\n * `namespace` - The Namespace associated with the metric data.\n * `network_interface` - A server network interface.\n * `nginx_id` - The unique identifier of an nginx instance running on the data plane.\n * `server_zone` - The name of an HTTP or Stream server zone.\n * `system_id` - The unique identifier of the the operating system where nginx-agent is running.\n * `tenant` - The Tenant associated with the metric data.\n * `csg_object_id` - Config Sync Group Object ID is the unique identifier for a Config Sync Group registered with NGINX One Console.\n * `mode` - Variant value associated with metric `system.cpu.utilization`.\n * `state` - Variant value associated with metrics `system.filesystem.usage`, `system.memory.usage`.\n * `io_direction` - Variant value associated with metric `system.network.io`.\n * `status_range` - Variant value associated with metric `nginx.http.response.count`.\n", + "description": "Static list of all metric dimensions.\n * `display_name` - The display name of the NGINX instance.\n * `file_path` - Path to a desired file.\n * `parent_hostname` - The hostname of the NGINX Plus instance.\n * `instance_object_id` - Instance Object ID is the unique identifier for an Instance registered with NGINX One Console.\n * `location_zone` - The name of an HTTP location zone.\n * `mount_point` - A filesystem mount point.\n * `namespace` - The Namespace associated with the metric data.\n * `network_interface` - A server network interface.\n * `nginx_id` - The unique identifier of an nginx instance running on the data plane.\n * `server_zone` - The name of an HTTP or Stream server zone.\n * `system_id` - The unique identifier of the the operating system where nginx-agent is running.\n * `tenant` - The Tenant associated with the metric data.\n * `csg_object_id` - Config Sync Group Object ID is the unique identifier for a Config Sync Group registered with NGINX One Console.\n * `mode` - Variant value associated with metric `system.cpu.time`.\n * `state` - Variant value associated with metrics `system.filesystem.usage`, `system.memory.usage`.\n * `io_direction` - Variant value associated with metric `system.network.io`.\n * `status_range` - Variant value associated with metric `nginx.http.response.status`.\n", "enum": [ "display_name", "file_path", @@ -8334,7 +7864,7 @@ }, "example": [ { - "name": "system.cpu.utilization", + "name": "system.cpu.time", "aggregate": "avg", "filter": [ { @@ -8523,10 +8053,10 @@ "MetricName": { "type": "string", "description": "Metric names available for querying.\n", - "example": "nginx.http.request.count", + "example": "nginx.http.requests", "oneOf": [ { - "$ref": "#/components/schemas/MetricSystemCpuUtilization" + "$ref": "#/components/schemas/MetricSystemCpuTime" }, { "$ref": "#/components/schemas/MetricSystemFilesystemUsage" @@ -8541,18 +8071,18 @@ "$ref": "#/components/schemas/MetricSystemNetworkIo" }, { - "$ref": "#/components/schemas/MetricNginxHttpRequestCount" + "$ref": "#/components/schemas/MetricNginxHttpRequests" }, { - "$ref": "#/components/schemas/MetricNginxHttpResponseCount" + "$ref": "#/components/schemas/MetricNginxHttpResponseStatus" } ] }, - "MetricSystemCpuUtilization": { + "MetricSystemCpuTime": { "type": "string", "description": "Total system CPU utilization for 'system' or 'user', percentage. A filter differentiator is needed for specific mode(s).\n\nReplacement for depreciated variant(s):\n * system.cpu.system\n * system.cpu.user\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * mode (applicable filter values: 'system', 'user')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n", "enum": [ - "system.cpu.utilization" + "system.cpu.time" ] }, "MetricSystemFilesystemUsage": { @@ -8583,18 +8113,18 @@ "system.network.io" ] }, - "MetricNginxHttpRequestCount": { + "MetricNginxHttpRequests": { "type": "string", - "description": "The current number of client requests received from clients.\n\nReplacement for depreciated variant(s):\n * nginx.http.request.count\n * plus.http.request.count\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n * server_zone\n * location_zone\n", + "description": "Total number of client requests received from clients.\n\nReplacement for depreciated variant(s):\n * nginx.http.request.count\n * plus.http.request.count\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id\n * server_zone\n * location_zone\n", "enum": [ - "nginx.http.request.count" + "nginx.http.requests" ] }, - "MetricNginxHttpResponseCount": { + "MetricNginxHttpResponseStatus": { "type": "string", - "description": "The current number of responses, grouped by status code range. A filter differentiator is needed for specific status range(s).\n\nReplacement for depreciated variant(s):\n * nginx.http.status.4xx\n * plus.http.status.4xx\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * status_range (applicable filter values: '4xx', '5xx')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id \n * server_zone\n * location_zone\n", + "description": "Number of responses for by status code range. A filter differentiator is needed for specific status range(s).\n\nReplacement for depreciated variant(s):\n * nginx.http.status.4xx\n * plus.http.status.4xx\n\nAggregation(s) supported:\n * min\n * max\n * sum\n * avg\n * rate\n\nCatalog dimension filter differentiator:\n * status_range (applicable filter values: '4xx', '5xx')\n\nCatalog dimension(s) supported:\n * instance_object_id\n * csg_object_id\n * system_id\n * parent_hostname\n * display_name\n * nginx_id \n * server_zone\n * location_zone\n", "enum": [ - "nginx.http.response.count" + "nginx.http.response.status" ] }, "SettingsInstanceCleanup": { @@ -8792,15 +8322,15 @@ ] }, "NapPolicyEnforcementMode": { - "description": "The current enforcement mode of the NGINX App Protect policy, with the following possible values:\n* `blocking` - Any illegal or suspicious requests are logged and blocked.\n* `transparent` - Any illegal or suspicious requests are logged but not blocked.\n", + "description": "The current enforcement mode of the NGINX App Protect policy, with the following possible values:\n* `blocking` - Any illegal or suspicious requests are logged and blocked.\n* `monitoring` - Any illegal or suspicious requests are logged but not blocked.\n", "type": "string", "enum": [ "blocking", - "transparent" + "monitoring" ], "x-enum-varnames": [ "nap_enforcement_mode_blocking", - "nap_enforcement_mode_transparent" + "nap_enforcement_mode_monitoring" ] }, "NapDeploymentStatus": { @@ -8834,6 +8364,7 @@ "Version": { "description": "The version of the NGINX App Protect resource.", "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "example": "2023.12.06" }, "VersionsList": { @@ -8849,6 +8380,11 @@ "$ref": "#/components/schemas/Version" } } + }, + "example": { + "items": [ + "2023.12.06" + ] } }, "ThreatCampaignVersionsListResponse": { @@ -8864,16 +8400,16 @@ "$ref": "#/components/schemas/VersionsList" }, "NapPolicy": { - "description": "The base64-encoded contents of the NGINX App Protect policy.", + "description": "The JSON contents of the NGINX App Protect policy.", "type": "object", "required": [ "policy" ], "properties": { "policy": { - "type": "string", - "format": "base64", - "maxLength": 3145728 + "description": "The NGINX App Protect policy configuration.", + "type": "object", + "minProperties": 1 } } }, @@ -8884,6 +8420,7 @@ "object_id", "name", "deployment_count", + "last_updated_by", "latest" ], "properties": { @@ -8898,17 +8435,70 @@ "description": "The number of NGINX One instances or config sync groups associated with the NGINX App Protect policy.", "type": "integer" }, + "last_updated_by": { + "description": "The NGINX One user who last modified the NGINX App Protect policy.", + "type": "string" + }, "latest": { - "description": "Summary information about the latest NGINX App Protect policy version.", - "$ref": "#/components/schemas/NapPolicyVersionMetadata" + "type": "object", + "required": [ + "enforcement_mode", + "deployed_on", + "version", + "created_on", + "last_updated_by" + ], + "properties": { + "enforcement_mode": { + "$ref": "#/components/schemas/NapPolicyEnforcementMode" + }, + "deployed_on": { + "description": "The date and time when the NGINX App Protect policy was last deployed.", + "type": "string", + "format": "date-time" + }, + "version": { + "description": "The latest version of the NGINX App Protect policy.", + "type": "string" + }, + "created_on": { + "description": "The date and time when the NGINX App Protect policy was created.", + "type": "string", + "format": "date-time" + } + } }, "description": { "type": "string", "description": "Some detail on the NGINX App Protect policy." } - } + }, + "example": { + "object_id": "pol_-uvR3F2TQGm18jnl7bpaGw", + "name": "test-policy", + "last_updated_by": "john.doe@example.com", + "deployment_count": 5, + "decription": "test policy", + "latest": { + "enforcement_mode": "blocking", + "deployed_on": "2023-12-06T22:37:24.120114Z", + "version": "2023-12-06 22:37:24", + "created_on": "2023-12-06T22:37:24.120114Z" + } + } + }, + "NapPolicyResponse": { + "description": "Summary information about NGINX App Protect policy.", + "allOf": [ + { + "$ref": "#/components/schemas/NapPolicyMetadata" + }, + { + "$ref": "#/components/schemas/NapPolicy" + } + ] }, - "NapPolicyListResponse": { + "NapPoliciesListResponse": { "description": "List of all NGINX App Protect policies.", "allOf": [ { @@ -8935,16 +8525,11 @@ "object_id": "pol_-uvR3F2TQGm18jnl7bpaGw", "name": "test-policy", "decription": "test policy", - "deployment_count": 25, - "latest": { - "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", - "created_on": "2023-12-06T22:37:24.120114Z", - "created_by": "john.doe@example.com", - "deployment_status": "deployed", - "enforcement_mode": "blocking", - "instance_count": 10, - "config_sync_group_count": 15 - } + "created_on": "2023-12-06T22:37:24.120114Z", + "latest_version": "2023.12.06", + "last_updated_by": "john.doe@example.com", + "enforcement_mode": "blocking", + "last_deployed": "2023-12-06T22:37:24.120114Z" } ] } @@ -8999,6 +8584,18 @@ "bot_sigature_version": { "$ref": "#/components/schemas/Version" } + }, + "example": { + "object_id": "pub_-uvR3F2TQGm18jnl7bpaGw", + "name": "test-instance", + "type": "instance", + "status": "deployed", + "policy_version": "2023-12-06 22:37:24", + "deployed_on": "2023-12-06T22:37:24.120114Z", + "enforcement_mode": "blocking", + "threat_campaign_version": "2023.12.06", + "attack_signature_version": "2023.12.06", + "bot_sigature_version": "2023.12.06" } }, "NapPolicyDeploymentsListResponse": { @@ -9029,10 +8626,11 @@ "type": "instance", "status": "deployed", "policy_version": "2023-12-06 22:37:24", + "deployed_on": "2023-12-06T22:37:24.120114Z", "enforcement_mode": "blocking", "threat_campaign_version": "2023.12.06", "attack_signature_version": "2023.12.06", - "bot_signature_version": "2023.12.06" + "bot_sigature_version": "2023.12.06" } ] } @@ -9048,7 +8646,8 @@ "instance_count", "config_sync_group_count", "created_on", - "created_by" + "created_by", + "latest" ], "properties": { "object_id": { @@ -9070,17 +8669,28 @@ }, "created_on": { "description": "The date and time when the NGINX App Protect policy version was created.", - "type": "string" + "type": "string", + "format": "date-time" }, "created_by": { "description": "The NGINX One user who created the NGINX App Protect policy.", "type": "string" }, - "deployed_on": { - "description": "The date and time when the NGINX App Protect policy was last deployed.", - "type": "string", - "format": "date-time" + "latest": { + "description": "Indicates whether the NGINX App Protect policy version is latest. Default (`false`) returns the current policy. \nWhen set to `true`, returns the latest policy.\n", + "type": "boolean", + "default": false } + }, + "example": { + "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", + "created_on": "2023-12-06T22:37:24.120114Z", + "created_by": "john.doe@example.com", + "deployment_status": "deployed", + "enforcement_mode": "blocking", + "instance_count": 10, + "config_sync_group_count": 15, + "latest": false } }, "NapPolicyVersionResponse": { @@ -9094,27 +8704,6 @@ } ] }, - "NapPolicyVersionListMetadata": { - "description": "Summary information about NGINX App Protect policy version.", - "allOf": [ - { - "$ref": "#/components/schemas/NapPolicyVersionMetadata" - }, - { - "type": "object", - "required": [ - "latest" - ], - "properties": { - "latest": { - "description": "Indicates whether the NGINX App Protect policy version is latest. Default (`false`) returns the current policy. \nWhen set to `true`, returns the latest policy.\n", - "type": "boolean", - "default": false - } - } - } - ] - }, "NapPolicyVersionsListResponse": { "description": "List of all NGINX App Protect versions.", "allOf": [ @@ -9131,14 +8720,14 @@ "description": "An array of NGINX App Protect version objects.", "type": "array", "items": { - "$ref": "#/components/schemas/NapPolicyVersionListMetadata" + "$ref": "#/components/schemas/NapPolicyVersionMetadata" } } }, "example": { "items": [ { - "object_id": "pv_-uvR3F2TQGm18jnl7bpaGw", + "object_id": "appv_-uvR3F2TQGm18jnl7bpaGw", "created_on": "2023-12-06T22:37:24.120114Z", "created_by": "john.doe@example.com", "deployment_status": "deployed", @@ -9170,471 +8759,144 @@ "$ref": "#/components/schemas/NapLogProfileMetadata" } } - } - } - ] - }, - "NapLogProfileResponse": { - "$ref": "#/components/schemas/NapLogProfileMetadata" - }, - "NapLogProfileMetadata": { - "type": "object", - "required": [ - "name", - "object_id" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the NGINX App Protect log profile." - }, - "object_id": { - "$ref": "#/components/schemas/NapLogProfileObjectID" - }, - "description": { - "description": "Optional field to describe the NGINX App Protect log profile.", - "type": "string", - "minLength": 5, - "maxLength": 256 - } - } - }, - "NapGlobalSettingsListResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/PaginationResponse" - }, - { - "type": "object", - "required": [ - "items" - ], - "properties": { - "items": { - "description": "An array of NGINX App Protect global settings.", - "type": "array", - "items": { - "$ref": "#/components/schemas/NapGlobalSettingsMetadata" - } - } - } - } - ] - }, - "NapGlobalSettingsResponse": { - "$ref": "#/components/schemas/NapGlobalSettingsMetadata" - }, - "NapGlobalSettingsMetadata": { - "type": "object", - "required": [ - "name", - "object_id" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the NGINX App Protect global settings object." - }, - "description": { - "description": "Optional field to describe the NGINX App Protect global setting object.", - "type": "string", - "minLength": 5, - "maxLength": 256 - }, - "object_id": { - "$ref": "#/components/schemas/NapGlobalSettingsObjectID" - } - } - }, - "NapPolicyObjectID": { - "description": "A globally unique identifier for the App Protect policy.", - "type": "string", - "format": "object_id", - "pattern": "^pol_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "NapPolicyVersionObjectID": { - "description": "A globally unique identifier for the App Protect policy version.", - "type": "string", - "format": "object_id", - "pattern": "^pv_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "NapLogProfileObjectID": { - "description": "A globally unique identifier for the App Protect log profile.", - "type": "string", - "format": "object_id", - "pattern": "^lp_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "NapGlobalSettingsObjectID": { - "description": "A globally unique identifier for the App Protect global settings object.", - "type": "string", - "format": "object_id", - "pattern": "^gs_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "CloudIdentity": { - "type": "object", - "minProperties": 1, - "maxProperties": 1, - "properties": { - "google_identity": { - "$ref": "#/components/schemas/GoogleIdentity" - } - } - }, - "GoogleIdentity": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "minLength": 1, - "maxLength": 256, - "example": "253092013665251357076" - } - } - }, - "CloudUserCreateRequest": { - "type": "object", - "description": "Request structure for creating a new cloud user.", - "required": [ - "cloud_identity" - ], - "properties": { - "cloud_identity": { - "$ref": "#/components/schemas/CloudIdentity" - } - } - }, - "CloudAccountObjectID": { - "description": "A globally unique identifier for the cloud account.", - "type": "string", - "format": "object_id", - "pattern": "^acc_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "CloudUserObjectID": { - "description": "A globally unique identifier for the cloud user.", - "type": "string", - "format": "object_id", - "pattern": "^usr_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "CloudUser": { - "type": "object", - "required": [ - "object_id", - "cloud_identity" - ], - "properties": { - "object_id": { - "$ref": "#/components/schemas/CloudUserObjectID" - }, - "cloud_identity": { - "$ref": "#/components/schemas/CloudIdentity" - } - } - }, - "AuthGoogleCallbackResponse": { - "type": "object", - "required": [ - "access_token" - ], - "properties": { - "access_token": { - "type": "string", - "description": "The signed access token to be used to authenticate API requests. This token should be treated as a \"secret\".\n" - } - } - }, - "SignupWithGoogleRequest": { - "required": [ - "account_id", - "google_user_id" - ], - "properties": { - "account_id": { - "type": "string", - "description": "Google marketplace account id" - }, - "google_user_id": { - "type": "string", - "description": "Google user identity of the user completing signup." - } - } - }, - "SignupWithGoogleResponse": { - "type": "object", - "required": [ - "account_id", - "user_id" - ], - "properties": { - "account_id": { - "$ref": "#/components/schemas/CloudAccountObjectID" - }, - "user_id": { - "$ref": "#/components/schemas/CloudUserObjectID" - } - } - }, - "DeploymentObjectID": { - "type": "string", - "description": "A globally unique identifier for the deployment.", - "format": "object_id", - "pattern": "^depl_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "DeploymentAccountID": { - "type": "string", - "description": "Account ID of deployment.", - "format": "object_id", - "pattern": "^acc_.*", - "x-go-type": "objects.ID", - "x-go-type-import": { - "name": "objects", - "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" - } - }, - "DeploymentName": { - "type": "string", - "description": "Name of deployment.", - "minLength": 3, - "maxLength": 30, - "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" - }, - "DeploymentDescription": { - "type": "string", - "description": "Description of deployment.", - "maxLength": 256 - }, - "DeploymentCloudName": { - "type": "string", - "description": "Name of the cloud where deployment resources are provisioned.", - "enum": [ - "google" - ] - }, - "DeploymentCloudInfo": { - "type": "object", - "description": "Cloud-specific deployment info.", - "oneOf": [ - { - "$ref": "#/components/schemas/GoogleDeploymentInfo" + }, + "example": { + "items": [ + { + "name": "test-log-profile" + }, + { + "object_id": "lp_-uvR3F2TQGm18jnl7bpaGw" + } + ] + } } ] }, - "GoogleDeploymentInfo": { - "type": "object", - "description": "Google deployment info.", - "required": [ - "region", - "network_attachment" - ], - "properties": { - "region": { - "$ref": "#/components/schemas/GoogleRegion" - }, - "network_attachment": { - "$ref": "#/components/schemas/GoogleNetworkAttachment" - }, - "service_attachment": { - "$ref": "#/components/schemas/GoogleServiceAttachment" - } - } - }, - "GoogleResourceName": { - "type": "string", - "minLength": 1, - "maxLength": 63, - "pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?" - }, - "GoogleRegion": { - "description": "Google region.", - "$ref": "#/components/schemas/GoogleResourceName" - }, - "GoogleNetworkAttachment": { - "type": "string", - "description": "Google network attachment.", - "pattern": "projects/[a-z]([-a-z0-9]*[a-z0-9])?/regions/[a-z]([-a-z0-9]*[a-z0-9])?/networkAttachments/[a-z]([-a-z0-9]*[a-z0-9])?" - }, - "GoogleServiceAttachment": { - "type": "string", - "description": "Google service attachment.", - "pattern": "projects/[a-z]([-a-z0-9]*[a-z0-9])?/regions/[a-z]([-a-z0-9]*[a-z0-9])?/serviceAttachments/[a-z]([-a-z0-9]*[a-z0-9])?" + "NapLogProfileResponse": { + "$ref": "#/components/schemas/NapLogProfileMetadata" }, - "Deployment": { + "NapLogProfileMetadata": { "type": "object", - "description": "Deployment specification.", "required": [ - "id", - "account_id", "name", - "description", - "cloud", - "cloud_info", - "status", - "created_at", - "modified_at" + "object_id" ], "properties": { - "id": { - "$ref": "#/components/schemas/DeploymentObjectID" - }, - "account_id": { - "$ref": "#/components/schemas/DeploymentAccountID" - }, "name": { - "$ref": "#/components/schemas/DeploymentName" - }, - "description": { - "$ref": "#/components/schemas/DeploymentDescription" - }, - "cloud": { - "$ref": "#/components/schemas/DeploymentCloudName" - }, - "cloud_info": { - "$ref": "#/components/schemas/DeploymentCloudInfo" - }, - "status": { - "$ref": "#/components/schemas/DeploymentStatus" - }, - "created_at": { "type": "string", - "description": "Datetime when request to create deployment was received.", - "format": "date-time" + "description": "The name of the NGINX App Protect log profile." }, - "modified_at": { - "type": "string", - "description": "Datetime when deployment was last modified.", - "format": "date-time" + "object_id": { + "$ref": "#/components/schemas/NapLogProfileObjectID" }, - "deleted_at": { + "description": { + "description": "Optional field to describe the NGINX App Protect log profile.", "type": "string", - "description": "Datetime when request to delete deployment was received.", - "format": "date-time" + "minLength": 5, + "maxLength": 256 } } }, - "DeploymentStatus": { - "type": "object", - "description": "Deployment status info.", - "required": [ - "provisioning_state" - ], - "properties": { - "provisioning_state": { - "$ref": "#/components/schemas/DeploymentProvisioningState" + "NapGlobalSettingsListResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginationResponse" + }, + { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "An array of NGINX App Protect global settings.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NapGlobalSettingsMetadata" + } + } + }, + "example": { + "items": [ + { + "name": "test-global-settings" + }, + { + "object_id": "gs_-uvR3F2TQGm18jnl7bpaGw" + } + ] + } } - } + ] + }, + "NapGlobalSettingsResponse": { + "$ref": "#/components/schemas/NapGlobalSettingsMetadata" }, - "DeploymentProvisioningState": { + "NapGlobalSettingsMetadata": { "type": "object", - "description": "Deployment provisioning state info.", "required": [ - "state", - "modified_at" + "name", + "object_id" ], "properties": { - "state": { + "name": { "type": "string", - "description": "Provisioning state name/value.", - "enum": [ - "deleting", - "failed", - "pending", - "ready" - ] + "description": "The name of the NGINX App Protect global settings object." }, - "details": { + "description": { + "description": "Optional field to describe the NGINX App Protect global setting object.", "type": "string", - "description": "Provisioning state details.", + "minLength": 5, "maxLength": 256 }, - "modified_at": { - "type": "string", - "description": "Datetime of last state change.", - "format": "date-time" + "object_id": { + "$ref": "#/components/schemas/NapGlobalSettingsObjectID" } } }, - "DeploymentListResponse": { - "type": "object", - "description": "List of deployments.", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Deployment" - } - } + "NapPolicyObjectID": { + "description": "A globally unique identifier for the App Protect policy.", + "type": "string", + "format": "object_id", + "pattern": "^pol_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" } }, - "DeploymentCreateRequest": { - "type": "object", - "description": "Request spec for creating a deployment.", - "required": [ - "name", - "cloud", - "cloud_info" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/DeploymentName" - }, - "description": { - "$ref": "#/components/schemas/DeploymentDescription" - }, - "cloud": { - "$ref": "#/components/schemas/DeploymentCloudName" - }, - "cloud_info": { - "$ref": "#/components/schemas/DeploymentCloudInfo" - } + "NapPolicyVersionObjectID": { + "description": "A globally unique identifier for the App Protect policy version.", + "type": "string", + "format": "object_id", + "pattern": "^pv_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" } }, - "DeploymentUpdateRequest": { - "type": "object", - "description": "Request spec for updating a deployment.", - "properties": { - "name": { - "$ref": "#/components/schemas/DeploymentName" - }, - "description": { - "$ref": "#/components/schemas/DeploymentDescription" - } + "NapLogProfileObjectID": { + "description": "A globally unique identifier for the App Protect log profile.", + "type": "string", + "format": "object_id", + "pattern": "^lp_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" + } + }, + "NapGlobalSettingsObjectID": { + "description": "A globally unique identifier for the App Protect global settings object.", + "type": "string", + "format": "object_id", + "pattern": "^gs_.*", + "x-go-type": "objects.ID", + "x-go-type-import": { + "name": "objects", + "path": "gitlab.com/f5/nginx/one/saas/control-plane/pkg/collections/objects" } } }, @@ -9691,172 +8953,6 @@ "object_id": "key_wN3IhLCmR3qmwybG_6ptEg", "instances_count": 3 } - }, - "CloudUserResponse": { - "value": { - "cloud_identity": { - "google_identity": { - "id": "253092013665251357076" - } - } - } - }, - "DeploymentListResponse": { - "value": { - "items": [ - { - "id": "depl_6zYc64JKR0uxnoEcLH1gGA", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "tst-foo", - "description": "", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", - "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" - }, - "status": { - "provisioning_state": { - "state": "ready", - "details": "", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "created_at": "2025-03-31T10:00:00Z", - "modified_at": "2025-03-31T10:05:00Z" - }, - { - "id": "depl_DrRnpntTRpGOxaroQ6aOFg", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "tst-bar", - "description": "test w/ network attachment from project bar", - "cloud": "google", - "cloud_info": { - "region": "eu-west-1", - "network_attachment": "projects/bar/regions/us-east-1/networkAttachments/bar" - }, - "status": { - "provisioning_state": { - "state": "failed", - "details": "network attachment 'bar' not found", - "modified_at": "2025-03-31T11:03:00Z" - } - }, - "created_at": "2025-03-31T11:00:00Z", - "modified_at": "2025-03-31T11:03:00Z" - } - ] - } - }, - "DeploymentCreateRequest": { - "value": { - "name": "tst-foo", - "description": "", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo" - } - } - }, - "DeploymentCreateResponse": { - "value": { - "id": "depl_6zYc64JKR0uxnoEcLH1gGA", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "tst-foo", - "description": "", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", - "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" - }, - "status": { - "provisioning_state": { - "state": "pending", - "details": "", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "created_at": "2025-03-31T10:00:00Z", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "DeploymentGetResponse": { - "value": { - "id": "depl_6zYc64JKR0uxnoEcLH1gGA", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "tst-foo", - "description": "", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", - "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" - }, - "status": { - "provisioning_state": { - "state": "ready", - "details": "", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "created_at": "2025-03-31T10:00:00Z", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "DeploymentUpdateRequest": { - "value": { - "name": "poc-foo", - "description": "test deployment for project foo" - } - }, - "DeploymentUpdateResponse": { - "value": { - "id": "depl_6zYc64JKR0uxnoEcLH1gGA", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "poc-foo", - "description": "test deployment for project foo", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", - "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" - }, - "status": { - "provisioning_state": { - "state": "ready", - "details": "", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "created_at": "2025-03-31T10:00:00Z", - "modified_at": "2025-03-31T10:05:00Z" - } - }, - "DeploymentDeleteResponse": { - "value": { - "id": "depl_6zYc64JKR0uxnoEcLH1gGA", - "account_id": "acc_FsFgfeDtScOjGbQJDaVNiQ", - "name": "poc-foo", - "description": "test deployment for project foo", - "cloud": "google", - "cloud_info": { - "region": "us-east-1", - "network_attachment": "projects/foo/regions/us-east-1/networkAttachments/foo", - "service_attachment": "projects/foo/regions/us-east-1/serviceAttachments/foo" - }, - "status": { - "provisioning_state": { - "state": "deleting", - "details": "", - "modified_at": "2025-03-31T10:15:00Z" - } - }, - "created_at": "2025-03-31T10:00:00Z", - "modified_at": "2025-03-31T10:05:00Z", - "deleted_at": "2025-03-31T10:15:00Z" - } } }, "responses": { @@ -9879,36 +8975,6 @@ } } } - }, - "Unauthorized": { - "description": "Client is not authorized to perform the requested operation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "NotFound": { - "description": "Requested resource was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "Conflict": { - "description": "Requested operation cannot be performed at this time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } }, "securitySchemes": { @@ -9948,20 +9014,6 @@ "tags": [ "Settings" ] - }, - { - "name": "TODO", - "tags": [ - "Authorization", - "Signup", - "User" - ] - }, - { - "name": "Manage NAAS deployments", - "tags": [ - "Deployments" - ] } ] } \ No newline at end of file