{"openapi":"3.0.1","info":{"title":"API7 Enterprise Admin APIs","description":"API7 Enterprise Admin APIs are RESTful APIs that allow you to create and manage API7 resources. ","version":"3.8.24"},"servers":[],"security":[{"APIKeyAuth":[]},{"BasicAuth":[]}],"paths":{"/apisix/admin/services":{"post":{"tags":["Published Service"],"summary":"Create a published service on a gateway group","operationId":"createPublishedService","description":"IAM Action: `gateway:CreatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/*`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"oneOf":[{"title":"HTTP","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["http"]},"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]}}}]},{"title":"Stream","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Type of service. `stream` corresponds to L4 service.","enum":["stream"]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}}}]}]},{"type":"object","properties":{"status":{"default":1,"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Published Service"],"summary":"List all published services on a gateway group","operationId":"listPublishedServices","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","description":"Index to order the services by.","in":"query","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","last_published","name"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"unhealthy_nodes","description":"Filter of services based on whether unhealthy nodes exist. `unhealthy_nodes_exists` filters for services where unhealthy nodes exist. `no_unhealthy_nodes` filters for servies where there are no unhealthy nodes.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["unhealthy_nodes_exists","no_unhealthy_nodes"]}}},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"hosts","in":"query","schema":{"type":"array","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}},{"name":"type","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["http","stream"]}}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of services.","items":{"allOf":[{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer","minimum":0}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/services/{service_id}":{"get":{"tags":["Published Service"],"summary":"Get a published service on a gateway group","operationId":"getPublishedService","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Published Service"],"summary":"Update a published service without publishing","operationId":"putPublishedService","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"oneOf":[{"title":"HTTP","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["http"]},"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]}}}]},{"title":"Stream","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Type of service. `stream` corresponds to L4 service.","enum":["stream"]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}}}]}]},{"type":"object","properties":{"status":{"default":1,"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Published Service"],"summary":"Patch a published service on a gateway group","operationId":"patchPublishedService","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Published Service"],"summary":"Delete a published service on a gateway group","operationId":"deletePublishedService","description":"IAM Action: `gateway:DeletePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/services/{service_id}/upstreams":{"post":{"tags":["Published Service"],"summary":"Create a upstream in a published service on a gateway group","operationId":"createPublishedServiceUpstream","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The upstream model.","allOf":[{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"apisix_service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Published Service"],"summary":"List all upstreams in a published service on a gateway group","operationId":"listPublishedServiceUpstreams","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"order_by","in":"query","schema":{"type":"string","default":"created_at","enum":["created_at"]}},{"name":"direction","in":"query","schema":{"type":"string","default":"asc","enum":["asc"]},"description":"Order to list the routes by. The sorting index follows the configuration of `order_by`."},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of services.","items":{"description":"The upstream model.","allOf":[{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"apisix_service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/services/{service_id}/upstreams/{upstream_id}":{"get":{"tags":["Published Service"],"summary":"Get a upstream in a published service on a gateway group","operationId":"getPublishedServiceUpstream","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"upstream_id","description":"The unique identifier of the upstream.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The upstream model.","allOf":[{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"apisix_service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Published Service"],"summary":"Update a upstream in a published service on a gateway group","operationId":"putPublishedServiceUpstream","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"upstream_id","description":"The unique identifier of the upstream.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The upstream model.","allOf":[{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"apisix_service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Published Service"],"summary":"Patch a upstream in a published service on a gateway group","operationId":"patchPublishedServiceUpstream","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"upstream_id","description":"The unique identifier of the upstream.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The upstream model.","allOf":[{"oneOf":[{"title":"HTTP Upstream","description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},{"title":"Stream Upstream","description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"apisix_service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Published Service"],"summary":"Delete a upstream in a published service on a gateway group","operationId":"deletePublishedServiceUpstream","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"upstream_id","description":"The unique identifier of the upstream.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/template":{"post":{"tags":["Service Template"],"summary":"Create a service template","operationId":"createServiceTemplate","description":"IAM Action: `gateway:CreateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/*`","requestBody":{"content":{"application/json":{"schema":{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Service Template"],"summary":"Get all service templates","operationId":"listServiceTemplates","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","description":"Index to order the services by.","in":"query","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","last_published","name"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"last_publish_start_at","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"last_publish_end_at","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"type","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","in":"query","required":false,"schema":{"type":"string","enum":["http","stream"],"example":"http"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of services.","items":{"allOf":[{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer","minimum":0}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/template/{service_template_id}":{"get":{"tags":["Service Template"],"summary":"Get a service template by ID","operationId":"getServiceTemplate","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Service Template"],"summary":"Update a service template by ID","operationId":"putServiceTemplate","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Service Template"],"summary":"Patch a service template by ID","operationId":"patchServiceTemplate","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"in":"query","name":"dry-run","schema":{"type":"string","enum":["all"]},"description":"When specified, run the operation in dry-run mode."}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Service Template"],"summary":"Delete a service template","operationId":"deleteServiceTemplate","description":"IAM Action: `gateway:DeleteServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/template/{service_template_id}/oas":{"get":{"tags":["Service Template"],"summary":"Get the OpenAPI Specification of a service template","operationId":"getServiceTemplateOAS","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"},"api_count":{"type":"integer","description":"The number of APIs in the service.","example":10},"api_desc":{"type":"string","description":"The description of the OAS.","example":"OAS description."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Service Template"],"summary":"Update the OpenAPI Specification of a service template","operationId":"putServiceTemplateOAS","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"},"api_count":{"type":"integer","description":"The number of APIs in the service.","example":10},"api_desc":{"type":"string","description":"The description of the OAS.","example":"OAS description."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/secret_providers":{"get":{"tags":["Secret Provider"],"summary":"List all secret providers on a gateway group","operationId":"listSecretProviders","description":"IAM Action: `gateway:GetSecretProvider`, Resource: `arn:api7:gateway:gatewaygroup/%s/secret_provider/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Get all secrets.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of Secrets.","items":{"description":"secret with management fields","allOf":[{"allOf":[{"oneOf":[{"title":"Vault","description":"HashiCorp Vault configurations when Vault is the secret provider.","type":"object","required":["uri","prefix","token"],"properties":{"uri":{"description":"Vault endpoint.","example":"http://10.42.17.8:8200","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"prefix":{"type":"string","description":"Vault prefix to access secrets.","example":"kv/apisix"},"token":{"type":"string","description":"Vault token.","example":"apisix-quickstart-vault-token"},"namespace":{"type":"string","description":"Vault namespace.","example":"apisix"},"kv_version":{"type":"string","description":"Vault KV secrets engine version.","enum":["kv-v1"],"default":"kv-v1"},"authentication_method":{"type":"string","description":"Authentication method.","enum":["token"],"default":"token"}}},{"title":"AWS Secret","description":"AWS Secret configurations when AWS Secret is the secret provider.","type":"object","required":["access_key_id","secret_access_key"],"properties":{"access_key_id":{"description":"AWS access key ID.","type":"string"},"secret_access_key":{"description":"AWS secret access key.","type":"string"},"session_token":{"description":"AWS session token.","type":"string"},"region":{"type":"string","description":"AWS region.","default":"us-east-1"},"endpoint_url":{"description":"AWS endpoint.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"}}},{"type":"object","description":"Kubernetes Secret configurations when Kubernetes Secret is the secret provider.","properties":{"apiserver_addr":{"description":"Kubernetes API server Address.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"token":{"description":"Service account token for Kubernetes API authentication","type":"string","minLength":1},"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","minLength":1}},"oneOf":[{"title":"Kubernetes Secret (Token)","required":["apiserver_addr","token"]},{"title":"Kubernetes Secret (Token File)","required":["apiserver_addr","token_file"]}]}]},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]},{"type":"object","properties":{"id":{"description":"Secret ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"secret_provider":{"type":"string","description":"Type of secret manager.","enum":["vault","aws","kubernetes"],"example":"vault"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/secret_providers/{secret_provider}/{secret_provider_id}":{"get":{"tags":["Secret Provider"],"summary":"Get a secret provider on a gateway group","operationId":"getSecretProvider","description":"IAM Action: `gateway:GetSecretProvider`, Resource: `arn:api7:gateway:gatewaygroup/%s/secret_provider/%s`","parameters":[{"name":"secret_provider","description":"Secret provider.","in":"path","required":true,"schema":{"type":"string","enum":["vault","aws","kubernetes"]}},{"name":"secret_provider_id","description":"Secret provider ID.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Get a secret by ID.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"secret with management fields","allOf":[{"allOf":[{"oneOf":[{"title":"Vault","description":"HashiCorp Vault configurations when Vault is the secret provider.","type":"object","required":["uri","prefix","token"],"properties":{"uri":{"description":"Vault endpoint.","example":"http://10.42.17.8:8200","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"prefix":{"type":"string","description":"Vault prefix to access secrets.","example":"kv/apisix"},"token":{"type":"string","description":"Vault token.","example":"apisix-quickstart-vault-token"},"namespace":{"type":"string","description":"Vault namespace.","example":"apisix"},"kv_version":{"type":"string","description":"Vault KV secrets engine version.","enum":["kv-v1"],"default":"kv-v1"},"authentication_method":{"type":"string","description":"Authentication method.","enum":["token"],"default":"token"}}},{"title":"AWS Secret","description":"AWS Secret configurations when AWS Secret is the secret provider.","type":"object","required":["access_key_id","secret_access_key"],"properties":{"access_key_id":{"description":"AWS access key ID.","type":"string"},"secret_access_key":{"description":"AWS secret access key.","type":"string"},"session_token":{"description":"AWS session token.","type":"string"},"region":{"type":"string","description":"AWS region.","default":"us-east-1"},"endpoint_url":{"description":"AWS endpoint.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"}}},{"type":"object","description":"Kubernetes Secret configurations when Kubernetes Secret is the secret provider.","properties":{"apiserver_addr":{"description":"Kubernetes API server Address.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"token":{"description":"Service account token for Kubernetes API authentication","type":"string","minLength":1},"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","minLength":1}},"oneOf":[{"title":"Kubernetes Secret (Token)","required":["apiserver_addr","token"]},{"title":"Kubernetes Secret (Token File)","required":["apiserver_addr","token_file"]}]}]},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]},{"type":"object","properties":{"id":{"description":"Secret ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"secret_provider":{"type":"string","description":"Type of secret manager.","enum":["vault","aws","kubernetes"],"example":"vault"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Secret Provider"],"summary":"Delete a secret provider on a gateway group","operationId":"deleteSecretProvider","description":"IAM Action: `gateway:DeleteSecretProvider`, Resource: `arn:api7:gateway:gatewaygroup/%s/secret_provider/%s`","parameters":[{"name":"secret_provider","description":"Secret provider.","in":"path","required":true,"schema":{"type":"string","enum":["vault","aws","kubernetes"]}},{"name":"secret_provider_id","description":"Secret provider ID.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Secret Provider"],"summary":"Update a secret provider on a gateway group","operationId":"putSecretProvider","description":"IAM Action: `gateway:PutSecretProvider`, Resource: `arn:api7:gateway:gatewaygroup/%s/secret_provider/%s`","parameters":[{"name":"secret_provider","description":"Secret provider.","in":"path","required":true,"schema":{"type":"string","enum":["vault","aws","kubernetes"]}},{"name":"secret_provider_id","description":"Secret provider ID.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"oneOf":[{"title":"Vault","description":"HashiCorp Vault configurations when Vault is the secret provider.","type":"object","required":["uri","prefix","token"],"properties":{"uri":{"description":"Vault endpoint.","example":"http://10.42.17.8:8200","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"prefix":{"type":"string","description":"Vault prefix to access secrets.","example":"kv/apisix"},"token":{"type":"string","description":"Vault token.","example":"apisix-quickstart-vault-token"},"namespace":{"type":"string","description":"Vault namespace.","example":"apisix"},"kv_version":{"type":"string","description":"Vault KV secrets engine version.","enum":["kv-v1"],"default":"kv-v1"},"authentication_method":{"type":"string","description":"Authentication method.","enum":["token"],"default":"token"}}},{"title":"AWS Secret","description":"AWS Secret configurations when AWS Secret is the secret provider.","type":"object","required":["access_key_id","secret_access_key"],"properties":{"access_key_id":{"description":"AWS access key ID.","type":"string"},"secret_access_key":{"description":"AWS secret access key.","type":"string"},"session_token":{"description":"AWS session token.","type":"string"},"region":{"type":"string","description":"AWS region.","default":"us-east-1"},"endpoint_url":{"description":"AWS endpoint.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"}}},{"type":"object","description":"Kubernetes Secret configurations when Kubernetes Secret is the secret provider.","properties":{"apiserver_addr":{"description":"Kubernetes API server Address.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"token":{"description":"Service account token for Kubernetes API authentication","type":"string","minLength":1},"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","minLength":1}},"oneOf":[{"title":"Kubernetes Secret (Token)","required":["apiserver_addr","token"]},{"title":"Kubernetes Secret (Token File)","required":["apiserver_addr","token_file"]}]}]},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]}}}},"responses":{"200":{"description":"Update a secret by ID.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"secret with management fields","allOf":[{"allOf":[{"oneOf":[{"title":"Vault","description":"HashiCorp Vault configurations when Vault is the secret provider.","type":"object","required":["uri","prefix","token"],"properties":{"uri":{"description":"Vault endpoint.","example":"http://10.42.17.8:8200","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"prefix":{"type":"string","description":"Vault prefix to access secrets.","example":"kv/apisix"},"token":{"type":"string","description":"Vault token.","example":"apisix-quickstart-vault-token"},"namespace":{"type":"string","description":"Vault namespace.","example":"apisix"},"kv_version":{"type":"string","description":"Vault KV secrets engine version.","enum":["kv-v1"],"default":"kv-v1"},"authentication_method":{"type":"string","description":"Authentication method.","enum":["token"],"default":"token"}}},{"title":"AWS Secret","description":"AWS Secret configurations when AWS Secret is the secret provider.","type":"object","required":["access_key_id","secret_access_key"],"properties":{"access_key_id":{"description":"AWS access key ID.","type":"string"},"secret_access_key":{"description":"AWS secret access key.","type":"string"},"session_token":{"description":"AWS session token.","type":"string"},"region":{"type":"string","description":"AWS region.","default":"us-east-1"},"endpoint_url":{"description":"AWS endpoint.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"}}},{"type":"object","description":"Kubernetes Secret configurations when Kubernetes Secret is the secret provider.","properties":{"apiserver_addr":{"description":"Kubernetes API server Address.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"token":{"description":"Service account token for Kubernetes API authentication","type":"string","minLength":1},"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","minLength":1}},"oneOf":[{"title":"Kubernetes Secret (Token)","required":["apiserver_addr","token"]},{"title":"Kubernetes Secret (Token File)","required":["apiserver_addr","token_file"]}]}]},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]},{"type":"object","properties":{"id":{"description":"Secret ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"secret_provider":{"type":"string","description":"Type of secret manager.","enum":["vault","aws","kubernetes"],"example":"vault"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/protos":{"get":{"tags":["Proto"],"summary":"List all protos on a gateway group","operationId":"listProtos","description":"IAM Action: `gateway:GetProto`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of protos.","items":{"description":"The proto with management fields.","allOf":[{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"post":{"tags":["Proto"],"summary":"Create a proto on a gateway group","operationId":"createProto","description":"IAM Action: `gateway:CreateProto`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The proto with management fields.","allOf":[{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/protos/{proto_id}":{"get":{"tags":["Proto"],"summary":"Get a proto on a gateway group","operationId":"getProto","description":"IAM Action: `gateway:GetProto`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"proto_id","description":"The unique identifier of the proto.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The proto with management fields.","allOf":[{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Proto"],"summary":"Update a proto on a gateway group","operationId":"putProto","description":"IAM Action: `gateway:UpdateProto`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"proto_id","description":"The unique identifier of the proto.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The proto with management fields.","allOf":[{"description":"The proto description.","type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The protobuf content.","minLength":1,"maxLength":1048576,"example":"syntax = \"proto3\";\n\nmessage Person {\n  string name = 1;\n  int32 id = 2;\n  string email = 3;\n}\n"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Proto"],"summary":"Delete a proto on a gateway group","operationId":"deleteProto","description":"IAM Action: `gateway:DeleteProto`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"proto_id","description":"The unique identifier of the proto.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/export/services/template":{"post":{"tags":["Service Template"],"summary":"Generate an OpenAPI specification from service templates","operationId":"generateOpenAPISpec","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"scope","description":"Scope of the service.","in":"query","schema":{"type":"string","enum":["partial","all"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["info"],"properties":{"service_ids":{"type":"array","description":"The service ID list.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"info":{"type":"object","description":"API metadata.","properties":{"title":{"type":"string","description":"Title of the exported API definition.","example":"Swagger Petstore"},"version":{"type":"string","description":"Version of the exported API definition.","example":"3.0.1"},"description":{"type":"string","description":"Description of the exported API definition.","example":"API description."}},"required":["title","version"]},"servers":{"type":"array","description":"An array of one or more base servers in the exported API definition.","items":{"type":"object","properties":{"url":{"type":"string","description":"Server URL.","example":"http://localhost:8080"},"description":{"type":"string","description":"Server description.","example":"Localhost test server."}}}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"openapi":{"type":"string","description":"The OpenAPI version.","default":"3.0.1"},"info":{"type":"object","description":"API metadata.","properties":{"title":{"type":"string","description":"Title of the exported API definition.","example":"Swagger Petstore"},"version":{"type":"string","description":"Version of the exported API definition.","example":"3.0.1"},"description":{"type":"string","description":"Description of the exported API definition.","example":"API description."}},"required":["title","version"]},"servers":{"type":"array","description":"An array of one or more base servers in the exported API definition.","items":{"type":"object","properties":{"url":{"type":"string","description":"Server URL.","example":"http://localhost:8080"},"description":{"type":"string","description":"Server description.","example":"Localhost test server."}}}},"paths":{"type":"object","description":"Endpoint paths and their operations.","example":{"/anything":{"delete":{"responses":{"default":{"description":""}},"tags":["httpbin"]},"get":{"responses":{"default":{"description":""}},"tags":["httpbin"]},"patch":{"responses":{"default":{"description":""}},"tags":["httpbin"]},"post":{"responses":{"default":{"description":""}},"tags":["httpbin"]},"put":{"responses":{"default":{"description":""}},"tags":["httpbin"]},"trace":{"responses":{"default":{"description":""}},"tags":["httpbin"]}}},"additionalProperties":{"type":"object","properties":{"get":{"type":"object","properties":{"responses":{"type":"object"}}},"put":{"type":"object","properties":{"responses":{"type":"object"}}},"post":{"type":"object","properties":{"responses":{"type":"object"}}},"delete":{"type":"object","properties":{"responses":{"type":"object"}}},"options":{"type":"object","properties":{"responses":{"type":"object"}}},"head":{"type":"object","properties":{"responses":{"type":"object"}}},"patch":{"type":"object","properties":{"responses":{"type":"object"}}}}}}},"required":["openapi","info","paths"]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/import/services/template":{"post":{"tags":["Service Template"],"summary":"Import service template based on OpenAPI Specification","operationId":"importServiceTemplateOpenAPISpec","description":"IAM Action: `gateway:CreateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/*`","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","enum":["http"],"default":"http","description":"Type of service."}}},{"type":"object","properties":{"routes":{"type":"array","minItems":1,"uniqueItems":true,"description":"Route configurations.","items":{"description":"The route description.","type":"object","required":["name","paths"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}}}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The service with management fields.","allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"last_published":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"published_gateway_groups_count":{"type":"integer"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"routes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/import/services":{"post":{"tags":["Published Service"],"summary":"Import services based on OpenAPI Specification","operationId":"importServiceOpenAPISpec","description":"IAM Action: `gateway:CreatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/*`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","enum":["http"],"default":"http","description":"Type of service."}}},{"type":"object","properties":{"routes":{"type":"array","minItems":1,"uniqueItems":true,"description":"Route configurations.","items":{"description":"The route description.","type":"object","required":["name","paths"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}}}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"unhealthy_nodes_count":{"type":"integer","description":"Unhealthy nodes count.","example":0},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/openapi/convert":{"put":{"tags":["Service Template","Published Service"],"summary":"Convert OpenAPI Specification to service and route resources","description":"Convert a given OpenAPI Specification to service and route resources without creating these resources.","operationId":"convertOpenAPISpec","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["raw_openapi"],"properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI content.","example":"Raw OpenAPI spec"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The service description.","type":"object","required":["name"],"minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"routes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/license":{"get":{"tags":["License"],"summary":"Get API7 Enterprise license details","operationId":"getLicense","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The license object.","allOf":[{"type":"object","properties":{"customer":{"type":"string","description":"The customer name.","example":"API7"},"effective_at":{"type":"integer","format":"int64","description":"The timestamp when the license becomes effective.","example":1654012800},"expired_at":{"type":"integer","format":"int64","description":"The timestamp when the license expires.","example":1717171200},"max_dp_cores":{"type":"integer","description":"The maximum number of DP cores.","example":100},"feature_list":{"type":"array","description":"An array of licensed features.","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["API7 Gateway","API7 Portal"]}},"deployment_id":{"type":"string","description":"A unique identifier that is automatically generated with each deployment of API7 Enterprise.","example":"d1e1ea2b-2cff-4c38-b57e-408e1dffec52"},"free_trial":{"type":"boolean","description":"If true, the license is for free trial only."},"is_test_env":{"type":"boolean","description":"If true, license is for test environment."},"issuance_date":{"type":"integer","format":"int64","description":"The license issuance timestamp.","example":1625769798}}},{"type":"object","properties":{"runtime":{"type":"object","properties":{"status":{"type":"string","default":"normal","example":"dp_core_exceeded","enum":["normal","dp_core_exceeded","dp_core_exceeded_restricted"],"description":"The license runtime status, which can be either normal or dp_core_exceeded or dp_core_exceeded_restricted."},"dp_core_exceeded_start_at":{"type":"integer","format":"int64","description":"The start time when the number of DP cores exceeds the maximum number of DP cores of the license (buffering state).","example":1654012700},"dp_core_exceeded_end_at":{"type":"integer","format":"int64","description":"The end time when the number of DP cores exceeds the maximum number of DP cores of the license (buffering state). In this case, API usage will be restricted.","example":1654012750},"max_dp_cores":{"type":"integer","format":"int64","description":"The highest number of cores during the buffering period, which is 0 in normal conditions.","example":100}}}}},{"type":"object","properties":{"status":{"type":"string","enum":["normal","expired"],"description":"The license status, which can be either normal or expired."}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["License"],"summary":"Import or update the API7 Enterprise license","operationId":"updateLicense","description":"IAM Action: `iam:UpdateLicense`, Resource: `arn:api7:iam:organization/*`","parameters":[{"in":"query","name":"dry-run","schema":{"type":"string","enum":["all"]},"description":"When specified, run the operation in dry-run mode."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"Encoded license data.","example":"“xxxx1N-tNaTpttX-NjOdXjyg\""}},"required":["data"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The license object.","type":"object","properties":{"customer":{"type":"string","description":"The customer name.","example":"API7"},"effective_at":{"type":"integer","format":"int64","description":"The timestamp when the license becomes effective.","example":1654012800},"expired_at":{"type":"integer","format":"int64","description":"The timestamp when the license expires.","example":1717171200},"max_dp_cores":{"type":"integer","description":"The maximum number of DP cores.","example":100},"feature_list":{"type":"array","description":"An array of licensed features.","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["API7 Gateway","API7 Portal"]}},"deployment_id":{"type":"string","description":"A unique identifier that is automatically generated with each deployment of API7 Enterprise.","example":"d1e1ea2b-2cff-4c38-b57e-408e1dffec52"},"free_trial":{"type":"boolean","description":"If true, the license is for free trial only."},"is_test_env":{"type":"boolean","description":"If true, license is for test environment."},"issuance_date":{"type":"integer","format":"int64","description":"The license issuance timestamp.","example":1625769798}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/routes":{"post":{"tags":["Route","Published Service"],"summary":"Create a route in a published service on a gateway group","operationId":"createPublishedServiceRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The route with the service ID.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","required":["service_id"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Route","Published Service"],"summary":"List all routes in a published service","operationId":"listPublishedServiceRoutes","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"query","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of routes.","items":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/routes/{route_id}":{"get":{"tags":["Route","Published Service"],"summary":"Get a route in a published servcie on a gateway group","operationId":"getPublishedServiceRoute","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"route_id","description":"The unique identifier of the published route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Route","Published Service"],"summary":"Update a route in a published service on a gateway group","operationId":"putPublishedServiceRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"route_id","description":"The unique identifier of the published route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The route with the service ID.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","required":["service_id"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Route","Published Service"],"summary":"Patch a route in a published service on a gateway group","operationId":"patchPublishedServiceRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"route_id","description":"The unique identifier of the published route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Route","Published Service"],"summary":"Delete a route in a published service on a gateway group","operationId":"deletePublishedServiceRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"route_id","description":"The unique identifier of the published route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"401":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/routes/template":{"post":{"tags":["Service Template","Route"],"summary":"Create a route in a service template","operationId":"createServiceTemplateRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","requestBody":{"content":{"application/json":{"schema":{"description":"The route template payload.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}},"required":["service_id"]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Service Template","Route"],"summary":"Get all routes in a service template","operationId":"listServiceTemplateRoutes","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the service template.","in":"query","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of routes.","items":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/routes/template/{route_template_id}":{"get":{"tags":["Service Template","Route"],"summary":"Get a route in all service templates","operationId":"getServiceTemplateRoute","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Service Template"],"summary":"Update a route in service template","operationId":"putServiceTemplateRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The route with the optional service ID.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Service Template","Route"],"summary":"Patch a route in service template","operationId":"patchServiceTemplateRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Service Template","Route"],"summary":"Delete a route in service template","operationId":"deleteServiceTemplateRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"401":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/stream_routes":{"post":{"tags":["Stream Route","Published Service"],"summary":"Create a stream route in a published service on a gateway group","operationId":"createPublishedServiceStreamRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The stream route with the service ID.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","required":["service_id"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Stream Route","Published Service"],"summary":"List all stream routes in a published service on a gateway group","operationId":"listPublishedServiceStreamRoutes","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the published service.","in":"query","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of routes.","items":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/stream_routes/{stream_route_id}":{"get":{"tags":["Stream Route","Published Service"],"summary":"Get a stream route in a published service on a gateway group","operationId":"getPublishedServiceStreamRoute","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"stream_route_id","description":"The unique identifier of the published stream route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"with_publish_info","description":"If true, include publish information in the response, such as `apisix_route_id`, `route_version_id`, and `service_version_id`. The additional information is only useful for the Dashboard and not for API users.","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Stream Route","Published Service"],"summary":"Update a stream route in a published service on a gateway group","operationId":"putPublishedServiceStreamRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"stream_route_id","description":"The unique identifier of the published stream route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The stream route with the service ID.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","required":["service_id"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Stream Route","Published Service"],"summary":"Delete a stream route in a published service on a gateway group","operationId":"deletePublishedServiceStreamRoute","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"stream_route_id","description":"The unique identifier of the published stream route.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/stream_routes/template":{"post":{"tags":["Stream Route","Service Template"],"summary":"Create a stream route in a service template","operationId":"createServiceTemplateStreamRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","requestBody":{"content":{"application/json":{"schema":{"description":"The stream route template payload.","allOf":[{"description":"The stream route template.","type":"object","required":["name"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Stream Route","Service Template"],"summary":"List all stream routes in a service template","operationId":"listServiceTemplateStreamRoutes","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_id","description":"The unique identifier of the service template.","in":"query","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of routes.","items":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/stream_routes/template/{stream_route_template_id}":{"get":{"tags":["Stream Route","Service Template"],"summary":"Get a stream route in a service template","operationId":"getServiceTemplateStreamRoute","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Stream Route","Service Template"],"summary":"Update a stream route in a service template","operationId":"putServiceTemplateStreamRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The stream route with the optional service ID.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The stream route with management fields.","allOf":[{"description":"The stream route description.","type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Stream Route","Service Template"],"summary":"Delete a stream route in a service template","operationId":"deleteServiceTemplateStreamRoute","description":"IAM Action: `gateway:UpdateServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/ssls":{"post":{"deprecated":true,"tags":["SSL"],"summary":"Create an SSL certificate","operationId":"createSSL","description":"IAM Action: `gateway:CreateSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The SSL certificate description.","oneOf":[{"title":"Use Key and Cert","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","required":["key","cert"],"properties":{"key":{"description":"Private key content or reference to the private key content.","type":"string","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]},"cert":{"description":"Certificate content or reference to the certificate content.","type":"string","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}]},{"title":"Use Keys and Certs","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","required":["keys","certs"],"properties":{"keys":{"description":"An array of private key content or reference to the private key content.","type":"array","minItems":1,"maxItems":1,"items":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"certs":{"description":"An array of certificate content or reference to the certificate content.","type":"array","minItems":1,"maxItems":1,"items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The SSL response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}}}},"get":{"deprecated":true,"tags":["SSL"],"summary":"List all SSL certificates on a gateway group","operationId":"listSSLs","description":"IAM Action: `gateway:GetSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"type","description":"Type of certificate. `client` represents certificates used by the Gateway to access upstream, and `server` represents certificates used by the Gateway to verify client requests.","in":"query","required":false,"schema":{"default":"server","type":"string","enum":["client","server"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of SSL certificates.","items":{"description":"The SSL response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/ssls/{ssl_id}":{"get":{"deprecated":true,"tags":["SSL"],"summary":"Get an SSL certificate on a gateway group","operationId":"getSSL","description":"IAM Action: `gateway:GetSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ssl_id","description":"The unique identifier of the SSL object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The SSL response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"deprecated":true,"tags":["SSL"],"summary":"Update an SSL certificate on a gateway group","operationId":"putSSL","description":"IAM Action: `gateway:UpdateSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ssl_id","description":"The unique identifier of the SSL object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The SSL certificate description.","oneOf":[{"title":"Use Key and Cert","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","required":["key","cert"],"properties":{"key":{"description":"Private key content or reference to the private key content.","type":"string","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]},"cert":{"description":"Certificate content or reference to the certificate content.","type":"string","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}]},{"title":"Use Keys and Certs","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","required":["keys","certs"],"properties":{"keys":{"description":"An array of private key content or reference to the private key content.","type":"array","minItems":1,"maxItems":1,"items":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"certs":{"description":"An array of certificate content or reference to the certificate content.","type":"array","minItems":1,"maxItems":1,"items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The SSL response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"snis":{"type":"array","description":"The SNI list for matching the SSL certificate.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"client":{"description":"Client certificate.","type":"object","required":["ca"],"properties":{"ca":{"description":"Client CA certificate in PEM format.","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}},"type":{"type":"string","description":"Type of certificate. Only support `server` at the moment, which represents certificates used by the Gateway to verify client requests.","enum":["server"]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"deprecated":true,"tags":["SSL"],"summary":"Delete an SSL certificate on a gateway group","operationId":"deleteSSL","description":"IAM Action: `gateway:DeleteSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ssl_id","description":"The unique identifier of the SSL object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/certificates":{"post":{"tags":["Certificate"],"summary":"Create a certificate","operationId":"createCertificate","description":"IAM Action: `gateway:CreateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The certificate description.","type":"object","required":["key","cert"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}}}},"get":{"tags":["Certificate"],"summary":"List all certificates on a gateway group","operationId":"listCertificates","description":"IAM Action: `gateway:GetCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","schema":{"type":"string","default":"exptime","enum":["name","exptime"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"sni_id","in":"query","required":false,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"sni_name","description":"SNI name.","in":"query","required":false,"schema":{"type":"string"}},{"name":"exptime","in":"query","required":false,"description":"Filter out results that expired before this time.","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of certificates.","items":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/ca_certificates":{"post":{"tags":["CACertificate"],"summary":"Create a CA certificate","operationId":"createCACertificate","description":"IAM Action: `gateway:CreateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The certificate description.","type":"object","required":["cert"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}}}},"get":{"tags":["CACertificate"],"summary":"List all CA certificates on a gateway group","operationId":"listCACertificates","description":"IAM Action: `gateway:GetCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","schema":{"type":"string","default":"exptime","enum":["name","exptime"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"sni_id","in":"query","required":false,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"sni_name","description":"SNI name.","in":"query","required":false,"schema":{"type":"string"}},{"name":"exptime","in":"query","required":false,"description":"Filter out results that expired before this time.","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of certificates.","items":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/snis":{"post":{"tags":["SNI"],"summary":"Create an SNI","operationId":"createSNI","description":"IAM Action: `gateway:CreateSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The sni description.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}}}},"get":{"tags":["SNI"],"summary":"List all SNIs on a gateway group","operationId":"listSNIs","description":"IAM Action: `gateway:GetSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","schema":{"type":"string","default":"name","enum":["name"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"domain","description":"The domain of the SNI.","in":"query","required":false,"schema":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},{"name":"mtls_enabled","description":"If true, enable mTLS.","in":"query","required":false,"schema":{"type":"array","items":{"type":"boolean"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of SNIs.","items":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/certificates/{certificate_id}":{"get":{"tags":["Certificate"],"summary":"Get a certificate on a gateway group","operationId":"getCertificate","description":"IAM Action: `gateway:GetCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"certificate_id","description":"The unique identifier of the Certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Certificate"],"summary":"Update a certificate on a gateway group","operationId":"putCertificate","description":"IAM Action: `gateway:UpdateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"certificate_id","description":"The unique identifier of the Certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The certificate description.","type":"object","required":["key","cert"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Certificate"],"summary":"Patch a certificate on a gateway group","operationId":"patchCertificate","description":"IAM Action: `gateway:UpdateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"certificate_id","description":"The unique identifier of the Certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Certificate"],"summary":"Delete a certificate on a gateway group","operationId":"deleteCertificate","description":"IAM Action: `gateway:DeleteCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"certificate_id","description":"The unique identifier of the Certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/ca_certificates/{ca_certificate_id}":{"get":{"tags":["CACertificate"],"summary":"Get a CA certificate on a gateway group","operationId":"getCACertificate","description":"IAM Action: `gateway:GetCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ca_certificate_id","description":"The unique identifier of the certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["CACertificate"],"summary":"Update a CA certificate on a gateway group","operationId":"putCACertificate","description":"IAM Action: `gateway:UpdateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ca_certificate_id","description":"The unique identifier of the certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The certificate description.","type":"object","required":["cert"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["CACertificate"],"summary":"Patch a CA certificate on a gateway group","operationId":"patchCACertificate","description":"IAM Action: `gateway:UpdateCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ca_certificate_id","description":"The unique identifier of the certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["CACertificate"],"summary":"Delete a CA certificate on a gateway group","operationId":"deleteCACertificate","description":"IAM Action: `gateway:DeleteCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"ca_certificate_id","description":"The unique identifier of the certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/snis/{sni_id}":{"get":{"tags":["SNI"],"summary":"Get an SNI on a gateway group","operationId":"getSNI","description":"IAM Action: `gateway:GetSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"sni_id","description":"The unique identifier of the SNI object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["SNI"],"summary":"Update an SNI on a gateway group","operationId":"putSNI","description":"IAM Action: `gateway:UpdateSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"sni_id","description":"The unique identifier of the SNI object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The sni description.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["SNI"],"summary":"Patch an SNI on a gateway group","operationId":"patchSNI","description":"IAM Action: `gateway:UpdateSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"sni_id","description":"The unique identifier of the SNI object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"domain":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"certificates":{"type":"array","minItems":1,"description":"An array of certificates.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}},"mtls":{"type":"object","description":"mTLS configurations.","properties":{"enabled":{"type":"boolean","description":"If true, enable mTLS.","default":false,"example":true},"ca_certificates":{"type":"array","minItems":1,"description":"An array of CA certificates used for mTLS.","items":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"ssl_protocols":{"type":"array","description":"An array of TLS protocol versions.","items":{"type":"string","enum":["TLSv1.1","TLSv1.2","TLSv1.3"]},"default":["TLSv1.2","TLSv1.3"]}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["SNI"],"summary":"Delete an SNI on a gateway group","operationId":"deleteSNI","description":"IAM Action: `gateway:DeleteSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"sni_id","description":"The unique identifier of the SNI object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/consumers":{"post":{"tags":["Consumer"],"summary":"Create a consumer on a gateway group","operationId":"createConsumer","description":"IAM Action: `gateway:CreateConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/*`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer with management fields.","allOf":[{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Consumer"],"summary":"List all consumers on a gateway group","operationId":"listConsumers","description":"IAM Action: `gateway:GetConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order consumers by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","username"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of consumers.","items":{"description":"The consumer with management fields.","allOf":[{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/consumers/{username}":{"get":{"tags":["Consumer"],"summary":"Get a consumer on a gateway group","operationId":"getConsumer","description":"IAM Action: `gateway:GetConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer with management fields.","allOf":[{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Consumer"],"summary":"Update a consumer on a gateway group","operationId":"upsertConsumer","description":"IAM Action: `gateway:UpdateConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer with management fields.","allOf":[{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Consumer"],"summary":"Delete a consumer","operationId":"deleteConsumer","description":"IAM Action: `gateway:DeleteConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Consumer"],"summary":"Update a consumer on a gateway group","operationId":"updateConsumer","description":"IAM Action: `gateway:UpdateConsumer`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer with management fields.","allOf":[{"description":"The consumer description.","type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/consumers/{username}/credentials":{"post":{"tags":["Consumer"],"summary":"Create a consumer credential on a gateway group","operationId":"createConsumerCredential","description":"IAM Action: `gateway:CreateConsumerCredential`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer credential with management fields.","allOf":[{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Consumer"],"summary":"List all consumer credentials on a gateway group","operationId":"listConsumerCredentials","description":"IAM Action: `gateway:GetConsumerCredential`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"plugin_name","description":"the plugin name of the consumer credential.","in":"query","required":false,"schema":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order consumers by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","name"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of consumer credentials.","items":{"description":"The consumer credential with management fields.","allOf":[{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/consumers/{username}/credentials/{credential_id}":{"get":{"tags":["Consumer"],"summary":"Get a consumer credential on a gateway group","operationId":"getConsumerCredential","description":"IAM Action: `gateway:GetConsumerCredential`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"credential_id","description":"The unique identifier of the consumer credential.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer credential with management fields.","allOf":[{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Consumer"],"summary":"Update a consumer credential on a gateway group","operationId":"upsertConsumerCredential","description":"IAM Action: `gateway:UpdateConsumerCredential`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"credential_id","description":"The unique identifier of the consumer credential.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The consumer credential with management fields.","allOf":[{"description":"The consumer credential description.","type":"object","required":["name","plugins"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"plugins":{"type":"object","maxProperties":1,"minProperties":1,"description":"Plugin configuration.","oneOf":[{"title":"key-auth","required":["key-auth"],"properties":{"key-auth":{"type":"object","description":"`key-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`key-auth` user key.","example":"john-key"}}}}},{"title":"basic-auth","required":["basic-auth"],"properties":{"basic-auth":{"type":"object","description":"`basic-auth` plugin configurations.","properties":{"username":{"type":"string","description":"`basic-auth` unique username.","example":"john"},"password":{"type":"string","description":"`basic-auth` user password.","example":"john-secret"}}}}},{"title":"hmac-auth","required":["hmac-auth"],"properties":{"hmac-auth":{"type":"object","description":"`hmac-auth` plugin configurations.","properties":{"key_id":{"type":"string","description":"`hmac-auth` key unique identifier.","example":"john-key"},"secret_key":{"type":"string","description":"`hmac-auth` secret key.","example":"john-secret-key"}}}}},{"title":"jwt-auth","required":["jwt-auth"],"properties":{"jwt-auth":{"type":"object","description":"`jwt-auth` plugin configurations.","properties":{"key":{"type":"string","description":"`jwt-auth` key unique identifier.","example":"john-key"},"secret":{"type":"string","description":"`jwt-auth` secret.","example":"jack-hs256-secret"}}}}}]},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Consumer"],"summary":"Delete a consumer credential","operationId":"deleteConsumerCredential","description":"IAM Action: `gateway:DeleteConsumerCredential`, Resource: `arn:api7:gateway:gatewaygroup/%s/consumer/%s`","parameters":[{"name":"username","description":"The unique identifier of the consumer.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_\\-]+$","description":"The unique identifier of the consumer.","example":"johndoe"}},{"name":"credential_id","description":"The unique identifier of the consumer credential.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"401":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/dcr_providers":{"post":{"tags":["Provider Portal - DCR Provider"],"summary":"Create an DCR provider","operationId":"createDCRProvider","description":"IAM Action: `portal:CreateDCRProvider`, Resource: `arn:api7:portal:dcrprovider/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Provider Portal - DCR Provider"],"summary":"List all DCR providers","operationId":"listDCRProviders","description":"IAM Action: `portal:GetDCRProvider`, Resource: `arn:api7:portal:dcrprovider/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of DCRProvider.","items":{"allOf":[{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/dcr_providers/{dcr_provider_id}":{"get":{"tags":["Provider Portal - DCR Provider"],"summary":"Get an DCR provider","operationId":"getDCRProvider","description":"IAM Action: `portal:GetDCRProvider`, Resource: `arn:api7:portal:dcrprovider/%s`","parameters":[{"name":"dcr_provider_id","description":"The unique identifier of the DCR Provider.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Provider Portal - DCR Provider"],"summary":"Update an DCR Provider","operationId":"updateDCRProvider","description":"IAM Action: `portal:UpdateDCRProvider`, Resource: `arn:api7:portal:dcrprovider/%s`","parameters":[{"name":"dcr_provider_id","description":"The unique identifier of the DCR Provider.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","required":["name","issuer"],"properties":{"name":{"type":"string","minLength":1,"description":"The name of the Dynamic Client Registration (DCR) Provider."},"issuer":{"type":"string","format":"uri","description":"The issuer URL of the Authorization Server."},"headers":{"type":"object","description":"Custom headers to include in requests to the Authorization Server.","example":{"Authorization":"Bearer $TOKEN"},"additionalProperties":{"type":"string"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Provider Portal - DCR Provider"],"summary":"Delete an DCR Provider","operationId":"deleteDCRProvider","description":"IAM Action: `portal:DeleteDCRProvider`, Resource: `arn:api7:portal:dcrprovider/%s`","parameters":[{"name":"dcr_provider_id","description":"The unique identifier of the DCR Provider.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/api_products":{"post":{"tags":["Provider Portal - API Product"],"summary":"Create an API product in Provider Portal","operationId":"createAPIProduct-ProviderPortal","description":"IAM Action: `portal:CreateAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The API product description.","type":"object","oneOf":[{"title":"Gateway API Product","type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"title":"External API Product","type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The API product fields.","allOf":[{"oneOf":[{"title":"Gateway API Product","type":"object","allOf":[{"type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","items":{"type":"object","description":"The gateway group and service that the API product is linked to.","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"name":{"description":"The service name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100},"version":{"type":"string","description":"The version of the published service.","example":"1.3.2"},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"hosts":{"type":"array","items":{"example":"weatherinsights.com","type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$"}},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"openapi_title":{"type":"string","description":"The title of the OpenAPI file.","example":"Weather Insights API - OpenAPI 3.0"}}}}}}]},{"title":"External API Product","type":"object","allOf":[{"type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"desc":{"type":"string","description":"Description."},"api_desc":{"type":"string","description":"API description."},"api_count":{"type":"number","format":"int64","description":"API count.","example":10}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"notifications":{"description":"Notification details.","type":"array","items":{"allOf":[{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["email"]},"email_subject":{"type":"string","description":"Email subject.","example":"API7 Enterprise alert."},"content":{"type":"string","description":"Email content.","example":"This is a alert testing email."}}},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["webhook"]},"message":{"type":"string","description":"Notification message.","example":"This is a alert testing message."}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"event":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"type":"string","example":"6c97bc5f-3356-41f5-894c-c88df5389bd2"}}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Provider Portal - API Product"],"summary":"List all API products in Provider Portal","operationId":"listAPIProducts-ProviderPortal","description":"IAM Action: `portal:GetAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"service_id","description":"The unique identifier of the service template.","in":"query","required":false,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of APIProduct.","items":{"description":"The API product fields.","allOf":[{"oneOf":[{"title":"Gateway API Product","type":"object","allOf":[{"type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","items":{"type":"object","description":"The gateway group and service that the API product is linked to.","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"name":{"description":"The service name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100},"version":{"type":"string","description":"The version of the published service.","example":"1.3.2"},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"hosts":{"type":"array","items":{"example":"weatherinsights.com","type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$"}},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"openapi_title":{"type":"string","description":"The title of the OpenAPI file.","example":"Weather Insights API - OpenAPI 3.0"}}}}}}]},{"title":"External API Product","type":"object","allOf":[{"type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"desc":{"type":"string","description":"Description."},"api_desc":{"type":"string","description":"API description."},"api_count":{"type":"number","format":"int64","description":"API count.","example":10}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/api_products/{api_product_id}":{"get":{"tags":["Provider Portal - API Product"],"summary":"Get an API product in Provider Portal","operationId":"getAPIProduct-ProviderPortal","description":"IAM Action: `portal:GetAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The API product fields.","allOf":[{"oneOf":[{"title":"Gateway API Product","type":"object","allOf":[{"type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","items":{"type":"object","description":"The gateway group and service that the API product is linked to.","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"name":{"description":"The service name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100},"version":{"type":"string","description":"The version of the published service.","example":"1.3.2"},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"hosts":{"type":"array","items":{"example":"weatherinsights.com","type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$"}},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"openapi_title":{"type":"string","description":"The title of the OpenAPI file.","example":"Weather Insights API - OpenAPI 3.0"}}}}}}]},{"title":"External API Product","type":"object","allOf":[{"type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"desc":{"type":"string","description":"Description."},"api_desc":{"type":"string","description":"API description."},"api_count":{"type":"number","format":"int64","description":"API count.","example":10}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"notifications":{"description":"Notification details.","type":"array","items":{"allOf":[{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["email"]},"email_subject":{"type":"string","description":"Email subject.","example":"API7 Enterprise alert."},"content":{"type":"string","description":"Email content.","example":"This is a alert testing email."}}},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["webhook"]},"message":{"type":"string","description":"Notification message.","example":"This is a alert testing message."}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"event":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"type":"string","example":"6c97bc5f-3356-41f5-894c-c88df5389bd2"}}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Provider Portal - API Product"],"summary":"Update an API product in Provider Portal","operationId":"updateAPIProduct-ProviderPortal","description":"IAM Action: `portal:UpdateAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The API product description.","type":"object","oneOf":[{"title":"Gateway API Product","type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"title":"External API Product","type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The API product fields.","allOf":[{"oneOf":[{"title":"Gateway API Product","type":"object","allOf":[{"type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","items":{"type":"object","description":"The gateway group and service that the API product is linked to.","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"name":{"description":"The service name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100},"version":{"type":"string","description":"The version of the published service.","example":"1.3.2"},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"hosts":{"type":"array","items":{"example":"weatherinsights.com","type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$"}},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"openapi_title":{"type":"string","description":"The title of the OpenAPI file.","example":"Weather Insights API - OpenAPI 3.0"}}}}}}]},{"title":"External API Product","type":"object","allOf":[{"type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"desc":{"type":"string","description":"Description."},"api_desc":{"type":"string","description":"API description."},"api_count":{"type":"number","format":"int64","description":"API count.","example":10}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"notifications":{"description":"Notification details.","type":"array","items":{"allOf":[{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["email"]},"email_subject":{"type":"string","description":"Email subject.","example":"API7 Enterprise alert."},"content":{"type":"string","description":"Email content.","example":"This is a alert testing email."}}},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["webhook"]},"message":{"type":"string","description":"Notification message.","example":"This is a alert testing message."}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"event":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"type":"string","example":"6c97bc5f-3356-41f5-894c-c88df5389bd2"}}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Provider Portal - API Product"],"summary":"Patch an API product in Provider Portal","operationId":"patchAPIProduct-ProviderPortal","description":"IAM Action: `portal:UpdateAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The API product fields.","allOf":[{"oneOf":[{"title":"Gateway API Product","type":"object","allOf":[{"type":"object","required":["type","name","linked_gateway_services"],"properties":{"type":{"type":"string","enum":["gateway"],"default":"gateway"},"name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"logo":{"type":"string","description":"The base64-encoded logo image of the API product."},"desc":{"type":"string","description":"The description of the API product.","example":"The Weather Insights API provides real-time and historical weather data for any location worldwide."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"auth":{"type":"object","description":"The authentication configuration of the API product.","additionalProperties":false,"minProperties":1,"example":{"key-auth":{"header":"apikey","hide_credentials":false,"query":"apikey"}},"properties":{"key-auth":{"type":"object","additionalProperties":false,"description":"Key authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."},"query":{"type":"string","default":"apikey","description":"The query string to get the key from. Lower priority than header."},"header":{"type":"string","default":"apikey","description":"The header to get the key from."}}},"basic-auth":{"type":"object","additionalProperties":false,"description":"Basic authentication configurations.","properties":{"hide_credentials":{"type":"boolean","default":false,"description":"If true, do not pass the header or query string with key to upstream services."}}},"dcr":{"type":"object","additionalProperties":false,"description":"DCR authentication configurations.","required":["dcr_provider_id"],"properties":{"dcr_provider_id":{"description":"ID of the DCR provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}},"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","minItems":1,"items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"service_id":{"description":"The service template ID of the published service.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"linked_hosts":{"type":"array","description":"Select one or more hosts configured for the gateway service to be published to the API portal. If not set, it means using all hosts of the gateway service.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"subscription_auto_approval":{"type":"boolean","default":false,"description":"If true, the subscription is automatically approved."},"can_view_unsubscribed":{"type":"boolean","description":"If true, developers can view the unsubscribed API.","default":true},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"linked_gateway_services":{"type":"array","description":"An array of gateway groups and services that the API product is linked to.","items":{"type":"object","description":"The gateway group and service that the API product is linked to.","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"name":{"description":"The service name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100},"version":{"type":"string","description":"The version of the published service.","example":"1.3.2"},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"hosts":{"type":"array","items":{"example":"weatherinsights.com","type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$"}},"updated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"openapi_title":{"type":"string","description":"The title of the OpenAPI file.","example":"Weather Insights API - OpenAPI 3.0"}}}}}}]},{"title":"External API Product","type":"object","allOf":[{"type":"object","required":["name","type","raw_openapi"],"anyOf":[{"required":["server_url"]},{"required":["server_urls"]}],"properties":{"type":{"type":"string","description":"Type of API product.","enum":["external"],"default":"external"},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"raw_openapi":{"type":"string","minLength":1,"description":"The content of the OpenAPI YAML file.","example":"Raw OpenAPI spec"},"server_url":{"deprecated":true,"type":"string","minLength":1,"maxLength":4096,"description":"The server URL. It should be configured if the server URL is not defined in the OpenAPI spec.","example":"http://localhost:8080"},"server_urls":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":4096},"description":"The server URLs. It should be configured if the server URLs are not defined in the OpenAPI spec.","example":["http://localhost:8080","http://localhost:8081"]},"status":{"type":"string","description":"Status of the API product.","enum":["draft","published"],"default":"draft"},"visibility":{"type":"string","enum":["public","logged_in"],"default":"public","description":"The visibility of the API product in the API hub. `public` means the product is visible to all users and `logged_in` means the product is only visible to logged-in developers."}}},{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"desc":{"type":"string","description":"Description."},"api_desc":{"type":"string","description":"API description."},"api_count":{"type":"number","format":"int64","description":"API count.","example":10}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"notifications":{"description":"Notification details.","type":"array","items":{"allOf":[{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["email"]},"email_subject":{"type":"string","description":"Email subject.","example":"API7 Enterprise alert."},"content":{"type":"string","description":"Email content.","example":"This is a alert testing email."}}},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"The type of the notification.","enum":["webhook"]},"message":{"type":"string","description":"Notification message.","example":"This is a alert testing message."}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"event":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"type":"string","example":"6c97bc5f-3356-41f5-894c-c88df5389bd2"}}}}]}}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Provider Portal - API Product"],"summary":"Delete an API product in Provider Portal","operationId":"deleteAPIProduct-ProviderPortal","description":"IAM Action: `portal:DeleteAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/api_products/{api_product_id}/subscriptions":{"get":{"tags":["Provider Portal - API Product"],"summary":"List all subscriptions in Provider Portal for an API product","operationId":"listSubscriptions","description":"IAM Action: `portal:GetAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","schema":{"type":"string","default":"subscribed_at","enum":["developer_name","subscribed_at"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of Developer user.","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the subscription."},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"developer_id":{"type":"string"},"developer_name":{"type":"string"},"subscribed_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"application_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"application_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"api_product_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"api_product_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"status":{"type":"string","enum":["unsubscribed","wait_for_approval","subscribed"]}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/api_products/{api_product_id}/subscriptions/{subscription_id}":{"delete":{"tags":["Provider Portal - API Product"],"summary":"Cancel a subscription in Provider Portal for an API product","operationId":"cancelSubscription","description":"IAM Action: `portal:UpdateAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"subscription_id","description":"the unique identifier of the subscription.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/api_products/{api_product_id}/notification_histories":{"get":{"tags":["Provider Portal - API Product"],"summary":"List all notification histories for an API product","description":"IAM Action: `portal:GetAPIProduct`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s`","parameters":[{"name":"api_product_id","description":"The unique identifier of the API product.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"notification_type","description":"The type of the notification.","in":"query","schema":{"type":"string","enum":["email","webhook"]}},{"name":"event","description":"Notification trigger.","in":"query","schema":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]}},{"name":"contact_point_id","description":"The contact point ID of the notification.","in":"query","schema":{"type":"string","example":"6c97bc5f-3356-41f5-894c-c88df5389bd2"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Order to list the notifications by.","schema":{"type":"string","default":"notified_at","enum":["notified_at"]}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of notification.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"notified_at":{"description":"The notification sent timestamp.","type":"integer","minimum":0,"example":1742288230},"notification":{"oneOf":[{"title":"Email","required":["type","subject","content"],"properties":{"type":{"description":"Type of notification.","enum":["email"]},"subject":{"type":"string","description":"The email subject.","example":"API7 Notification"},"content":{"type":"string","description":"The email content.","example":"This is a test notification."}}},{"title":"Webhook","required":["type","message"],"properties":{"type":{"description":"Type of notification.","enum":["webhook"]},"message":{"type":"string","description":"The notification message.","example":"This is a test notification."}}}],"type":"object","description":"The associated notification configurations.","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"event":{"type":"string","description":"Notification trigger.","enum":["subscription_approval_created","subscription_approval_accepted","subscription_approval_rejected","subscription_cancelled"]},"contact_points":{"type":"array","description":"An array of contact points.","items":{"type":"object","properties":{"id":{"description":"ID of the contact point.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"description":"Name of the contact point.","type":"string","example":"cp-docs-test"}}}}}},"developer_id":{"example":"7e4d29f5-a4bc-4e0d-9c02-5a0d8e1c3427","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256},"developer_name":{"type":"string","description":"Developer name.","example":"johndoe"},"application_id":{"description":"Application ID.","example":"default"},"application_name":{"type":"string","description":"Application name.","example":"Weather Insights API"},"approval_id":{"description":"Approval ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"subscription_id":{"description":"Subscription ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"notification_logs":{"type":"array","description":"Logs of notifications that were sent.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"contact_point_name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test"},"resource_type":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]},"resource_id":{"description":"The resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"resource_name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"status":{"type":"string","description":"Notification sending status.","enum":["success","failed"],"example":"failed"},"send_time":{"type":"integer","example":1759649130,"description":"The time when the notification is sent."},"request":{"type":"string","description":"Request information.","example":"{\"from\": \"test.send@api7.ai\", \"to\": \"test.receive@api7.ai\", \"subject\": \"API7 Notification\", \"content\": \"This is a test notification.\"}"},"response":{"type":"string","description":"Response from the server.","example":"450 The domain must be verified in your account to send emails."}}}},"resource_id":{"description":"Resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"resource_name":{"description":"Resource name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/developers":{"get":{"tags":["Developer"],"summary":"List Developers","description":"IAM Action: `portal:GetDeveloper`, Resource: `arn:api7:portal:portal/%s/developer/%s`","operationId":"listDeveloperUsers","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order developers by.","schema":{"type":"string","default":"last_active_at","enum":["last_active_at","created_at"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of Developer user.","items":{"allOf":[{"type":"object","properties":{"username":{"type":"string","description":"Unique developer username.","example":"dev1"},"name":{"type":"string","description":"Developer name.","example":"dev one"},"last_active_at":{"type":"integer","description":"Developer last active timestamp.","example":1742288233},"email":{"type":"string","description":"Developer email address.","example":"developer-test@email.com"},"email_verified":{"type":"boolean","description":"If true, the developer's email is verified."}}},{"type":"object","properties":{"id":{"description":"Developer ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"state":{"type":"string","description":"The state of the member.\n- Pending: The user is pending approval.\n- Active: The user had been approved.","enum":["Pending","Active"]}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/developers/{developer_id}":{"delete":{"tags":["Developer"],"summary":"Delete a developer","description":"IAM Action: `portal:DeleteDeveloper`, Resource: `arn:api7:portal:portal/%s/developer/%s`","operationId":"deleteDeveloperUser","parameters":[{"name":"developer_id","in":"path","required":true,"description":"Developer ID.","schema":{"type":"string"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/developers/invites":{"post":{"tags":["Developer"],"summary":"Invite a developer to the portal","description":"IAM Action: `portal:InviteDeveloper`, Resource: `arn:api7:portal:portal/%s/developer/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"The username of the user.","type":"string","minLength":1,"maxLength":128,"example":"john"},"password":{"description":"The password of the user.","type":"string","minLength":1,"maxLength":128,"example":"john-safe-password"},"name":{"description":"The name of the user.","type":"string","minLength":1,"maxLength":128,"example":"john"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"username":{"type":"string","description":"Unique developer username.","example":"dev1"},"name":{"type":"string","description":"Developer name.","example":"dev one"},"last_active_at":{"type":"integer","description":"Developer last active timestamp.","example":1742288233},"email":{"type":"string","description":"Developer email address.","example":"developer-test@email.com"},"email_verified":{"type":"boolean","description":"If true, the developer's email is verified."}}},{"type":"object","properties":{"id":{"description":"Developer ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"state":{"type":"string","description":"The state of the member.\n- Pending: The user is pending approval.\n- Active: The user had been approved.","enum":["Pending","Active"]}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/portal/monitor/query":{"get":{"tags":["Monitoring"],"summary":"Get provider portal monitoring data at a single point in time","description":"See Prometheus [instant queries](https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries) for more information.","operationId":"portalMonitorQuery","parameters":[{"name":"query","description":"Prometheus expression query string.","in":"query","required":true,"schema":{"type":"string","example":"apisix"}},{"name":"time","description":"Evaluation timestamp. Accepts either a Unix timestamp or an RFC3339 timestamp.","in":"query","required":false,"schema":{"oneOf":[{"title":"Unix Timestamp","type":"integer","example":1718531400},{"title":"RFC3339 Timestamp","type":"string","format":"date-time","example":"2025-06-17T12:00:00Z"}]}},{"name":"timeout","description":"Evaluation timeout, either as:\n- A float number in seconds (e.g. `2.5`)\n- A duration string (e.g. `5s`, `1.5m`) in Prometheus-style format.\n","in":"query","required":false,"schema":{"oneOf":[{"title":"Float","type":"number","format":"float","example":2.5},{"title":"Duration","type":"string","example":"1.5m"}]}},{"name":"limit","description":"Maximum number of returned series. 0 means disabled.","in":"query","required":false,"schema":{"type":"integer"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"The Prometheus proxy response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","description":"The Prometheus raw data.","additionalProperties":true,"example":{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"label":"xxx"},"values":[[1684740675,1],[1684740690,2]]}]}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/portal/monitor/query_range":{"get":{"tags":["Monitoring"],"summary":"Get provider portal monitoring data over a range of time","description":"See Prometheus [range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) for more information.","operationId":"portalMonitorQueryRange","parameters":[{"name":"query","description":"Prometheus expression query string.","in":"query","required":true,"schema":{"type":"string","example":"apisix"}},{"name":"start","description":"Start timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp.","in":"query","required":true,"schema":{"oneOf":[{"title":"Unix Timestamp","type":"integer","example":1718531400},{"title":"RFC3339 Timestamp","type":"string","format":"date-time","example":"2025-06-16T12:00:00Z"}]}},{"name":"end","description":"End timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp.","in":"query","required":true,"schema":{"oneOf":[{"title":"Unix Timestamp","type":"integer","example":1718531400},{"title":"RFC3339 Timestamp","type":"string","format":"date-time","example":"2025-06-17T12:00:00Z"}]}},{"name":"step","description":"Query resolution step width, either as:\n- a float number in seconds (e.g. `15.5`), or\n- a duration string (e.g. `15s`, `1m`, `2h`) in Prometheus-style duration format.\n","in":"query","required":true,"schema":{"oneOf":[{"title":"Float","type":"number","format":"float","example":15.5},{"title":"Duration","type":"string","example":"15s"}]}},{"name":"timeout","description":"Evaluation timeout, either as:\n- A float number in seconds (e.g. `2.5`)\n- A duration string (e.g. `5s`, `1.5m`) in Prometheus-style format.\n","in":"query","required":false,"schema":{"oneOf":[{"title":"Float","type":"number","format":"float","example":2.5},{"title":"Duration","type":"string","example":"1.5m"}]}},{"name":"limit","description":"Maximum number of returned series. 0 means disabled.","in":"query","required":false,"schema":{"type":"integer"}},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"The Prometheus proxy response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","description":"The Prometheus raw data.","additionalProperties":true,"example":{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"label":"xxx"},"values":[[1684740675,1],[1684740690,2]]}]}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/portals":{"get":{"tags":["Provider Portal - Portal Instance"],"summary":"List all portal instances","operationId":"listPortals","description":"IAM Action: `portal:ListPortals`, Resource: `arn:api7:portal:portal/*`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"Portal list response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"description":"An array of portal instances.","type":"array","items":{"description":"The portal instance with management fields.","allOf":[{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"post":{"tags":["Provider Portal - Portal Instance"],"summary":"Create a portal instance","operationId":"createPortal","description":"IAM Action: `portal:CreatePortal`, Resource: `arn:api7:portal:portal/*`","requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}}}}},"responses":{"200":{"description":"Portal response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The portal instance with management fields.","allOf":[{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/portals/{portal_id}":{"get":{"tags":["Provider Portal - Portal Instance"],"summary":"Get a portal instance","operationId":"getPortal","description":"IAM Action: `portal:GetPortal`, Resource: `arn:api7:portal:portal/%s`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"Portal response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The portal instance with management fields.","allOf":[{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Provider Portal - Portal Instance"],"summary":"Update a portal instance","operationId":"updatePortal","description":"IAM Action: `portal:UpdatePortal`, Resource: `arn:api7:portal:portal/%s`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}}}}},"responses":{"200":{"description":"Portal response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The portal instance with management fields.","allOf":[{"description":"The portal instance description.","type":"object","required":["name","public_url"],"properties":{"name":{"description":"Portal instance name.","example":"Developer Portal","type":"string","minLength":1,"maxLength":100},"labels":{"description":"Labels of the portal instance.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"public_url":{"type":"string","minLength":1,"format":"url","description":"Portal instance public URL.","example":"https://portal.example.com"}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Provider Portal - Portal Instance"],"summary":"Delete a portal instance","operationId":"deletePortal","description":"IAM Action: `portal:DeletePortal`, Resource: `arn:api7:portal:portal/%s`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/global_rules":{"post":{"tags":["Global Rule"],"summary":"Create a global rule on a gateway group","operationId":"createGlobalRule","description":"IAM Action: `gateway:CreateGlobalPluginRule`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The global rule with management fields.","allOf":[{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"id":{"description":"Name of the plugin.","type":"string","minLength":1,"maxLength":64,"example":"key-auth"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Global Rule"],"summary":"List all global rules on a gateway group","operationId":"listGlobalRules","description":"IAM Action: `gateway:GetGlobalPluginRule`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of global rules.","items":{"description":"The global rule with management fields.","allOf":[{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"id":{"description":"Name of the plugin.","type":"string","minLength":1,"maxLength":64,"example":"key-auth"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/global_rules/{global_rule_id}":{"get":{"tags":["Global Rule"],"summary":"Get a global rule on a gateway group","operationId":"getGlobalRule","description":"IAM Action: `gateway:GetGlobalPluginRule`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"global_rule_id","description":"The unique identifier of the global rule.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The global rule with management fields.","allOf":[{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"id":{"description":"Name of the plugin.","type":"string","minLength":1,"maxLength":64,"example":"key-auth"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Global Rule"],"summary":"Update a global rule on a gateway group","operationId":"putGlobalRule","description":"IAM Action: `gateway:UpdateGlobalPluginRule`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"global_rule_id","description":"The unique identifier of the global rule.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The global rule with management fields.","allOf":[{"description":"The global rule description.","type":"object","required":["plugins"],"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","properties":{"id":{"description":"Name of the plugin.","type":"string","minLength":1,"maxLength":64,"example":"key-auth"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Global Rule"],"summary":"Delete a global rule on a gateway group","operationId":"deleteGlobalRule","description":"IAM Action: `gateway:DeleteGlobalPluginRule`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"global_rule_id","description":"The unique identifier of the global rule.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/plugin_metadata":{"get":{"tags":["Plugin Metadata"],"summary":"List all plugin metadata on a gateway group","operationId":"listPluginMetadata","description":"IAM Action: `gateway:GetPluginMetadata`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","description":"Plugin name to metadata map.","additionalProperties":{"description":"Plugin metadata.","type":"object","example":{"disabled_labels":{"status":["code"]}}},"example":{"prometheus":{"disabled_labels":{"status":["code"]}},"syslog":{"log_format":{"@timestamp":"$time_iso8601","client_ip":"$remote_addr","host":"$host","route_id":"$route_id"}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/plugin_metadata/{plugin_name}":{"get":{"tags":["Plugin Metadata"],"summary":"Get a plugin metadata on a gateway group","operationId":"getPluginMetadata","description":"IAM Action: `gateway:GetPluginMetadata`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"name":"return_default","in":"query","schema":{"type":"boolean","description":"When set to true, the default value is returned when plugin metadata is not found.","default":false}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"Plugin metadata.","type":"object","example":{"disabled_labels":{"status":["code"]}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Plugin Metadata"],"summary":"Update a plugin metadata on a gateway group","operationId":"putPluginMetadata","description":"IAM Action: `gateway:UpdatePluginMetadata`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"description":"Plugin metadata.","type":"object","example":{"disabled_labels":{"status":["code"]}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"Plugin metadata.","type":"object","example":{"disabled_labels":{"status":["code"]}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Plugin Metadata"],"summary":"Delete a plugin metadata on a gateway group","operationId":"deletePluginMetadata","description":"IAM Action: `gateway:DeletePluginMetadata`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/plugin_metadata/{plugin_name}/default":{"get":{"tags":["Plugin Metadata"],"summary":"Get the default value of a plugin metadata","operationId":"getPluginMetadataDefaultValue","parameters":[{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"Plugin metadata.","type":"object","example":{}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/plugins":{"get":{"tags":["Plugin"],"summary":"Get all plugin schemas and priorities","operationId":"listPluginDetail","parameters":[{"name":"subsystem","in":"query","schema":{"type":"string","default":"http","enum":["http","stream"],"example":"stream"},"description":"Type to filter the plugin list. `http` will only show L7 plugins and `stream` will only show L4 plugins."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"object","properties":{"schema":{"type":"object"},"consumer_schema":{"type":"object"},"metadata_schema":{"type":"object"},"type":{"type":"string"},"scope":{"type":"string"},"priority":{"type":"integer"}}},"example":{"acl":{"schema":{"$comment":"this is a mark for our injected plugin schema","allOf":[{"if":{"properties":{"external_user_label_field_parser":{"const":"segmented_text"}},"required":["external_user_label_field_parser"]},"then":{"required":["external_user_label_field_separator"]}}],"anyOf":[{"required":["allow_labels"]},{"required":["deny_labels"]}],"properties":{"_meta":{"properties":{"disable":{"type":"boolean"},"error_response":{"oneOf":[{"type":"string"},{"type":"object"}]},"filter":{"description":"filter determines whether the plugin needs to be executed at runtime","type":"array"},"pre_function":{"description":"function to be executed in each phase before execution of plugins. The pre_function will have access to two arguments: `conf` and `ctx`.","type":"string"},"priority":{"description":"priority of plugins by customized order","type":"integer"}},"type":"object"},"allow_labels":{"minProperties":1,"patternProperties":{".*":{"items":{"type":"string"},"minItems":1,"type":"array"}},"type":"object"},"deny_labels":{"minProperties":1,"patternProperties":{".*":{"items":{"type":"string"},"minItems":1,"type":"array"}},"type":"object"},"external_user_label_field":{"default":"groups","type":"string"},"external_user_label_field_key":{"minLength":1,"type":"string"},"external_user_label_field_parser":{"enum":["segmented_text","json","table"],"type":"string"},"external_user_label_field_separator":{"description":"The separator(regex) of the segmented_text parser","minLength":1,"type":"string"},"rejected_code":{"default":403,"minimum":200,"type":"integer"},"rejected_msg":{"type":"string"}},"type":"object"},"priority":2410},"ai-aliyun-content-moderation":{"schema":{"$comment":"this is a mark for our injected plugin schema","encrypt_fields":["access_key_secret"],"properties":{"_meta":{"additionalProperties":false,"properties":{"disable":{"type":"boolean"},"error_response":{"oneOf":[{"type":"string"},{"type":"object"}]},"filter":{"description":"filter determines whether the plugin needs to be executed at runtime","type":"array"},"pre_function":{"description":"function to be executed in each phase before execution of plugins. The pre_function will have access to two arguments: `conf` and `ctx`.","type":"string"},"priority":{"description":"priority of plugins by customized order","type":"integer"}},"type":"object"},"access_key_id":{"minLength":1,"type":"string"},"access_key_secret":{"minLength":1,"type":"string"},"check_request":{"default":true,"type":"boolean"},"check_response":{"default":false,"type":"boolean"},"deny_code":{"default":200,"type":"number"},"deny_message":{"type":"string"},"endpoint":{"minLength":1,"type":"string"},"region_id":{"minLength":1,"type":"string"},"request_check_length_limit":{"default":2000,"type":"number"},"request_check_service":{"default":"llm_query_moderation","minLength":1,"type":"string"},"response_check_length_limit":{"default":5000,"type":"number"},"response_check_service":{"default":"llm_response_moderation","minLength":1,"type":"string"},"risk_level_bar":{"default":"high","enum":["none","low","medium","high","max"],"type":"string"},"ssl_verify":{"default":true,"type":"boolean"},"stream_check_cache_size":{"default":128,"description":"max characters per moderation batch in realtime mode","minimum":1,"type":"integer"},"stream_check_interval":{"default":3,"description":"seconds between batch checks in realtime mode","minimum":0.1,"type":"number"},"stream_check_mode":{"default":"final_packet","description":"realtime: batched checks during streaming | final_packet: append risk_level at end\n","enum":["realtime","final_packet"],"type":"string"},"timeout":{"default":10000,"description":"timeout in milliseconds","minimum":1,"type":"integer"}},"required":["endpoint","region_id","access_key_id","access_key_secret"],"type":"object"},"priority":1029}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/apisix/admin/plugins/list":{"get":{"tags":["Plugin"],"summary":"List all plugin names","operationId":"listPlugins","parameters":[{"name":"has_metadata","in":"query","schema":{"type":"boolean","default":false},"description":"If true, show plugin names where the plugins have metadata."},{"name":"subsystem","in":"query","schema":{"type":"string","default":"http","enum":["http","stream"],"example":"stream"},"description":"Type to filter the plugin list. `http` will only show L7 plugins and `stream` will only show L4 plugins."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","minLength":1,"description":"Plugin name."},"example":["ip-restriction","limit-conn","mqtt-proxy","prometheus","syslog"]}}}}}}},"/apisix/admin/plugins/{plugin_name}":{"get":{"tags":["Plugin"],"summary":"Get schema definition of a plugin","description":"Get schema definition of a plugin, including plugin [meta](/apisix/reference/plugin-common-configurations) properties and plugin properties.\nThe endpoint returns the same response as the `/apisix/admin/schema/plugins/{plugin_name}` endpoint when `scope` is not set.\n","operationId":"getPluginAllProperties","parameters":[{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"name":"scope","description":"The scope of the returned plugin information.<br> By default, the scope is not set. When set to `all`, the response includes `metadata_schema`, `priority`, `version`, - and wraps the actual schema under the `schema` field.\n","in":"query","schema":{"type":"string","enum":["all"]}},{"name":"subsystem","in":"query","schema":{"type":"string","default":"http","enum":["http","stream"],"example":"stream"},"description":"Type to filter the plugin list. `http` will only show L7 plugins and `stream` will only show L4 plugins."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The plugin schema definition.","type":"object","example":{"$comment":"this is a mark for our injected plugin schema","properties":{"_meta":{"properties":{"disable":{"type":"boolean"},"error_response":{"oneOf":[{"type":"string"},{"type":"object"}]},"filter":{"description":"filter determines whether the plugin needs to be executed at runtime","type":"array"},"pre_function":{"description":"function to be executed in each phase before execution of plugins. The pre_function will have access to two arguments: `conf` and `ctx`.","type":"string"},"priority":{"description":"priority of plugins by customized order","type":"integer"}},"type":"object"},"prefer_name":{"default":false,"type":"boolean"}},"type":"object"}}}}]}}}}}}},"/apisix/admin/schema/{resource_name}":{"get":{"tags":["Schema"],"summary":"Get schema by resource name","operationId":"getResourceSchema","parameters":[{"name":"resource_name","description":"Name of the resource.","in":"path","required":true,"example":"consumer","schema":{"minimum":1,"type":"string","enum":["service","upstream","stream_service","stream_upstream","route","consumer","consumer_credential","global_rule","ssl","vault_secret","aws_secret","kubernetes_secret","plugin_metadata","stream_route"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","example":{"description":"The consumer description.","properties":{"desc":{"description":"The object description.","maxLength":65536,"type":"string"},"labels":{"additionalProperties":{"maxLength":65536,"minLength":1,"pattern":"^.+$","type":"string"},"example":{"keyA":"valueA","keyB":"valueB"},"type":"object"},"plugins":{"description":"The key-value pairs which represent the plugins attached on the object.","type":"object"},"username":{"maxLength":512,"minLength":1,"pattern":"^[a-zA-Z0-9_\\-]+$","type":"string"}},"required":["username"],"type":"object"}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}},"example":{"value":{},"error_msg":"not found schema: license"}}}}}}},"/apisix/admin/schema/plugins/{plugin_name}":{"get":{"tags":["Schema","Plugin"],"summary":"Get schema definition of a plugin","description":"Get schema definition of a plugin, including plugin [meta](/apisix/reference/plugin-common-configurations) properties and plugin properties.","operationId":"getPluginSchema","parameters":[{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true},{"name":"subsystem","in":"query","schema":{"type":"string","default":"http","enum":["http","stream"],"example":"stream"},"description":"Type to filter the plugin list. `http` will only show L7 plugins and `stream` will only show L4 plugins."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The plugin schema definition.","type":"object","example":{"$comment":"this is a mark for our injected plugin schema","properties":{"_meta":{"properties":{"disable":{"type":"boolean"},"error_response":{"oneOf":[{"type":"string"},{"type":"object"}]},"filter":{"description":"filter determines whether the plugin needs to be executed at runtime","type":"array"},"pre_function":{"description":"function to be executed in each phase before execution of plugins. The pre_function will have access to two arguments: `conf` and `ctx`.","type":"string"},"priority":{"description":"priority of plugins by customized order","type":"integer"}},"type":"object"},"prefer_name":{"default":false,"type":"boolean"}},"type":"object"}}}}]}}}}}}},"/apisix/admin/variables":{"get":{"tags":["Variables"],"summary":"Get all variables","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The APISIX variable list.","type":"array","items":{"description":"The APISIX variable definition.","type":"object","required":["name"],"properties":{"name":{"description":"The variable name.","type":"string","minLength":1,"maxLength":128,"enum":["arg_","args","balancer_ip","balancer_port","binary_remote_addr","body_bytes_sent","bytes_received","bytes_sent","connection","connection_requests","connection_time","consumer_name","content_length","content_type","cookie_","document_root","document_uri","graphql_name","graphql_operation","graphql_root_fields","host","hostname","http2","http_","https","invalid_referer","is_args","msec","nginx_version","pid","pipe","query_string","realpath_root","remote_addr","remote_port","remote_user","request","request_body","request_body_file","request_completion","request_filename","request_id","request_length","request_method","request_time","request_uri","route_id","route_name","scheme","sent_http_","sent_trailer_","server_addr","server_name","server_port","server_protocol","service_id","service_name","ssl_alpn_protocol","ssl_cipher","ssl_ciphers","ssl_client_cert","ssl_client_escaped_cert","ssl_client_fingerprint","ssl_client_i_dn","ssl_client_i_dn_legacy","ssl_client_raw_cert","ssl_client_s_dn","ssl_client_s_dn_legacy","ssl_client_serial","ssl_client_v_end","ssl_client_v_remain","ssl_client_v_start","ssl_client_verify","ssl_curve","ssl_curves","ssl_early_data","ssl_protocol","ssl_server_name","ssl_session_id","ssl_session_reused","status","tcpinfo_rcv_space","tcpinfo_rtt","tcpinfo_rttvar","tcpinfo_snd_cwnd","time_iso8601","time_local","uri"]},"description":{"description":"The variable description.","type":"string","maxLength":65536,"example":"Object description."}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/instances":{"get":{"tags":["Gateway Instance"],"summary":"List all gateway instances of all gateway groups","operationId":"listAllGatewayInstances","description":"IAM Action: `gateway:GetGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"order_by","in":"query","description":"Index to order gateway instances by.","schema":{"type":"string","default":"last_heartbeat_time","enum":["created_at","last_heartbeat_time"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["Healthy","OutOfSync","LostConnection","Offline"]},"description":"The value of the instance status."},{"name":"compatibility","in":"query","schema":{"type":"string","enum":["Compatible","Incompatible","PartiallyCompatible"]},"description":"The compatibility of the gateway instance version."},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of gateway instances.","items":{"type":"object","required":["id","hostname","version","ports","last_heartbeat_time","created_at","status"],"properties":{"id":{"description":"The gateway instance ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"hostname":{"type":"string","description":"The hostname of the gateway instance.","example":"api7-ee-3-gateway-56ffbfd46d-p99fj"},"ip":{"type":"string","description":"The IP address of the gateway instance.","example":"192.168.215.2"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"version":{"type":"string","description":"The version of the gateway instance.","example":"3.2.2"},"ports":{"type":"array","description":"The listening ports of the gateway instance.","uniqueItems":true,"example":[9080,9443],"minItems":1,"items":{"type":"integer"}},"last_heartbeat_time":{"description":"The time of the gateway instance’s last heartbeat.","type":"integer","minimum":0,"example":1742288230},"last_retrieve_config_time":{"description":"The time when the gateway instance last received its configuration.","type":"integer","minimum":0,"example":1742288230},"to_be_deleted_at":{"nullable":true,"description":"The time to delete offline instances from the instance list.","type":"integer","minimum":0,"example":1742288230},"created_at":{"description":"The time of the gateway instance’s first heartbeat.","type":"integer","minimum":0,"example":1742288232},"dataplane_certificate_expire_time":{"nullable":true,"description":"The expiration time of the certificate used for mTLS connection between the data plane and the control plane.","type":"integer","minimum":0,"example":1742288230},"status":{"type":"string","description":"- `Healthy`: Indicates that the gateway instance is functioning normally. This means heartbeat signals are being received regularly, and configuration delivery is working as expected (i.e., configuration revision is in sync).\n- `OutOfSync`: Indicates that the gateway instance is sending heartbeat signals regularly, but the configuration delivery is failing (the configuration revision is out of sync).\n- `LostConnection`: Indicates the gateway instance has lost its heartbeat recently ( 2 minutes < t < 2 hours )\n- `Offline`: Indicates the gateway instance has lost its heartbeat a long ago ( 2 hours < t < 7 days )\n\nPlease note that gateway instances that have been offline for more than 7 days will be removed from the system and will not be included in this API.","enum":["Healthy","OutOfSync","LostConnection","Offline"]},"cores":{"type":"integer","description":"The number of data plane cores.","example":1},"compatibility":{"type":"string","description":"- `Compatible`: The gateway instance is fully compatible with the control plane, and all functionalities operate as expected.\n- `Incompatible`: The gateway instance is not compatible with the control plane, and critical functionalities may not work.\n- `PartiallyCompatible`: The gateway instance has limited compatibility with the control plane, and some functionalities may not work as expected.","enum":["Compatible","Incompatible","PartiallyCompatible"]},"running_mode":{"type":"string","enum":["standard","backup"]}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/instances":{"get":{"tags":["Gateway Instance","Gateway Group"],"summary":"List all gateway instances on a gateway group","operationId":"listGatewayInstances","description":"IAM Action: `gateway:GetGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"order_by","in":"query","description":"Index to order gateway instances by.","schema":{"type":"string","default":"last_heartbeat_time","enum":["created_at","last_heartbeat_time"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["Healthy","OutOfSync","LostConnection","Offline"]},"description":"The value of the instance status."},{"name":"compatibility","in":"query","schema":{"type":"string","enum":["Compatible","Incompatible","PartiallyCompatible"]},"description":"The compatibility of the gateway instance version."},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of gateway instances.","items":{"type":"object","required":["id","hostname","version","ports","last_heartbeat_time","created_at","status"],"properties":{"id":{"description":"The gateway instance ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"hostname":{"type":"string","description":"The hostname of the gateway instance.","example":"api7-ee-3-gateway-56ffbfd46d-p99fj"},"ip":{"type":"string","description":"The IP address of the gateway instance.","example":"192.168.215.2"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"version":{"type":"string","description":"The version of the gateway instance.","example":"3.2.2"},"ports":{"type":"array","description":"The listening ports of the gateway instance.","uniqueItems":true,"example":[9080,9443],"minItems":1,"items":{"type":"integer"}},"last_heartbeat_time":{"description":"The time of the gateway instance’s last heartbeat.","type":"integer","minimum":0,"example":1742288230},"last_retrieve_config_time":{"description":"The time when the gateway instance last received its configuration.","type":"integer","minimum":0,"example":1742288230},"to_be_deleted_at":{"nullable":true,"description":"The time to delete offline instances from the instance list.","type":"integer","minimum":0,"example":1742288230},"created_at":{"description":"The time of the gateway instance’s first heartbeat.","type":"integer","minimum":0,"example":1742288232},"dataplane_certificate_expire_time":{"nullable":true,"description":"The expiration time of the certificate used for mTLS connection between the data plane and the control plane.","type":"integer","minimum":0,"example":1742288230},"status":{"type":"string","description":"- `Healthy`: Indicates that the gateway instance is functioning normally. This means heartbeat signals are being received regularly, and configuration delivery is working as expected (i.e., configuration revision is in sync).\n- `OutOfSync`: Indicates that the gateway instance is sending heartbeat signals regularly, but the configuration delivery is failing (the configuration revision is out of sync).\n- `LostConnection`: Indicates the gateway instance has lost its heartbeat recently ( 2 minutes < t < 2 hours )\n- `Offline`: Indicates the gateway instance has lost its heartbeat a long ago ( 2 hours < t < 7 days )\n\nPlease note that gateway instances that have been offline for more than 7 days will be removed from the system and will not be included in this API.","enum":["Healthy","OutOfSync","LostConnection","Offline"]},"cores":{"type":"integer","description":"The number of data plane cores.","example":1},"compatibility":{"type":"string","description":"- `Compatible`: The gateway instance is fully compatible with the control plane, and all functionalities operate as expected.\n- `Incompatible`: The gateway instance is not compatible with the control plane, and critical functionalities may not work.\n- `PartiallyCompatible`: The gateway instance has limited compatibility with the control plane, and some functionalities may not work as expected.","enum":["Compatible","Incompatible","PartiallyCompatible"]},"running_mode":{"type":"string","enum":["standard","backup"]}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/instances/count/{field}":{"get":{"tags":["Gateway Instance","Gateway Group"],"summary":"Count the number of gateway instances by status in a gateway group","operationId":"countGatewayInstancesStatus","description":"IAM Action: `gateway:GetGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID. Optional when using the gateway group admin key to authenticate.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","in":"query","required":true,"schema":{"minimum":1,"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"field","in":"path","required":true,"description":"Field to count by.","schema":{"type":"string","enum":["status"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"array","description":"An array of gateway instance count status.","items":{"type":"object","properties":{"key":{"type":"string","description":"Gateway status.","example":"Healthy","enum":["Healthy","OutOfSync","LostConnection","Offline"]},"count":{"type":"integer","description":"The number of instances.","example":1}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/instances/cores":{"get":{"tags":["Gateway Instance"],"summary":"List gateway instances cores of all gateway groups","operationId":"listAllGatewayInstancesCores","description":"IAM Action: `gateway:GetGatewayInstanceCore`, Resource: `arn:api7:gateway:gatewaygroup/*`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"current_dp_cores":{"type":"integer","description":"The number of current data plane cores.","example":1}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/instances/cores_usages/export":{"get":{"tags":["Gateway Instance","Gateway Group"],"summary":"Export the gateway instance core usage","operationId":"exportGatewayInstancesCoresUsage","description":"The gateway instance’s core usage is exported hourly within the specified time interval.<br> IAM Action: `gateway:GetGatewayInstanceCore`, Resource: `arn:api7:gateway:gatewaygroup/*`","parameters":[{"name":"begin_at","in":"query","required":true,"description":"The start time to export the gateway instance core usage.","schema":{"type":"integer","format":"int64"}},{"name":"end_at","in":"query","required":true,"description":"The end time to export the gateway instance core usage.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","description":"CSV text with `time` and `max_dp_cores` columns."},"example":"time,max_dp_cores\n1749132000,9\n1749128400,9\n1749124800,9\n1749121200,9\n1749117600,9\n1749114000,9\n1749110400,9\n1749106800,17\n1749103200,1\n1749099600,1\n1749096000,1\n1749092400,1\n1749088800,1\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/users":{"get":{"tags":["User"],"summary":"List all users","operationId":"listUsers","description":"IAM Action: `iam:GetUser`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"roles","in":"query","schema":{"type":"array","description":"Any array of roles.","items":{"type":"string"},"minimum":1}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of users.","items":{"description":"The details for a user. It's user-specific information in an organization.","allOf":[{"type":"object","properties":{"id":{"description":"Operator ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"username":{"type":"string","description":"Operator username.","example":"admin"},"name":{"type":"string","description":"Operator name.","example":"admin"},"email":{"type":"string","description":"Operator email.","example":"test@email.com"},"email_verified":{"type":"boolean","description":"If true, the operator email is verified."}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"provider":{"type":"string","description":"Method used for user authentication or provisioning source.","enum":["builtin","sso","scim"]},"roles":{"description":"An array of roles to be assigned to a user.","type":"array","minItems":1,"maxItems":32,"items":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The unique identifier of the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"super_admin"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of the role.","enum":["built_in","custom"]},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}}}}},"boundaries":{"description":"An array of boundaries to be assigned to the user.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/users/{user_id}":{"get":{"tags":["User"],"summary":"Get a user","operationId":"getUser","description":"IAM Action: `iam:GetUser`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The details for a user. It's user-specific information in an organization.","allOf":[{"type":"object","properties":{"id":{"description":"Operator ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"username":{"type":"string","description":"Operator username.","example":"admin"},"name":{"type":"string","description":"Operator name.","example":"admin"},"email":{"type":"string","description":"Operator email.","example":"test@email.com"},"email_verified":{"type":"boolean","description":"If true, the operator email is verified."}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"provider":{"type":"string","description":"Method used for user authentication or provisioning source.","enum":["builtin","sso","scim"]},"roles":{"description":"An array of roles to be assigned to a user.","type":"array","minItems":1,"maxItems":32,"items":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The unique identifier of the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"super_admin"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of the role.","enum":["built_in","custom"]},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}}}}},"boundaries":{"description":"An array of boundaries to be assigned to the user.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["User"],"summary":"Update basic attributes of a user","operationId":"updateUser","description":"IAM Action: `iam:UpdateUser`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["User"],"summary":"Delete a user","operationId":"deleteUser","description":"IAM Action: `iam:DeleteUser`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/users/{user_id}/boundaries":{"put":{"tags":["User"],"summary":"Update the user's permission boundaries","operationId":"updateUserBoundaries","description":"Update a user’s boundaries using a list of permission policy IDs.<br> IAM Action: `iam:UpdateUserBoundary`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","description":"An array of permission policy ID.","items":{"type":"string","example":"efd3bcc7-b61a-47ec-942b-b36bf249f1da"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/users/{user_id}/password_reset":{"put":{"tags":["User"],"summary":"Reset the password to specific value","operationId":"passwordReset","description":"IAM Action: `iam:ResetPassword`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"The request to reset the password.","type":"object","required":["password"],"properties":{"password":{"type":"string","description":"The password of the user.","minLength":1,"maxLength":128,"example":"safe-password"}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/me":{"get":{"tags":["User"],"summary":"Get my user detail","operationId":"getUserMe","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The details for a user. It's user-specific information in an organization.","allOf":[{"type":"object","properties":{"id":{"description":"Operator ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"username":{"type":"string","description":"Operator username.","example":"admin"},"name":{"type":"string","description":"Operator name.","example":"admin"},"email":{"type":"string","description":"Operator email.","example":"test@email.com"},"email_verified":{"type":"boolean","description":"If true, the operator email is verified."}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"provider":{"type":"string","description":"Method used for user authentication or provisioning source.","enum":["builtin","sso","scim"]},"roles":{"description":"An array of roles to be assigned to a user.","type":"array","minItems":1,"maxItems":32,"items":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The unique identifier of the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"super_admin"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of the role.","enum":["built_in","custom"]},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}}}}},"boundaries":{"description":"An array of boundaries to be assigned to the user.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["User"],"summary":"Update my user profile","operationId":"putUserMe","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/me/email":{"put":{"tags":["User"],"summary":"Update the user email","operationId":"putUserEmail","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","minLength":1,"maxLength":128}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["User"],"summary":"Delete the user email","operationId":"deleteUserEmail","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/email_verified":{"get":{"tags":["Email"],"summary":"Check if an email is verified","operationId":"checkEmailVerified","parameters":[{"name":"email","in":"query","required":true,"description":"Email address.","schema":{"type":"string","format":"email","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"verified":{"type":"boolean"}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/verify_email":{"get":{"tags":["Email"],"summary":"Get email verification","operationId":"getEmailVerification","parameters":[{"name":"token","description":"The token of the request.","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"302":{"description":"Redirect to IdP.","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/invites":{"post":{"tags":["User"],"summary":"Invite a user","operationId":"inviteUser","description":"IAM Action: `iam:InviteUser`, Resource: `arn:api7:iam:user/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"The username of the user.","type":"string","minLength":1,"maxLength":128},"password":{"type":"string","description":"The password of the user.","minLength":1,"maxLength":128,"example":"safe-password"},"boundaries":{"description":"The permission boundaries of the user.","type":"array","items":{"type":"string"}},"name":{"description":"The name of the user.","type":"string","minLength":1,"maxLength":128}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The details for a user. It's user-specific information in an organization.","allOf":[{"type":"object","properties":{"id":{"description":"Operator ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"username":{"type":"string","description":"Operator username.","example":"admin"},"name":{"type":"string","description":"Operator name.","example":"admin"},"email":{"type":"string","description":"Operator email.","example":"test@email.com"},"email_verified":{"type":"boolean","description":"If true, the operator email is verified."}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"provider":{"type":"string","description":"Method used for user authentication or provisioning source.","enum":["builtin","sso","scim"]},"roles":{"description":"An array of roles to be assigned to a user.","type":"array","minItems":1,"maxItems":32,"items":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The unique identifier of the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"super_admin"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of the role.","enum":["built_in","custom"]},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}}}}},"boundaries":{"description":"An array of boundaries to be assigned to the user.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]},{"type":"object","properties":{"invitation_link":{"type":"string","description":"The invitation link of the user."}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/password":{"put":{"tags":["User"],"summary":"Update my user password","operationId":"updateUserPassword","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["new_password"],"properties":{"old_password":{"type":"string","minLength":1,"maxLength":128,"example":"old-password"},"new_password":{"type":"string","minLength":1,"maxLength":128,"example":"new-password"}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/login":{"post":{"tags":["User"],"summary":"Log in to API7 Enterprise using the built-in username and password","operationId":"userLogin","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"The username of the user.","type":"string","minLength":1,"maxLength":128,"example":"john"},"password":{"type":"string","description":"The password of the user.","minLength":1,"maxLength":128,"example":"safe-password"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/logout":{"post":{"tags":["User"],"summary":"Log out from API7 Enterprise using the built-in username and password","operationId":"userLogout","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}}}}},"/api/users/{user_id}/assigned_roles":{"put":{"tags":["User","Role"],"summary":"Update assigned roles for a user","operationId":"addAssignedRole","description":"IAM Action: `iam:UpdateUserRole`, Resource: `arn:api7:iam:user/%s`","parameters":[{"name":"user_id","in":"path","description":"The user ID.","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of role IDs associated with a user.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}},"required":["roles"]}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/roles":{"get":{"tags":["Role"],"summary":"List all roles","operationId":"listRoles","description":"IAM Action: `iam:GetRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of roles.","items":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"View Consumer"},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"type":{"type":"string","enum":["built_in","custom"],"description":"Type of the role.","example":"custom"},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Role"],"summary":"Create a role","operationId":"createRole","description":"IAM Action: `iam:CreateRole`, Resource: `arn:api7:iam:role/*`","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The role name.","example":"View Consumer","minLength":1,"maxLength":256},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"policies":{"type":"array","description":"The polices attached to the role.","minItems":1,"uniqueItems":true,"items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"View Consumer"},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"type":{"type":"string","enum":["built_in","custom"],"description":"Type of the role.","example":"custom"},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/roles/{role_id}":{"get":{"tags":["Role"],"summary":"Get a role","operationId":"getRole","description":"IAM Action: `iam:GetRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"View Consumer"},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"type":{"type":"string","enum":["built_in","custom"],"description":"Type of the role.","example":"custom"},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Role"],"summary":"Update a role","operationId":"putRole","description":"IAM Action: `iam:UpdateRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The role name.","example":"View Consumer","minLength":1,"maxLength":256},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"policies":{"type":"array","description":"The polices attached to the role.","minItems":1,"uniqueItems":true,"items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The specification of the role of the user.","type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The role name.","example":"View Consumer"},"desc":{"example":"This role allows users to view comsumers.","description":"The object description.","type":"string","maxLength":65536},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"type":{"type":"string","enum":["built_in","custom"],"description":"Type of the role.","example":"custom"},"policies":{"type":"array","description":"The policies of the role.","items":{"type":"string","example":"super-admin-permission-policy"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Role"],"summary":"Delete a role","operationId":"deleteRole","description":"IAM Action: `iam:DeleteRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/roles/{role_id}/permission_policies":{"get":{"tags":["Role","Permission Policy"],"summary":"List all permission policies attached to a role","operationId":"listRolePermissionPolicies","description":"IAM Action: `iam:GetPermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of permission policies.","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/roles/{role_id}/attach_permission_policies":{"post":{"tags":["Role","Permission Policy"],"summary":"Attach permission policies to a role","operationId":"attachPermissionPolicies","description":"IAM Action: `iam:UpdateRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","description":"An array of permission policy ID.","items":{"type":"string","example":"efd3bcc7-b61a-47ec-942b-b36bf249f1da"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/roles/{role_id}/detach_permission_policies":{"post":{"tags":["Role","Permission Policy"],"summary":"Detach permission policies of a role","operationId":"detachPermissionPolicies","description":"IAM Action: `iam:UpdateRole`, Resource: `arn:api7:iam:role/%s`","parameters":[{"name":"role_id","in":"path","required":true,"description":"Role ID.","example":"4b9b56d1-147e-49ef-bcaa-88cc5bcf403f","schema":{"minimum":1,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","description":"An array of permission policy ID.","items":{"type":"string","example":"efd3bcc7-b61a-47ec-942b-b36bf249f1da"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/permission_policies":{"post":{"tags":["Permission Policy"],"summary":"Create a permission policy","operationId":"createPermissionPolicy","description":"IAM Action: `iam:CreatePermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/*`","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Permission Policy"],"summary":"List all permission policies","operationId":"listPermissionPolicies","description":"IAM Action: `iam:GetPermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of permission policies.","items":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/permission_policies/{permission_policy_id}":{"get":{"tags":["Permission Policy"],"summary":"Get a permission policy","operationId":"getPermissionPolicy","description":"IAM Action: `iam:GetPermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"permission_policy_id","in":"path","required":true,"description":"Permission policy ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Permission Policy"],"summary":"Update a permission policy","operationId":"putPermissionPolicy","description":"IAM Action: `iam:UpdatePermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"permission_policy_id","in":"path","required":true,"description":"Permission policy ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"name":{"description":"The policy name.","example":"sample-policy","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"The permission policy type.","enum":["built_in","custom"]},"desc":{"description":"The description of the policy.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"description":"The labels of the policy.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}},"policy_document":{"type":"object","description":"Policy document.","properties":{"statement":{"type":"array","description":"The statements of the policy.","minItems":1,"items":{"type":"object","properties":{"effect":{"type":"string","description":"The effect of the statement.","enum":["allow","deny"]},"resources":{"type":"array","description":"The resources for requests.","items":{"type":"string","example":"gateway:GatewayGroup"},"minItems":1,"example":["arn:api7:gateway:servicetemplate/<.*>"]},"actions":{"type":"array","description":"The actions for requests.","items":{"anyOf":[{"type":"string"}]},"example":["gateway:GetServiceTemplate"],"minItems":1},"conditions":{"type":"object","description":"Rules for matching requests. The key is the condition name, the value is the condition expression \nwhich specifies the function name and parameter structure of condition.\n","anyOf":[{"title":"Condition for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}},"example":{"gateway_group_label":{"type":"MatchLabel","options":{"key":"env","operator":"exact_match","value":"prod"}}}},{"title":"Condition for Service","type":"object","properties":{"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Condition for permission policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"service_label":{"description":"Condition for service label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Role","type":"object","properties":{"role_label":{"description":"Condition for role label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for User","type":"object","properties":{"user_label":{"description":"Condition for user label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"permission_boundaries":{"description":"Condition for permission boundaries.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"AllOfStrings","enum":["AllOfStrings"]},"options":{"type":"array","description":"An array of options.","items":{"type":"string"}}},"example":{"type":"AllOfStrings","options":["permission_policy_a","permission_policy_b"]}}}},{"title":"Condition for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"consumer_label":{"description":"Condition for consumer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Secret","type":"object","properties":{"gateway_group_label":{"description":"Condition for gateway group label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}},"secret_provider_label":{"description":"Condition for secret provider label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Condition for contact point label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Condition for alert policy label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Developer","type":"object","properties":{"developer_label":{"description":"Condition for developer label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for API Product","type":"object","properties":{"api_product_label":{"description":"Condition for API product label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"Condition for CA certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Certificate","type":"object","properties":{"certificate_label":{"description":"Condition for certificate label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for SNI","type":"object","properties":{"sni_label":{"description":"Condition for SNI label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}},{"title":"Condition for Portal","type":"object","properties":{"portal_label":{"description":"Condition for portal label.","type":"object","properties":{"type":{"type":"string","description":"Type of condition.","example":"MatchLabel","enum":["MatchLabel"]},"options":{"type":"object","description":"Matching expressions.","properties":{"key":{"type":"string","description":"The label key to match against."},"operator":{"type":"string","description":"The comparison operator used for matching the label.","enum":["exact_match","contains_string","present"]},"value":{"type":"string","description":"The value to compare against the label."}}}}}}}]}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["statement"],"additionalProperties":false}},"required":["name","policy_document"]},{"type":"object","properties":{"id":{"description":"The policy ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Permission Policy"],"summary":"Delete a permission policy","operationId":"deletePermissionPolicy","description":"IAM Action: `iam:DeletePermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"permission_policy_id","in":"path","required":true,"description":"Permission policy ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/permission_policies/{permission_policy_id}/references":{"get":{"tags":["Permission Policy"],"summary":"List the Roles or Users that directly reference the Permission Policy","operationId":"listPermissionPolicyReferences","description":"IAM Action: `iam:GetPermissionPolicy`, Resource: `arn:api7:iam:permissionpolicy/%s`","parameters":[{"name":"permission_policy_id","in":"path","required":true,"description":"Permission policy ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","description":"Indicates which Role or User references the PermissionPolicy.","properties":{"type":{"type":"string","description":"Referenced by Role or User.","enum":["role","user"]},"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"example":"consumer role","description":"The object name.","type":"string","minLength":1,"maxLength":100}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/allow_access":{"post":{"tags":["Role","User"],"summary":"Check if a user has permissions on specific resources","operationId":"checkAllowAccess","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"title":"properties","type":"object","properties":{"resource":{"type":"string","description":"An ARN-style identifier that specifies one or multiple resources."},"action":{"type":"string","description":"A specific permission that defines what operation can be performed on the resource."},"context":{"type":"object","description":"Additional conditions or labels used to further narrow down which resources the action applies to, in combination with the resource definition.","anyOf":[{"title":"Context for Gateway Group","type":"object","properties":{"gateway_group_label":{"description":"Gateway group label.","type":"object","additionalProperties":{"type":"string"}}},"example":{"gateway_group_label":{"env":"prod"}}},{"title":"Context for Service","type":"object","properties":{"service_label":{"description":"Service label.","type":"object","additionalProperties":{"type":"string"}}},"example":{"service_label":{"version":"v1"}}},{"title":"Context for Published Service","type":"object","properties":{"gateway_group_label":{"description":"Gateway group label.","type":"object","additionalProperties":{"type":"string"}},"service_label":{"description":"Service label.","type":"object","additionalProperties":{"type":"string"}}},"example":{"gateway_group_label":{"env":"prod"},"service_label":{"version":"v2"}}},{"title":"Context for Role","type":"object","properties":{"role_label":{"description":"Role label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for Permission Policy","type":"object","properties":{"permission_policy_label":{"description":"Permission policy label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for User","type":"object","properties":{"user_label":{"description":"User label.","type":"object","additionalProperties":{"type":"string"}},"permission_boundaries":{"description":"A list of permission boundaries.","type":"array","items":{"type":"string"}}}},{"title":"Context for Consumer","type":"object","properties":{"gateway_group_label":{"description":"Gateway group label.","type":"object","additionalProperties":{"type":"string"}},"consumer_label":{"description":"Consumer label.","type":"object","additionalProperties":{"type":"string"}}},"example":{"gateway_group_label":{"env":"prod"},"consumer_label":{"team":"frontend"}}},{"title":"Context for Secret","type":"object","properties":{"gateway_group_label":{"description":"Gateway group label.","type":"object","additionalProperties":{"type":"string"}},"secret_provider_label":{"description":"Secret provider label.","type":"object","additionalProperties":{"type":"string"}}},"example":{"gateway_group_label":{"env":"prod"},"secret_provider_label":{"provider":"aws"}}},{"title":"Context for Contact Point","type":"object","properties":{"contact_point_label":{"description":"Contact point label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for Alert Policy","type":"object","properties":{"alert_policy_label":{"description":"Alert policy label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for Developer","type":"object","properties":{"developer_label":{"description":"Developer label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for API Product","type":"object","properties":{"api_product_label":{"description":"API product label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for CA Certificate","type":"object","properties":{"ca_certificate_label":{"description":"CA certificate label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for Certificate","type":"object","properties":{"certificate_label":{"description":"Certificate label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for SNI","type":"object","properties":{"sni_label":{"description":"SNI label.","type":"object","additionalProperties":{"type":"string"}}}},{"title":"Context for Portal","type":"object","properties":{"portal_label":{"description":"Portal label.","type":"object","additionalProperties":{"type":"string"}}}}]}},"required":["resource","action"]},"example":{"hasAccess":{"resource":"arn:api7:iam:role/767ff422-614b-4c0c-a4ea-287c26c773ba","action":"iam:UpdateCustomRole","context":{"role_label":{"platform":"external"}}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"boolean"}}}}]},"example":{"value":{"hasAccess":true}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/control_plane/prometheus/{prometheus_path}":{"get":{"tags":["Monitoring"],"summary":"Get data from Prometheus","operationId":"getPrometheusData","parameters":[{"name":"prometheus_path","in":"path","required":true,"description":"Prometheus HTTP API endpoint. See the [Prometheus docs](https://prometheus.io/docs/prometheus/latest/querying/api/) for the available URL query parameters for each endpoint.","schema":{"type":"string","anyOf":[{"title":"Fixed Endpoints","enum":["api/v1/query","api/v1/query_range","api/v1/format_query","api/v1/series","api/v1/labels"]},{"title":"Dynamic Label Values Endpoint","pattern":"^api/v1/label/[^/]+/values$"}]}}],"responses":{"200":{"description":"The Prometheus proxy response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","description":"The Prometheus raw data.","additionalProperties":true,"example":{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"label":"xxx"},"values":[[1684740675,1],[1684740690,2]]}]}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Monitoring"],"summary":"Get data from Prometheus","operationId":"getPrometheusDataWithPost","parameters":[{"name":"prometheus_path","in":"path","required":true,"description":"Prometheus HTTP API endpoint. See the [Prometheus docs](https://prometheus.io/docs/prometheus/latest/querying/api/) for the available body parameters for each endpoint.","schema":{"type":"string","anyOf":[{"title":"Fixed Endpoints","enum":["api/v1/query","api/v1/query_range","api/v1/format_query","api/v1/series","api/v1/labels"]},{"title":"Dynamic Label Values Endpoint","pattern":"^api/v1/label/[^/]+/values$"}]}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"The Prometheus proxy response.","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","description":"The Prometheus raw data.","additionalProperties":true,"example":{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"label":"xxx"},"values":[[1684740675,1],[1684740690,2]]}]}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/alert/policies":{"get":{"tags":["Alert"],"summary":"List all alert policies","operationId":"listAlertPolicies","description":"IAM Action: `gateway:GetAlertPolicy`, Resource: `arn:api7:gateway:alert/%s`","parameters":[{"name":"order_by","in":"query","description":"Index to order alert policies by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","name","severity"]}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"status","in":"query","required":false,"description":"Alert enablement status.","schema":{"type":"array","items":{"type":"string","enum":["enabled","disabled"]}}},{"name":"severity","in":"query","required":false,"description":"Alert severity.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The definition of an alert policy.","items":{"type":"object","properties":{"name":{"description":"The alert policy name.","example":"500 status alert","type":"string","minLength":1,"maxLength":100},"desc":{"description":"The alert policy description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enable":{"type":"boolean","description":"If true, enable the alert policy.","default":true},"check_interval":{"type":"integer","description":"The check interval for the alert policy. The unit is second.","minimum":1,"maximum":86400},"severity":{"type":"string","description":"The alert severity level.","default":"medium","enum":["high","medium","low"]},"trigger_logical_operator":{"type":"string","description":"The logical relationship between multiple triggers.","enum":["All","Any"],"default":"All"},"id":{"type":"string","description":"The alert policy ID.","minLength":1,"example":"509fd356-df70-480b-8622-c38e27cfdd99"},"created_at":{"description":"The create timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The update timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288235}}}}}}]}}}}}},"post":{"tags":["Alert"],"summary":"Create an alert policy","operationId":"createAlertPolicy","description":"IAM Action: `gateway:CreateAlertPolicy`, Resource: `arn:api7:gateway:alert/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","trigger_logical_operator","trigger_conditions"],"properties":{"name":{"description":"The alert policy name.","example":"500 status alert","type":"string","minLength":1,"maxLength":100},"desc":{"description":"The alert policy description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enable":{"type":"boolean","description":"If true, enable the alert policy.","default":true},"check_interval":{"type":"integer","description":"The check interval for the alert policy. The unit is second.","minimum":1,"maximum":86400},"severity":{"type":"string","description":"The alert severity level.","default":"medium","enum":["high","medium","low"]},"trigger_logical_operator":{"type":"string","description":"The logical relationship between multiple triggers.","enum":["All","Any"],"default":"All"},"trigger_conditions":{"type":"array","description":"The alert trigger conditions.","minItems":1,"items":{"type":"object","oneOf":[{"title":"Status Code","properties":{"event":{"type":"string","enum":["number_of_status_code","ratio_of_status_code"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"event_config":{"type":"object","description":"Alert event configurations.","properties":{"duration":{"type":"integer","description":"The duration time.","minimum":1,"example":60},"unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"},"http_status_code":{"type":"string","description":"The HTTP status code.","pattern":"[2-5]\\d{2}|[2-5]xx","example":"500"}},"required":["http_status_code","duration","unit"]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["larger_equal","larger_than"],"example":"larger_than"},"value":{"example":5,"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","event_config","operator","value","scope"]},{"title":"Certificate Expiry","properties":{"event":{"type":"string","enum":["ssl_certificate_will_expire_in","gateway_certificate_will_expire_in"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit","scope"]},{"title":"License Expiry","properties":{"event":{"type":"string","enum":["license_will_expire_in"],"description":"The event of the trigger."},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit"]},{"title":"Gateway Instance Offline","properties":{"event":{"type":"string","enum":["gateway_instance_offline"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["equal","larger_equal","larger_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"}},"required":["event","operator","value","value_unit","scope"]},{"title":"Data Plane Cores Exceeded","properties":{"event":{"type":"string","enum":["dp_core_exceeded"],"description":"The event of trigger."}}},{"title":"Numbers of Healthy Gateway Instances","properties":{"event":{"type":"string","enum":["number_of_healthy_gateway_instances"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"],"default":"less_equal"},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","scope","operator","value"]}]}},"notifications":{"type":"array","description":"The alert notifications.","items":{"type":"object","required":["type"],"oneOf":[{"title":"Email","type":"object","required":["type","subject","content"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["email"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"subject":{"type":"string","description":"The email subject.","minLength":1,"example":"API7 Notification"},"content":{"type":"string","description":"The email content.","minLength":1,"format":"go_template","example":"The xxx gateway group has received more than 5 responses with 500 status code in the last 60 seconds."}}},{"title":"Webhook","type":"object","required":["type","alert_message"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["webhook"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"alert_message":{"type":"string","description":"The alert message.","minLength":1,"format":"go_template"}}}]}}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The definition of an alert policy.","type":"object","allOf":[{"type":"object","required":["name","trigger_logical_operator","trigger_conditions"],"properties":{"name":{"description":"The alert policy name.","example":"500 status alert","type":"string","minLength":1,"maxLength":100},"desc":{"description":"The alert policy description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enable":{"type":"boolean","description":"If true, enable the alert policy.","default":true},"check_interval":{"type":"integer","description":"The check interval for the alert policy. The unit is second.","minimum":1,"maximum":86400},"severity":{"type":"string","description":"The alert severity level.","default":"medium","enum":["high","medium","low"]},"trigger_logical_operator":{"type":"string","description":"The logical relationship between multiple triggers.","enum":["All","Any"],"default":"All"},"trigger_conditions":{"type":"array","description":"The alert trigger conditions.","minItems":1,"items":{"type":"object","oneOf":[{"title":"Status Code","properties":{"event":{"type":"string","enum":["number_of_status_code","ratio_of_status_code"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"event_config":{"type":"object","description":"Alert event configurations.","properties":{"duration":{"type":"integer","description":"The duration time.","minimum":1,"example":60},"unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"},"http_status_code":{"type":"string","description":"The HTTP status code.","pattern":"[2-5]\\d{2}|[2-5]xx","example":"500"}},"required":["http_status_code","duration","unit"]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["larger_equal","larger_than"],"example":"larger_than"},"value":{"example":5,"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","event_config","operator","value","scope"]},{"title":"Certificate Expiry","properties":{"event":{"type":"string","enum":["ssl_certificate_will_expire_in","gateway_certificate_will_expire_in"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit","scope"]},{"title":"License Expiry","properties":{"event":{"type":"string","enum":["license_will_expire_in"],"description":"The event of the trigger."},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit"]},{"title":"Gateway Instance Offline","properties":{"event":{"type":"string","enum":["gateway_instance_offline"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["equal","larger_equal","larger_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"}},"required":["event","operator","value","value_unit","scope"]},{"title":"Data Plane Cores Exceeded","properties":{"event":{"type":"string","enum":["dp_core_exceeded"],"description":"The event of trigger."}}},{"title":"Numbers of Healthy Gateway Instances","properties":{"event":{"type":"string","enum":["number_of_healthy_gateway_instances"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"],"default":"less_equal"},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","scope","operator","value"]}]}},"notifications":{"type":"array","description":"The alert notifications.","items":{"type":"object","required":["type"],"oneOf":[{"title":"Email","type":"object","required":["type","subject","content"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["email"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"subject":{"type":"string","description":"The email subject.","minLength":1,"example":"API7 Notification"},"content":{"type":"string","description":"The email content.","minLength":1,"format":"go_template","example":"The xxx gateway group has received more than 5 responses with 500 status code in the last 60 seconds."}}},{"title":"Webhook","type":"object","required":["type","alert_message"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["webhook"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"alert_message":{"type":"string","description":"The alert message.","minLength":1,"format":"go_template"}}}]}}}}],"properties":{"id":{"type":"string","description":"The alert policy ID.","minLength":1,"example":"509fd356-df70-480b-8622-c38e27cfdd99"},"created_at":{"description":"The create timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The update timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/alert/policies/{alert_policy_id}":{"parameters":[{"name":"alert_policy_id","in":"path","required":true,"description":"Alert policy ID.","schema":{"type":"string"}}],"get":{"tags":["Alert"],"summary":"Get an alert policy","operationId":"getAlertPolicy","description":"IAM Action: `gateway:GetAlertPolicy`, Resource: `arn:api7:gateway:alert/%s`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The definition of an alert policy.","type":"object","allOf":[{"type":"object","required":["name","trigger_logical_operator","trigger_conditions"],"properties":{"name":{"description":"The alert policy name.","example":"500 status alert","type":"string","minLength":1,"maxLength":100},"desc":{"description":"The alert policy description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enable":{"type":"boolean","description":"If true, enable the alert policy.","default":true},"check_interval":{"type":"integer","description":"The check interval for the alert policy. The unit is second.","minimum":1,"maximum":86400},"severity":{"type":"string","description":"The alert severity level.","default":"medium","enum":["high","medium","low"]},"trigger_logical_operator":{"type":"string","description":"The logical relationship between multiple triggers.","enum":["All","Any"],"default":"All"},"trigger_conditions":{"type":"array","description":"The alert trigger conditions.","minItems":1,"items":{"type":"object","oneOf":[{"title":"Status Code","properties":{"event":{"type":"string","enum":["number_of_status_code","ratio_of_status_code"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"event_config":{"type":"object","description":"Alert event configurations.","properties":{"duration":{"type":"integer","description":"The duration time.","minimum":1,"example":60},"unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"},"http_status_code":{"type":"string","description":"The HTTP status code.","pattern":"[2-5]\\d{2}|[2-5]xx","example":"500"}},"required":["http_status_code","duration","unit"]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["larger_equal","larger_than"],"example":"larger_than"},"value":{"example":5,"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","event_config","operator","value","scope"]},{"title":"Certificate Expiry","properties":{"event":{"type":"string","enum":["ssl_certificate_will_expire_in","gateway_certificate_will_expire_in"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit","scope"]},{"title":"License Expiry","properties":{"event":{"type":"string","enum":["license_will_expire_in"],"description":"The event of the trigger."},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit"]},{"title":"Gateway Instance Offline","properties":{"event":{"type":"string","enum":["gateway_instance_offline"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["equal","larger_equal","larger_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"}},"required":["event","operator","value","value_unit","scope"]},{"title":"Data Plane Cores Exceeded","properties":{"event":{"type":"string","enum":["dp_core_exceeded"],"description":"The event of trigger."}}},{"title":"Numbers of Healthy Gateway Instances","properties":{"event":{"type":"string","enum":["number_of_healthy_gateway_instances"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"],"default":"less_equal"},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","scope","operator","value"]}]}},"notifications":{"type":"array","description":"The alert notifications.","items":{"type":"object","required":["type"],"oneOf":[{"title":"Email","type":"object","required":["type","subject","content"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["email"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"subject":{"type":"string","description":"The email subject.","minLength":1,"example":"API7 Notification"},"content":{"type":"string","description":"The email content.","minLength":1,"format":"go_template","example":"The xxx gateway group has received more than 5 responses with 500 status code in the last 60 seconds."}}},{"title":"Webhook","type":"object","required":["type","alert_message"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["webhook"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"alert_message":{"type":"string","description":"The alert message.","minLength":1,"format":"go_template"}}}]}}}}],"properties":{"id":{"type":"string","description":"The alert policy ID.","minLength":1,"example":"509fd356-df70-480b-8622-c38e27cfdd99"},"created_at":{"description":"The create timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The update timestamp of an alert policy.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Alert"],"summary":"Delete an alert policy","operationId":"deleteAlertPolicy","description":"IAM Action: `gateway:DeleteAlertPolicy`, Resource: `arn:api7:gateway:alert/%s`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Alert"],"summary":"Update an alert policy","operationId":"putAlertPolicy","description":"IAM Action: `gateway:UpdateAlertPolicy`, Resource: `arn:api7:gateway:alert/%s`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","trigger_logical_operator","trigger_conditions"],"properties":{"name":{"description":"The alert policy name.","example":"500 status alert","type":"string","minLength":1,"maxLength":100},"desc":{"description":"The alert policy description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enable":{"type":"boolean","description":"If true, enable the alert policy.","default":true},"check_interval":{"type":"integer","description":"The check interval for the alert policy. The unit is second.","minimum":1,"maximum":86400},"severity":{"type":"string","description":"The alert severity level.","default":"medium","enum":["high","medium","low"]},"trigger_logical_operator":{"type":"string","description":"The logical relationship between multiple triggers.","enum":["All","Any"],"default":"All"},"trigger_conditions":{"type":"array","description":"The alert trigger conditions.","minItems":1,"items":{"type":"object","oneOf":[{"title":"Status Code","properties":{"event":{"type":"string","enum":["number_of_status_code","ratio_of_status_code"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"event_config":{"type":"object","description":"Alert event configurations.","properties":{"duration":{"type":"integer","description":"The duration time.","minimum":1,"example":60},"unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"},"http_status_code":{"type":"string","description":"The HTTP status code.","pattern":"[2-5]\\d{2}|[2-5]xx","example":"500"}},"required":["http_status_code","duration","unit"]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["larger_equal","larger_than"],"example":"larger_than"},"value":{"example":5,"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","event_config","operator","value","scope"]},{"title":"Certificate Expiry","properties":{"event":{"type":"string","enum":["ssl_certificate_will_expire_in","gateway_certificate_will_expire_in"],"description":"The event of the trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit","scope"]},{"title":"License Expiry","properties":{"event":{"type":"string","enum":["license_will_expire_in"],"description":"The event of the trigger."},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["day"]}},"required":["event","operator","value","value_unit"]},{"title":"Gateway Instance Offline","properties":{"event":{"type":"string","enum":["gateway_instance_offline"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["equal","larger_equal","larger_than"]},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."},"value_unit":{"type":"string","description":"The duration unit.","enum":["hour","minute","second","year","month","day"],"example":"second"}},"required":["event","operator","value","value_unit","scope"]},{"title":"Data Plane Cores Exceeded","properties":{"event":{"type":"string","enum":["dp_core_exceeded"],"description":"The event of trigger."}}},{"title":"Numbers of Healthy Gateway Instances","properties":{"event":{"type":"string","enum":["number_of_healthy_gateway_instances"],"description":"The event of trigger."},"scope":{"type":"object","description":"The scope of the trigger.","properties":{"gateway_group_ids":{"type":"array","description":"An array of gateway group IDs.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"gateway_group_labels":{"description":"Key-value pairs of gateway group labels.","type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"example":{"version":"v2","env":"prod"}}},"oneOf":[{"required":["gateway_group_ids"],"title":"Gateway Group IDs"},{"required":["gateway_group_labels"],"title":"Gateway Group Labels"}]},"operator":{"type":"string","description":"The operator for the trigger condition.","enum":["less_equal","less_than"],"default":"less_equal"},"value":{"type":"integer","format":"int64","description":"The numeric threshold to trigger to alert."}},"required":["event","scope","operator","value"]}]}},"notifications":{"type":"array","description":"The alert notifications.","items":{"type":"object","required":["type"],"oneOf":[{"title":"Email","type":"object","required":["type","subject","content"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["email"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"subject":{"type":"string","description":"The email subject.","minLength":1,"example":"API7 Notification"},"content":{"type":"string","description":"The email content.","minLength":1,"format":"go_template","example":"The xxx gateway group has received more than 5 responses with 500 status code in the last 60 seconds."}}},{"title":"Webhook","type":"object","required":["type","alert_message"],"properties":{"type":{"type":"string","description":"The notification type.","enum":["webhook"]},"contact_point_ids":{"type":"array","uniqueItems":true,"description":"An array of contact point IDs.","items":{"minLength":1,"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"alert_message":{"type":"string","description":"The alert message.","minLength":1,"format":"go_template"}}}]}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"patch":{"tags":["Alert"],"summary":"Patch an alert policy","operationId":"patchAlertPolicy","description":"IAM Action: `gateway:UpdateAlertPolicy`, Resource: `arn:api7:gateway:alert/%s`","requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/alert/policies/histories":{"get":{"tags":["Alert"],"summary":"List all alert histories","operationId":"listAlertHistory","description":"IAM Action: `gateway:GetAlertPolicy`, Resource: `arn:api7:gateway:alert/*`","parameters":[{"name":"alert_policy_id","description":"Alert policy ID.","in":"query","schema":{"type":"string"}},{"name":"severity","in":"query","required":false,"description":"Alert severity.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"in":"query","name":"start_at","description":"Start at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"in":"query","name":"end_at","description":"End at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"order_by","description":"Index to order alerts by.","in":"query","schema":{"type":"string","default":"alert_time","enum":["alert_time"]}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of alert policy history.","items":{"type":"object","description":"","properties":{"id":{"type":"string","minLength":1,"description":"ID of the alert.","example":"ce6dbbb2-b8bc-4df8-b3e3-5af09c4a045f"},"alert_policy_id":{"type":"string","description":"Alert policy ID.","minLength":1,"example":"72a2186a-f249-4da1-a2ec-a186150895b2"},"alert_policy_name":{"type":"string","description":"The alert policy name.","example":"500 status code"},"trigger_gateway_groups":{"type":"array","description":"An array of gateway groups that triggered the alerts.","items":{"type":"object","properties":{"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"}}}},"severity":{"type":"string","description":"The alert severity level.","enum":["high","medium","low"]},"alert_time":{"type":"integer","description":"The alert time."},"alert_detail":{"type":"string","description":"The alert detail."},"notification_logs":{"type":"array","description":"An array of notification logs.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"contact_point_name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test"},"resource_type":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]},"resource_id":{"description":"The resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"resource_name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"status":{"type":"string","description":"Notification sending status.","enum":["success","failed"],"example":"failed"},"send_time":{"type":"integer","example":1759649130,"description":"The time when the notification is sent."},"request":{"type":"string","description":"Request information.","example":"{\"from\": \"test.send@api7.ai\", \"to\": \"test.receive@api7.ai\", \"subject\": \"API7 Notification\", \"content\": \"This is a test notification.\"}"},"response":{"type":"string","description":"Response from the server.","example":"450 The domain must be verified in your account to send emails."}}}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/audit_logs":{"get":{"tags":["Audit Logs"],"summary":"List all audit logs","operationId":"listAuditLogs","description":"IAM Action: `iam:GetAudit`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"event_type","in":"query","description":"The event type. Event types can be looked up using the `/api/audit_logs/event_types` endpoint.","example":"AddConsumerCredential","schema":{"type":"string"}},{"name":"operator_id","description":"The user ID of the operator.","in":"query","schema":{"type":"string"}},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"resource_id","description":"The resource ID.","in":"query","schema":{"type":"string"}},{"in":"query","name":"start_at","description":"Start at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"in":"query","name":"end_at","description":"End at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"name":"order_by","in":"query","schema":{"type":"string","default":"event_time","description":"Index to order audit logs by.","enum":["event_time"]}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of audit logs.","items":{"type":"object","properties":{"event_time":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"operator_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"operator":{"description":"Operator details.","type":"object","properties":{"id":{"description":"Operator ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"username":{"type":"string","description":"Operator username.","example":"admin"},"name":{"type":"string","description":"Operator name.","example":"admin"},"email":{"type":"string","description":"Operator email.","example":"test@email.com"},"email_verified":{"type":"boolean","description":"If true, the operator email is verified."}}},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"source":{"type":"string","description":"Source of the alert log.","enum":["dashboard","api"]},"token_name":{"type":"string","description":"The name of the token used for authentication.","example":"docs"},"event_type":{"description":"The event type.","type":"string"},"resource_id":{"description":"The resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ip_address":{"description":"The IP address.","type":"string","example":"10.15.101.5"},"error_message":{"description":"The error message.","type":"string","example":"Duplicate key in test2's credentials"},"http_request":{"type":"object","description":"HTTP request details.","properties":{"method":{"description":"HTTP request method.","type":"string","example":"POST"},"uri":{"description":"HTTP request URI path.","type":"string","example":"/apisix/admin/consumers/test2/credentials?gateway_group_id=default"},"body":{"description":"HTTP request body.","type":"object","example":{"name":"test","plugins":{"key-auth":{"key":"********"}}}},"user_agent":{"description":"HTTP request user agent.","type":"string","example":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"}}},"http_response":{"type":"object","description":"HTTP response details.","properties":{"status_code":{"type":"integer","description":"HTTP response status code.","example":400},"body":{"type":"object","description":"HTTP response body.","example":{}}}}}}}}}]}}}}}}},"/api/audit_logs/config":{"get":{"tags":["Audit Config"],"summary":"Get the configuration for audit logs.","operationId":"getAuditConfig","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"retention_days":{"type":"integer","description":"The number of days to retain audit logs."}}}}}]}}}}}}},"/api/audit_logs/event_types":{"get":{"tags":["Audit Logs"],"summary":"List all event types of audit logs","operationId":"listAuditLogEventTypes","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of event types of audit logs.","items":{"type":"object","properties":{"key":{"type":"string","description":"The key of the audit log event type.","example":"UpdateContactPoint"},"name":{"type":"string","description":"The name of the audit log event type.","example":"Update Contact Point"}}}}}}]}}}}}}},"/api/audit_logs/export":{"get":{"tags":["Audit Logs"],"summary":"Export all audit logs","operationId":"exportAuditLogs","description":"IAM Action: `iam:ExportAudits`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"event_type","in":"query","description":"The event type. Event types can be looked up using the `/api/audit_logs/event_types` endpoint.","example":"AddConsumerCredential","schema":{"type":"string"}},{"name":"operator_id","description":"The user ID of the operator.","in":"query","schema":{"type":"string"}},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"resource_id","description":"The resource ID.","in":"query","schema":{"type":"string"}},{"in":"query","name":"start_at","description":"Start at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"in":"query","name":"end_at","description":"End at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"in":"query","name":"format","required":true,"description":"Format to export.","schema":{"type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"","content":{"application/json":{},"text/csv":{}}}}}},"/api/tokens":{"post":{"tags":["Token"],"summary":"Create a token","operationId":"createToken","requestBody":{"content":{"application/json":{"schema":{"description":"Create a token.","type":"object","required":["name","expires_at"],"properties":{"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"id":{"description":"The token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"created_at":{"description":"The time when a token is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a token is updated.","type":"integer","minimum":0,"example":1742288235},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235},"user_id":{"description":"The user ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"org_id":{"description":"The organization ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}},{"type":"object","properties":{"token":{"type":"string","description":"The created token.","example":"a7ee-gyb4v2Ryc2xfh9w707Z7r6IW3E0c1D7hu7x9ZT8Fxxxxx3G4Q9-5b101b5c7fc34e988f1ff9979cc191e1"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Token"],"summary":"List all tokens","operationId":"listTokens","parameters":[{"name":"order_by","in":"query","description":"Index to order the tokens by.","schema":{"type":"string","default":"created_at","enum":["created_at","updated_at","expires_at"]}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of tokens.","items":{"allOf":[{"type":"object","properties":{"id":{"description":"The token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"created_at":{"description":"The time when a token is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a token is updated.","type":"integer","minimum":0,"example":1742288235},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235},"user_id":{"description":"The user ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"org_id":{"description":"The organization ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}},{"type":"object","properties":{"user_name":{"description":"The user name.","example":"test-user","type":"string","minLength":1,"maxLength":100},"last_used_at":{"description":"The last time when the token is used.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/tokens/{token_id}":{"parameters":[{"name":"token_id","description":"The unique identifier of the token.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"get":{"tags":["Token"],"summary":"Get a token","operationId":"getToken","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"created_at":{"description":"The time when a token is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a token is updated.","type":"integer","minimum":0,"example":1742288235},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235},"user_id":{"description":"The user ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"org_id":{"description":"The organization ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Token"],"summary":"Update a token","operationId":"updateToken","requestBody":{"content":{"application/json":{"schema":{"description":"Update a token.","type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"created_at":{"description":"The time when a token is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a token is updated.","type":"integer","minimum":0,"example":1742288235},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235},"user_id":{"description":"The user ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"org_id":{"description":"The organization ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Token"],"summary":"Delete a token","operationId":"deleteToken","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/tokens/{token_id}/regenerate":{"parameters":[{"name":"token_id","description":"The unique identifier of the token.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"put":{"tags":["Token"],"summary":"Regenerate a token","operationId":"regenerateToken","requestBody":{"content":{"application/json":{"schema":{"description":"Regenerate a token.","type":"object","required":["expires_at"],"properties":{"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"id":{"description":"The token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","maxLength":40,"description":"The token name.","example":"test-token"},"created_at":{"description":"The time when a token is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a token is updated.","type":"integer","minimum":0,"example":1742288235},"expires_at":{"type":"integer","format":"int64","description":"The expiration timestamp of the token. `0` means the token will not expire.","example":1752288235},"user_id":{"description":"The user ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"org_id":{"description":"The organization ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}},{"type":"object","properties":{"token":{"type":"string","description":"The created token.","example":"a7ee-gyb4v2Ryc2xfh9w707Z7r6IW3E0c1D7hu7x9ZT8Fxxxxx3G4Q9-5b101b5c7fc34e988f1ff9979cc191e1"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups":{"get":{"tags":["Gateway Group"],"summary":"List all gateway groups","operationId":"listGatewayGroups","description":"IAM Action: `gateway:GetGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"name","description":"Gateway group name.","example":"default","in":"query","schema":{"minimum":1,"type":"string"}},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of gateway groups.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"type":{"type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group. \n"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"config":{"type":"object","description":"Control plane details.","properties":{"control_plane_key_prefix":{"type":"string","description":"The prefix of the key in the control plane (etcd). The pattern is `/gateway_groups/{gateway_group_id}`.","example":"/gateway_groups/us-west-1"},"control_plane_user":{"type":"string","description":"The etcd user.","example":"etcd_user"},"control_plane_password":{"type":"string","description":"The etcd password.","example":"safe_password"},"image_tag":{"type":"string","description":"The API7 gateway version.","example":"latest"}}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Gateway Group"],"summary":"Create a gateway group","operationId":"createGatewayGroup","description":"IAM Action: `gateway:CreateGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"type":{"default":"api7_gateway","type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group.\n"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"type":{"type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group. \n"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"config":{"type":"object","description":"Control plane details.","properties":{"control_plane_key_prefix":{"type":"string","description":"The prefix of the key in the control plane (etcd). The pattern is `/gateway_groups/{gateway_group_id}`.","example":"/gateway_groups/us-west-1"},"control_plane_user":{"type":"string","description":"The etcd user.","example":"etcd_user"},"control_plane_password":{"type":"string","description":"The etcd password.","example":"safe_password"},"image_tag":{"type":"string","description":"The API7 gateway version.","example":"latest"}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/count/{resource_type}":{"get":{"tags":["Gateway Group"],"summary":"Count resources by type in each gateway group","operationId":"countResourceByGatewayGroup","parameters":[{"name":"resource_type","in":"path","required":true,"description":"Resource type.","schema":{"type":"string","enum":["ssl","consumer","gateway_instance"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"type":{"type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group. \n"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"config":{"type":"object","description":"Control plane details.","properties":{"control_plane_key_prefix":{"type":"string","description":"The prefix of the key in the control plane (etcd). The pattern is `/gateway_groups/{gateway_group_id}`.","example":"/gateway_groups/us-west-1"},"control_plane_user":{"type":"string","description":"The etcd user.","example":"etcd_user"},"control_plane_password":{"type":"string","description":"The etcd password.","example":"safe_password"},"image_tag":{"type":"string","description":"The API7 gateway version.","example":"latest"}}}}},{"type":"object","properties":{"count":{"type":"integer","description":"The number of resources."}}}]}}}}]}}}}}}},"/api/gateway_groups/{gateway_group_id}/ssls/{ssl_id}/usage":{"get":{"tags":["Gateway Group"],"summary":"List SSL Usage in a gateway group","operationId":"listSSLUsages","description":"IAM Action: `gateway:GetSSLCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"ssl_id","description":"The unique identifier of the SSL object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of SSL Usage.","items":{"description":"SSL usage response.","type":"object","allOf":[{"type":"object","properties":{"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"upstream_name":{"type":"string","description":"Name of the upstream that uses SSL.","example":"sample-upstream"},"ssl_id":{"type":"string","description":"ID of the SSL that upstream uses.","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/snis/{sni_id}/usage":{"get":{"tags":["Gateway Group"],"summary":"List SNI Usage in a gateway group","operationId":"listSNIUsages","description":"IAM Action: `gateway:GetSNI`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"sni_id","description":"The unique identifier of the SNI object.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of SNI Usage.","items":{"type":"object","properties":{"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"hosts":{"type":"array","description":"Hostnames related to the SNIs.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/certificates/{certificate_id}/usage":{"get":{"tags":["Gateway Group"],"summary":"List Certificate Usage in a gateway group","operationId":"listCertificateUsages","description":"IAM Action: `gateway:GetCertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s` ","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"certificate_id","description":"The unique identifier of the Certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"resource_type","in":"query","required":false,"description":"Type of resource referencing the certificate.","schema":{"type":"string","enum":["sni","upstream"],"default":"sni"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of SNI Usage.","items":{"oneOf":[{"title":"SNI","type":"object","properties":{"sni_id":{"description":"ID of the SNI.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"sni_name":{"type":"string","description":"Name of the SNI.","example":"sample-sni"},"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"hosts":{"type":"array","description":"Hostnames related to the SNIs.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}},{"title":"Upstream","type":"object","properties":{"upstream_id":{"type":"string","description":"Upstream ID.","example":"ecb86508-7484-4298-9440-ac7a60116997"},"upstream_name":{"type":"string","description":"Name of the upstream that uses SSL.","example":"sample-upstream"},"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/ca_certificates/{ca_certificate_id}/usage":{"get":{"tags":["Gateway Group"],"summary":"List CA Certificate Usage in a gateway group","operationId":"listCACertificateUsages","description":"IAM Action: `gateway:GetCACertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"ca_certificate_id","description":"The unique identifier of the certificate.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"resource_type","in":"query","required":false,"description":"Type of resource referencing the certificate.","schema":{"type":"string","enum":["sni","upstream"],"default":"sni"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of SNI Usage.","items":{"oneOf":[{"title":"SNI","type":"object","properties":{"sni_id":{"description":"ID of the SNI.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"sni_name":{"type":"string","description":"Name of the SNI.","example":"sample-sni"},"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"hosts":{"type":"array","description":"Hostnames related to the SNIs.","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}}},{"title":"Upstream","type":"object","properties":{"upstream_id":{"type":"string","description":"Upstream ID.","example":"ecb86508-7484-4298-9440-ac7a60116997"},"upstream_name":{"type":"string","description":"Name of the upstream that uses SSL.","example":"sample-upstream"},"service_id":{"description":"ID of the service template.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"description":"Name of the service.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/certificates/exists":{"post":{"tags":["Gateway Group"],"summary":"Check if a certificate exists in a gateway group","description":"IAM Action: `gateway:GetCACertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","operationId":"checkCertificateExists","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string","example":"1cf56bfe-7727-4584-93f2-9d09271bd42a"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/ca_certificates/exists":{"post":{"tags":["Gateway Group"],"summary":"Check if a CA certificate exists in a gateway group","description":"IAM Action: `gateway:GetCACertificate`, Resource: `arn:api7:gateway:gatewaygroup/%s`","operationId":"checkCACertificateExists","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The Certificate response format, with filtering the sensitive fields\nand some other fields.","type":"object","allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"associated_snis":{"type":"array","description":"The SNI IDs associated with the certificate.","items":{"type":"string"}},"exptime":{"type":"integer","description":"The SSL certificate expire time.","example":1735680000},"validity_start":{"type":"integer","description":"The earliest time when the SSL certificate is used.","example":1714540800},"validity_end":{"type":"integer","description":"The latest time when the SSL certificate is used.","example":1730419200}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/secret_providers/{secret_provider}/{secret_provider_id}/usage":{"get":{"tags":["Gateway Group"],"summary":"List Secret Provider Usage in a gateway group","operationId":"listSecretProviderUsages","description":"IAM Action: `gateway:GetSecretProvider`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"secret_provider","description":"Secret provider.","in":"path","required":true,"schema":{"type":"string","enum":["vault","aws","kubernetes"]}},{"name":"secret_provider_id","description":"Secret provider ID.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"resource_type","in":"query","required":false,"description":"Resource type.","schema":{"type":"string","enum":["consumer","service","route","ssl","global_rule","consumer_credential","certificate"]}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of Secret Usage.","items":{"description":"secret usage response","type":"object","allOf":[{"type":"object","properties":{"parent_id":{"type":"string","description":"Parent ID, availble for `route` and `consumer_credential` resource types. For instance, when the resource type is `route`, the parent ID is the service ID.","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"resource_type":{"type":"string","description":"Type of the resource that uses secret.","example":"route"},"resource_id":{"description":"ID of the resource that uses secret.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"resource_name":{"description":"Resource name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"field":{"type":"string","description":"Field in the resource that references the secret.","example":"key-auth/key"},"id":{"description":"ID of the secret provider.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"secret_manager":{"type":"string","description":"Secret manager.","enum":["vault","aws","kubernetes"],"example":"vault"}}},{"type":"object","properties":{"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}":{"delete":{"tags":["Gateway Group"],"summary":"Delete a gateway group","operationId":"deleteGatewayGroup","description":"IAM Action: `gateway:DeleteGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Gateway Group"],"summary":"Update a gateway group","operationId":"putGatewayGroup","description":"IAM Action: `gateway:UpdateGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","description"],"properties":{"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"type":{"type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group. \n"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"config":{"type":"object","description":"Control plane details.","properties":{"control_plane_key_prefix":{"type":"string","description":"The prefix of the key in the control plane (etcd). The pattern is `/gateway_groups/{gateway_group_id}`.","example":"/gateway_groups/us-west-1"},"control_plane_user":{"type":"string","description":"The etcd user.","example":"etcd_user"},"control_plane_password":{"type":"string","description":"The etcd password.","example":"safe_password"},"image_tag":{"type":"string","description":"The API7 gateway version.","example":"latest"}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"get":{"tags":["Gateway Group"],"summary":"Get a gateway group","operationId":"getGatewayGroup","description":"IAM Action: `gateway:GetGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"type":{"type":"string","enum":["api7_gateway","api7_ingress_controller"]},"name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"description":{"type":"string","description":"Gateway group description.","example":"Gateway group description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"enforce_service_publishing":{"type":"boolean","description":"If ture, bypass version control and rollback when updating services directly on a gateway group. \n"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"config":{"type":"object","description":"Control plane details.","properties":{"control_plane_key_prefix":{"type":"string","description":"The prefix of the key in the control plane (etcd). The pattern is `/gateway_groups/{gateway_group_id}`.","example":"/gateway_groups/us-west-1"},"control_plane_user":{"type":"string","description":"The etcd user.","example":"etcd_user"},"control_plane_password":{"type":"string","description":"The etcd password.","example":"safe_password"},"image_tag":{"type":"string","description":"The API7 gateway version.","example":"latest"}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/admin_key":{"get":{"tags":["Gateway Group"],"summary":"Get the admin key for a gateway group.","operationId":"getAdminKey","description":"IAM Action: `gateway:GetAdminKey`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"key":{"type":"string","description":"The admin key in plain text.","example":"a7ee-iBTTIAOm76y2Q7h2xxxxx1uCyVQ3HY36l6hH98igxxxxxx-a591ad8b17db4f88b24b3c5602356971"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}}}},"put":{"tags":["Gateway Group"],"summary":"Generate an admin key for a gateway group","operationId":"generateAdminKey","description":"IAM Action: `gateway:UpdateGatewayGroup`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"key":{"type":"string","description":"The admin key in plain text.","example":"a7ee-iBTTIAOm76y2Q7h2xxxxx1uCyVQ3HY36l6hH98igxxxxxx-a591ad8b17db4f88b24b3c5602356971"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/deployment/docker":{"get":{"tags":["Gateway Group","Gateway Instance"],"summary":"Generate a script to install the gateway instance by Docker","operationId":"generateInstallScriptForDocker","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"dp_manager_address","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"The IP address of the control plane.","example":"10.15.101.5"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"validity_period","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10950,"default":3650,"description":"The validity period of the certificate in days."}},{"name":"image","in":"query","required":false,"description":"Docker image.","schema":{"type":"string","minLength":1},"example":"api7/api7-ee-3-gateway"},{"name":"http_port","in":"query","required":false,"description":"The HTTP port of the gateway.","schema":{"type":"integer","default":9080}},{"name":"https_port","in":"query","required":false,"description":"The HTTPS port of the gateway.","schema":{"type":"integer","default":9443}},{"name":"name","in":"query","required":false,"description":"The hostname of the gateway.","schema":{"type":"string","minLength":1}},{"name":"extra_args[]","description":"Additional docker run arguments.","in":"query","required":false,"style":"form","schema":{"type":"array","items":{"type":"string"}},"example":["a=b","c=d"]}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"},"example":"docker run -d -e API7_CONTROL_PLANE_ENDPOINTS='[\"https://12.12.123.123:31344\"]' \\\n  -e API7_GATEWAY_GROUP_SHORT_ID=tabqbdwnahkqo \\\n  -e API7_CONTROL_PLANE_CERT=\"-----BEGIN CERTIFICATE-----\n  MIIBhjCCATigAwIBAgICBAAwBQYDK2VwMEQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI\n  ...\n  -----END CERTIFICATE-----\" \\\n  -e API7_CONTROL_PLANE_KEY=\"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----\" \\\n  -e API7_CONTROL_PLANE_CA=\"-----BEGIN CERTIFICATE-----\n  MIIBdTCCASegAwIBAgIQVXqTFu/hH4caZptKdGp04zAFBgMrZXAwRDELMAkGA1UE\n  ...\n  -----END CERTIFICATE-----\" \\\n  -e API7_CONTROL_PLANE_SNI=\"api7ee3-dp-manager\" \\\n  -p 9080:9080 \\\n  -p 9443:9443 \\\n  api7/api7-ee-3-gateway:latest\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/deployment/docker-compose":{"get":{"tags":["Gateway Group","Gateway Instance"],"summary":"Generate a script to install the gateway instance by Docker Compose","operationId":"generateInstallScriptForDockerCompose","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"dp_manager_address","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"The IP address of the control plane.","example":"10.15.101.5"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"validity_period","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10950,"default":3650,"description":"The validity period of the certificate in days."}},{"name":"image","in":"query","required":false,"description":"Docker image.","schema":{"type":"string","minLength":1},"example":"api7/api7-ee-3-gateway"},{"name":"http_port","in":"query","required":false,"description":"The HTTP port of the gateway.","schema":{"type":"integer","default":9080}},{"name":"https_port","in":"query","required":false,"description":"The HTTPS port of the gateway.","schema":{"type":"integer","default":9443}},{"name":"name","in":"query","required":false,"description":"The name of the docker compose container and service.","schema":{"type":"string","default":"api7-ee-3-gateway","minLength":1}},{"name":"extra_args[]","description":"Additional docker run arguments.","in":"query","required":false,"style":"form","schema":{"type":"array","items":{"type":"string"}},"example":["a=b","c=d"]}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"},"example":"services:\n  gateway:\n    image: api7/api7-ee-3-gateway:latest\n    container_name: gateway\n    hostname: gateway\n    restart: always\n    ports:\n      - \"9080:9080\"\n      - \"9443:9443\"\n    environment:\n      API7_DP_MANAGER_ENDPOINTS: '[\"https://12.12.123.123:31344\"]'\n      API7_GATEWAY_GROUP_SHORT_ID: \"oybqauztthfao\"\n      API7_DP_MANAGER_SNI: \"api7ee3-dp-manager\"\n      API7_DP_MANAGER_CERT: |\n        -----BEGIN CERTIFICATE-----\n        MIIBhjCCATigAwIBAgICBAAwBQYDK2VwMEQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI\n        ...\n        -----END CERTIFICATE-----\n\n      API7_DP_MANAGER_KEY: |\n        -----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----\n\n      API7_CONTROL_PLANE_CA: |\n        -----BEGIN CERTIFICATE-----\n        MIIBdTCCASegAwIBAgIQVXqTFu/hH4caZptKdGp04zAFBgMrZXAwRDELMAkGA1UE\n        ...\n        -----END CERTIFICATE-----\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/deployment/helm/script":{"get":{"tags":["Gateway Group","Gateway Instance"],"summary":"Generate a script to install the gateway instance by Helm in Kubernetes","operationId":"generateInstallScriptForHelm","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"dp_manager_address","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"The IP address of the control plane.","example":"10.15.101.5"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"validity_period","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10950,"default":3650,"description":"The validity period of the certificate in days."}},{"name":"name","in":"query","required":true,"description":"Gateway name.","schema":{"type":"string"}},{"name":"namespace","in":"query","required":true,"description":"Gateway namespace.","schema":{"type":"string"}},{"name":"service_account","in":"query","required":false,"description":"Service account to install the gateway.","schema":{"type":"string"}},{"name":"replicas","in":"query","required":false,"description":"The number of replicas.","schema":{"type":"integer","default":1}},{"name":"workers","in":"query","required":false,"description":"The number of worker processes for the gateway instance. By default, it is configured to match the number of CPU cores on the server hosting the gateway instance.","example":5,"schema":{"type":"integer"}},{"name":"cpu_limit","in":"query","required":false,"description":"The CPU limit in number of cores.","example":"6","schema":{"type":"string"}},{"name":"memory_limit","in":"query","required":false,"description":"The memory limit. Use the format `<number><unit>`.","example":"6Gi","schema":{"type":"string"}},{"name":"extra_values[]","in":"query","description":"Extra values to be passed to the Helm chart, in the form of `key=value`.","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}},"example":["a=b","c=d"]}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"},"example":"helm repo add api7 https://charts.api7.ai\nhelm repo update\ncat > /tmp/tls.crt <<EOF\n-----BEGIN CERTIFICATE-----\nMIIBhjCCATigAwIBAgICBAAwBQYDK2VwMEQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI\n...\n-----END CERTIFICATE-----\nEOF\ncat > /tmp/tls.key <<EOF\n-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----\nEOF\ncat > /tmp/ca.crt <<EOF\n-----BEGIN CERTIFICATE-----\nMIIBdTCCASegAwIBAgIQVXqTFu/hH4caZptKdGp04zAFBgMrZXAwRDELMAkGA1UE\n...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBeDCCASqgAwIBAgIRAPNxgFOmSXOwtIdZOgynsLswBQYDK2VwMEQxCzAJBgNV\n...\n-----END CERTIFICATE-----\nEOF\nkubectl create namespace default --dry-run=client -o yaml | kubectl apply -f -\nkubectl create secret generic -n default name-tls --from-file=tls.crt=/tmp/tls.crt --from-file=tls.key=/tmp/tls.key --from-file=ca.crt=/tmp/ca.crt\nhelm upgrade --install -n default --create-namespace name api7/gateway \\\n  --set \"etcd.auth.tls.enabled=true\" \\\n  --set \"etcd.auth.tls.existingSecret=name-tls\" \\\n  --set \"etcd.auth.tls.certFilename=tls.crt\" \\\n  --set \"etcd.auth.tls.certKeyFilename=tls.key\" \\\n  --set \"etcd.auth.tls.sni=api7ee3-dp-manager\" \\\n  --set \"etcd.auth.tls.verify=true\" \\\n  --set \"gateway.tls.existingCASecret=name-tls\" \\\n  --set \"gateway.tls.certCAFilename=ca.crt\" \\\n  --set \"apisix.extraEnvVars[0].name=API7_GATEWAY_GROUP_SHORT_ID\" \\\n  --set \"apisix.extraEnvVars[0].value=tabqbdwnahkqo\" \\\n  --set \"etcd.host[0]=https://12.12.123.123:31344\" \\\n  --set \"apisix.resources.limits.cpu=4\" \\\n  --set \"apisix.resources.limits.memory=7168Mi\" \\\n  --set \"apisix.replicaCount=1\" \\\n  --set \"apisix.image.repository=api7/api7-ee-3-gateway\" \\\n  --set \"apisix.image.tag=latest\"\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/deployment/helm/yaml":{"get":{"tags":["Gateway Group","Gateway Instance"],"summary":"Generate a values file for the gateway's Kubernetes Helm chart","operationId":"generateInstallYamlForHelm","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"dp_manager_address","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"The IP address of the control plane.","example":"10.15.101.5"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"validity_period","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10950,"default":3650,"description":"The validity period of the certificate in days."}},{"name":"name","in":"query","required":true,"description":"Gateway name.","schema":{"type":"string"}},{"name":"namespace","in":"query","required":true,"description":"Gateway namespace.","schema":{"type":"string"}},{"name":"service_account","in":"query","required":false,"description":"Service account to install the gateway.","schema":{"type":"string"}},{"name":"replicas","in":"query","required":false,"description":"The number of replicas.","schema":{"type":"integer","default":1}},{"name":"workers","in":"query","required":false,"description":"The number of worker processes for the gateway instance. By default, it is configured to match the number of CPU cores on the server hosting the gateway instance.","example":5,"schema":{"type":"integer"}},{"name":"cpu_limit","in":"query","required":false,"description":"The CPU limit in number of cores.","example":"6","schema":{"type":"string"}},{"name":"memory_limit","in":"query","required":false,"description":"The memory limit. Use the format `<number><unit>`.","example":"6Gi","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"},"example":"apiVersion: v1\ndata:\n  tls.crt: LS0tLS1CRUdJTiB...\n  tls.key: LS0tLS1CRUdJTiB...\n  ca.crt: LS0tLS1CRUdJTiB...\nkind: Secret\nmetadata:\n  name: name-tls\n  namespace: default\ntype: kubernetes.io/tls\n---\napisix:\n  replicaCount: 1\n  image:\n    repository: api7/api7-ee-3-gateway\n    tag: dev\n  extraEnvVars:\n  - name: API7_GATEWAY_GROUP_SHORT_ID\n    value: \"tabqbdwnahkqo\"\netcd:\n  host:\n  - \"https://12.12.123.123:31344\"\n  auth:\n    tls:\n      enabled: true\n      existingSecret: name-tls\n      certFilename: tls.crt\n      certKeyFilename: tls.key\n      sni: api7ee3-dp-manager\n      verify: true\ngateway:\n  tls:\n    existingCASecret: name-tls\n    certCAFilename: ca.crt\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/ingress/script":{"get":{"tags":["Gateway Group"],"summary":"Generate a script to install gateway API resources for ingress gateway group","operationId":"generateInstallIngressScript","description":"IAM Action: `gateway:GetAdminKey`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"name","in":"query","required":true,"description":"Ingress resource name.","schema":{"type":"string"}},{"name":"namespace","in":"query","required":true,"description":"Namespace to install the ingress resources.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["gateway-api","ingress","ingress-v1beta1"],"default":"gateway-api"}}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"},"example":"kubectl create namespace default --dry-run=client -o yaml | kubectl apply -f -\necho \"\n---\napiVersion: gateway.networking.k8s.io/v1\nkind: GatewayClass\nmetadata:\n  name: apisix\nspec:\n  controllerName: apisix.apache.org/apisix-ingress-controller\n---\napiVersion: apisix.apache.org/v1alpha1\nkind: GatewayProxy\nmetadata:\n  name: name\nspec:\n  provider:\n    type: ControlPlane\n    controlPlane:\n      endpoints:\n        - [\"12.12.123.123\"]\n      auth:\n        type: AdminKey\n        adminKey:\n          value: a7adm-ZgR85iE...\n---\napiVersion: gateway.networking.k8s.io/v1\nkind: Gateway\nmetadata:\n  name: apisix\nspec:\n  gatewayClassName: apisix\n  listeners:\n    - name: http\n      protocol: HTTP\n      port: 80\n  infrastructure:\n    parametersRef:\n      group: apisix.apache.org\n      kind: GatewayProxy\n      name: name\n\" | kubectl apply -f - -n default\n"}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/ingress/step1":{"get":{"tags":["Gateway Group"],"summary":"Generate script to install the gateway api resources for ingress gateway group.","operationId":"generateInstallIngressStep1","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"namespace","in":"query","description":"Namespace to install the ingress controller.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Helm release name.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/instances/{gateway_instance_id}":{"delete":{"tags":["Gateway Instance"],"summary":"Delete gateway instance","operationId":"deleteGatewayInstance","description":"IAM Action: `gateway:DeleteGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"gateway_instance_id","in":"path","required":true,"description":"Gateway instance ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/dp_client_certificates":{"post":{"tags":["Gateway Instance","Gateway Group"],"summary":"Issue a data plane certificate on a gateway group","operationId":"issueDataplaneCertificate","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"validity_period":{"type":"integer","minimum":1,"maximum":10950,"default":3650,"description":"The validity period of the certificate in days."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"Certificate ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"certificate":{"type":"string","description":"Certificate content.","example":"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n"},"private_key":{"type":"string","description":"Private key content.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----\\n"},"expiry":{"description":"Expiration of the certificate.","type":"integer","minimum":0,"example":1742288230}}}}}]}}}}}}},"/api/gateway_groups/{gateway_group_id}/services":{"get":{"tags":["Gateway Group","Published Service"],"deprecated":true,"summary":"List all published services in a gateway group","operationId":"listPublishedServicesDeprecated","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s` Deprecated, you can use `GET /apisix/admin/services` for instead.","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"unhealthy_nodes","description":"Filter of services based on whether unhealthy nodes exist. `unhealthy_nodes_exists` filters for services where unhealthy nodes exist. `no_unhealthy_nodes` filters for servies where there are no unhealthy nodes.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["unhealthy_nodes_exists","no_unhealthy_nodes"]}}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"order_by","in":"query","description":"Index to order published services by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","publish_time","name"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"hosts","in":"query","schema":{"type":"array","items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}}},{"name":"type","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["http","stream"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of published services.","items":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"unhealthy_nodes_count":{"type":"integer","description":"Unhealthy nodes count.","example":0},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get a published service on a gateway group","operationId":"getPublishedServiceByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"unhealthy_nodes_count":{"type":"integer","description":"Unhealthy nodes count.","example":0},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["Gateway Group","Published Service"],"summary":"Delete a published service on a gateway group","operationId":"deletePublishedServiceByServiceTemplateID","description":"IAM Action: `gateway:DeletePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/oas":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get the OpenAPI Specification of a published service on a gateway group","operationId":"getPublishedServiceOASByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"},"api_count":{"type":"integer","description":"The number of APIs in the service.","example":10},"api_desc":{"type":"string","description":"The description of the OAS.","example":"OAS description."}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Gateway Group","Published Service"],"summary":"Update the OpenAPI Specification of a published service on a gateway group","operationId":"putPublishedServiceOASByServiceTemplateID","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"},"api_count":{"type":"integer","description":"The number of APIs in the service.","example":10},"api_desc":{"type":"string","description":"The description of the OAS.","example":"OAS description."}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/routes":{"get":{"tags":["Gateway Group","Published Service"],"summary":"List all routes of published service on a gateway group","operationId":"listPublishedServiceRoutesByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of route versions.","items":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/routes/{route_template_id}":{"get":{"tags":["Gateway Group","Published Service","Route"],"summary":"Get a route in a published service on a gateway group","operationId":"getPublishedServiceRouteByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/routes/{route_template_id}/runtime_configuration":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get the runtime configuration of a route in a published service on a gateway group","operationId":"getPublishedRouteRuntimeConfiguration","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"patch":{"tags":["Gateway Group","Published Service"],"summary":"Update the runtime configuration of a route in a published service on a gateway group","operationId":"patchPublishedRouteRuntimeConfiguration","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"route_template_id","description":"The unique identifier of the route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/stream_routes":{"get":{"tags":["Gateway Group","Published Service","Stream Route"],"summary":"List all stream routes of a published service on a gateway group","operationId":"listPublishedServiceStreamRoutesByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of route versions.","items":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"stream_route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/stream_routes/{stream_route_template_id}":{"get":{"tags":["Gateway Group","Published Service","Stream Route"],"summary":"Get a stream route in a published service on a gateway group","operationId":"getPublishedServiceStreamRouteByServiceTemplateID","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"stream_route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/stream_routes/{stream_route_template_id}/runtime_configuration":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get the runtime configuration of a stream route in a published service on a gateway group","operationId":"getPublishedStreamRouteRuntimeConfiguration","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"patch":{"tags":["Gateway Group","Published Service"],"summary":"Update the runtime configuration of a stream route in a published service on a gateway group","operationId":"patchPublishedStreamRouteRuntimeConfiguration","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"stream_route_template_id","description":"The unique identifier of the stream route in the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/versions":{"get":{"tags":["Gateway Group","Published Service"],"summary":"List all history versions of a published services on a gateway group by service ID","operationId":"listPublishedServiceVersions","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"publish_time","enum":["publish_time"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of published service versions.","items":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"publish_time":{"description":"The time when a service version is published.","type":"integer","minimum":0,"example":1742288232}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/runtime_configuration":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get service runtime configurations of a published service on a gateway group","operationId":"getServiceRuntimeConfiguration","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"oneOf":[{"type":"object","minProperties":1,"properties":{"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","minProperties":1,"properties":{"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"patch":{"tags":["Gateway Group","Published Service"],"summary":"Update service runtime configurations of a published service on a gateway group","operationId":"patchServiceRuntimeConfiguration","description":"IAM Action: `gateway:UpdatePublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"in":"query","name":"dry-run","schema":{"type":"string","enum":["all"]},"description":"When specified, run the operation in dry-run mode."}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"oneOf":[{"type":"object","minProperties":1,"properties":{"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},{"type":"object","minProperties":1,"properties":{"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/services/{service_template_id}/healthcheck":{"get":{"tags":["Gateway Group","Published Service"],"summary":"Get healthcheck status for the upstream of a published service on a gateway group","operationId":"getUpstreamHealthcheckStatus","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"The response for retrieving some source's healthcheck status.","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"Healthcheck status data for every node.","additionalProperties":{"title":"Upstream Service","type":"object","description":"Node's healthcheck status on every gateway instance group by node.","properties":{"host":{"type":"string","example":"httpbin.com","description":"Upstream host."},"port":{"type":"integer","example":80,"description":"Upstream port."},"total":{"type":"integer","description":"Total number of gateway instances.","example":1},"healthy":{"type":"integer","description":"Number of gateway instances that determine the node is healthy.","example":1},"unhealthy":{"type":"integer","description":"Number of gateway instances that determine the node is unhealthy."},"unknown":{"type":"integer","description":"Number of gateway instances that did not report the check results for this node."},"updated_at":{"description":"The time of the node status updated at.","type":"integer","minimum":0,"example":1742288235},"gateway_instances":{"type":"array","description":"An array of gateway instance's health check count details of the node.","items":{"type":"object","properties":{"id":{"type":"string","description":"Gateway instance ID.","example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"hostname":{"type":"string","description":"Instance hostname.","example":"api7ee3-apisix-699b68db7f-cxgcw"},"status":{"type":"string","description":"Health status of the node.","enum":["healthy","unhealthy","unknown"],"example":"healthy"},"created_at":{"description":"The timestamp of the data plane’s first report of the gateway instance’s probe result regarding the node’s health status.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The timestamp of the most recent report from the data plane on the gateway instance’s probe result for the node’s health status.","type":"integer","minimum":0,"example":1742288235}}}}}},"example":{"httpbin.com:80":{"host":"httpbin.com","port":80,"total":1,"healthy":1,"unhealthy":0,"unknown":0,"updated_at":1750150319,"gateway_instances":[{"id":"xxx-yyy-zzz","hostname":"api7ee3-apisix-699b68db7f-cxgcw","status":"healthy","created_at":1750150300,"updated_at":1750150335}]}}}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"List all service registry connections on a gateway group","operationId":"listServiceRegistries","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order service registry connections by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","last_connect_time"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of service registries.","items":{"allOf":[{"description":"The service registry model.","allOf":[{"type":"object","required":["name","type"],"allOf":[{"type":"object","properties":{"name":{"example":"sample-service-registry","description":"The object name.","type":"string","minLength":1,"maxLength":100},"description":{"type":"string","description":"Service registry description.","example":"service registry description"},"health_check":{"type":"object","description":"Health check configurations.","properties":{"probe_interval":{"default":15,"minimum":1,"type":"integer","format":"int64","description":"The time interval for checking service registry (in seconds)."},"probe_timeout":{"default":5,"minimum":1,"type":"integer","format":"int64","description":"The timeout for checking service registry (in seconds)."}}}}},{"oneOf":[{"title":"Kubernetes","type":"object","required":["type","kubernetes_config"],"properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The kubernetes service type."},"kubernetes_config":{"type":"object","description":"Kubernetes service registry configurations.","properties":{"service":{"description":"The IP address of the Kubernetes API server.","type":"object","required":["schema","host","port"],"properties":{"schema":{"type":"string","enum":["http","https"]},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"string","minLength":1,"example":"6443"}}},"namespace_selector":{"description":"The namespace selector to filter target namespaces.","type":"object","nullable":true,"properties":{"equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to match namespaces whose name is exactly equal to the specified string.","example":"prod"},"not_equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to exclude namespaces whose name is exactly equal to the specified string.","example":"kube-system"},"match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to match namespaces whose names match any of the specified strings.","example":["team-a"]},"not_match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to exclude namespaces whose names match any of the specified strings.","example":["test-env"]}},"oneOf":[{"title":"Equal","required":["equal"]},{"title":"Not Equal","required":["not_equal"]},{"title":"Match","required":["match"]},{"title":"Not Match","required":["not_match"]}]},"label_selector":{"description":"The label selector to filter target endpoints.","type":"string","example":"app=nginx,env=prod"},"client":{"description":"The client name.","oneOf":[{"title":"Token File","properties":{"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","pattern":"^[^\\:*?\"<>|]*$","example":"/var/run/secrets/kubernetes.io/serviceaccount/token"}},"required":["token_file"]},{"title":"Token Value","properties":{"token":{"description":"The token of the Kubernetes service account.","type":"string","pattern":"^[A-Za-z0-9+\\/._=-]+$"}},"required":["token"]}]}}}}},{"title":"Nacos","type":"object","required":["type","nacos_config"],"properties":{"type":{"type":"string","enum":["nacos"],"description":"The Nacos service type."},"nacos_config":{"type":"object","required":["hosts"],"description":"Nacos service registry configurations.","properties":{"hosts":{"description":"The address of the Nacos API server.","type":"array","minItems":1,"items":{"type":"string","format":"url","minLength":1}},"prefix":{"description":"The prefix of the Nacos API.","type":"string","default":"/nacos/v1"},"default_weight":{"type":"integer","description":"The default weight of the endpoints.","minimum":1,"maximum":100,"example":100,"default":100},"fetch_interval":{"type":"integer","description":"The interval for fetching endpoints (in seconds).","example":30,"default":10},"timeout":{"type":"object","description":"Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.","properties":{"connect":{"type":"integer","description":"Connection timeout.","example":2,"default":2},"send":{"type":"integer","description":"Sending timeout in seconds.","example":2,"default":2},"read":{"type":"integer","description":"Reading timeout in seconds.","example":5,"default":5}}},"auth":{"description":"Nacos authentication configuration.","oneOf":[{"title":"Username & Password","properties":{"username":{"description":"The username of the Nacos API.","type":"string","minLength":1,"example":null},"password":{"description":"The password of the Nacos API.","type":"string","minLength":1,"example":null}},"required":["username","password"]},{"title":"Token","properties":{"token":{"type":"string","description":"The token of the Nacos service.","minLength":1}},"required":["token"]},{"title":"Access Key & Secret Key","properties":{"access_key":{"description":"The access key of the Nacos API.","type":"string","minLength":1},"secret_key":{"description":"The secret key of the Nacos API.","type":"string","minLength":1}},"required":["access_key","secret_key"]}]}}}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"status":{"type":"string","enum":["healthy","lost_connection","connecting"],"default":"connecting","description":"The status of the service registry."},"last_connect_time":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"associated_services_count":{"type":"integer","format":"int64","description":"The associated services of the service registry."}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Service Registry","Gateway Group"],"summary":"Create a service registry connection on a gateway group","operationId":"createServiceRegistry","description":"IAM Action: `gateway:ConnectServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"allOf":[{"type":"object","properties":{"name":{"example":"sample-service-registry","description":"The object name.","type":"string","minLength":1,"maxLength":100},"description":{"type":"string","description":"Service registry description.","example":"service registry description"},"health_check":{"type":"object","description":"Health check configurations.","properties":{"probe_interval":{"default":15,"minimum":1,"type":"integer","format":"int64","description":"The time interval for checking service registry (in seconds)."},"probe_timeout":{"default":5,"minimum":1,"type":"integer","format":"int64","description":"The timeout for checking service registry (in seconds)."}}}}},{"oneOf":[{"title":"Kubernetes","type":"object","required":["type","kubernetes_config"],"properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The kubernetes service type."},"kubernetes_config":{"type":"object","description":"Kubernetes service registry configurations.","properties":{"service":{"description":"The IP address of the Kubernetes API server.","type":"object","required":["schema","host","port"],"properties":{"schema":{"type":"string","enum":["http","https"]},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"string","minLength":1,"example":"6443"}}},"namespace_selector":{"description":"The namespace selector to filter target namespaces.","type":"object","nullable":true,"properties":{"equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to match namespaces whose name is exactly equal to the specified string.","example":"prod"},"not_equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to exclude namespaces whose name is exactly equal to the specified string.","example":"kube-system"},"match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to match namespaces whose names match any of the specified strings.","example":["team-a"]},"not_match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to exclude namespaces whose names match any of the specified strings.","example":["test-env"]}},"oneOf":[{"title":"Equal","required":["equal"]},{"title":"Not Equal","required":["not_equal"]},{"title":"Match","required":["match"]},{"title":"Not Match","required":["not_match"]}]},"label_selector":{"description":"The label selector to filter target endpoints.","type":"string","example":"app=nginx,env=prod"},"client":{"description":"The client name.","oneOf":[{"title":"Token File","properties":{"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","pattern":"^[^\\:*?\"<>|]*$","example":"/var/run/secrets/kubernetes.io/serviceaccount/token"}},"required":["token_file"]},{"title":"Token Value","properties":{"token":{"description":"The token of the Kubernetes service account.","type":"string","pattern":"^[A-Za-z0-9+\\/._=-]+$"}},"required":["token"]}]}}}}},{"title":"Nacos","type":"object","required":["type","nacos_config"],"properties":{"type":{"type":"string","enum":["nacos"],"description":"The Nacos service type."},"nacos_config":{"type":"object","required":["hosts"],"description":"Nacos service registry configurations.","properties":{"hosts":{"description":"The address of the Nacos API server.","type":"array","minItems":1,"items":{"type":"string","format":"url","minLength":1}},"prefix":{"description":"The prefix of the Nacos API.","type":"string","default":"/nacos/v1"},"default_weight":{"type":"integer","description":"The default weight of the endpoints.","minimum":1,"maximum":100,"example":100,"default":100},"fetch_interval":{"type":"integer","description":"The interval for fetching endpoints (in seconds).","example":30,"default":10},"timeout":{"type":"object","description":"Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.","properties":{"connect":{"type":"integer","description":"Connection timeout.","example":2,"default":2},"send":{"type":"integer","description":"Sending timeout in seconds.","example":2,"default":2},"read":{"type":"integer","description":"Reading timeout in seconds.","example":5,"default":5}}},"auth":{"description":"Nacos authentication configuration.","oneOf":[{"title":"Username & Password","properties":{"username":{"description":"The username of the Nacos API.","type":"string","minLength":1,"example":null},"password":{"description":"The password of the Nacos API.","type":"string","minLength":1,"example":null}},"required":["username","password"]},{"title":"Token","properties":{"token":{"type":"string","description":"The token of the Nacos service.","minLength":1}},"required":["token"]},{"title":"Access Key & Secret Key","properties":{"access_key":{"description":"The access key of the Nacos API.","type":"string","minLength":1},"secret_key":{"description":"The secret key of the Nacos API.","type":"string","minLength":1}},"required":["access_key","secret_key"]}]}}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The service registry model.","allOf":[{"type":"object","required":["name","type"],"allOf":[{"type":"object","properties":{"name":{"example":"sample-service-registry","description":"The object name.","type":"string","minLength":1,"maxLength":100},"description":{"type":"string","description":"Service registry description.","example":"service registry description"},"health_check":{"type":"object","description":"Health check configurations.","properties":{"probe_interval":{"default":15,"minimum":1,"type":"integer","format":"int64","description":"The time interval for checking service registry (in seconds)."},"probe_timeout":{"default":5,"minimum":1,"type":"integer","format":"int64","description":"The timeout for checking service registry (in seconds)."}}}}},{"oneOf":[{"title":"Kubernetes","type":"object","required":["type","kubernetes_config"],"properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The kubernetes service type."},"kubernetes_config":{"type":"object","description":"Kubernetes service registry configurations.","properties":{"service":{"description":"The IP address of the Kubernetes API server.","type":"object","required":["schema","host","port"],"properties":{"schema":{"type":"string","enum":["http","https"]},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"string","minLength":1,"example":"6443"}}},"namespace_selector":{"description":"The namespace selector to filter target namespaces.","type":"object","nullable":true,"properties":{"equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to match namespaces whose name is exactly equal to the specified string.","example":"prod"},"not_equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to exclude namespaces whose name is exactly equal to the specified string.","example":"kube-system"},"match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to match namespaces whose names match any of the specified strings.","example":["team-a"]},"not_match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to exclude namespaces whose names match any of the specified strings.","example":["test-env"]}},"oneOf":[{"title":"Equal","required":["equal"]},{"title":"Not Equal","required":["not_equal"]},{"title":"Match","required":["match"]},{"title":"Not Match","required":["not_match"]}]},"label_selector":{"description":"The label selector to filter target endpoints.","type":"string","example":"app=nginx,env=prod"},"client":{"description":"The client name.","oneOf":[{"title":"Token File","properties":{"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","pattern":"^[^\\:*?\"<>|]*$","example":"/var/run/secrets/kubernetes.io/serviceaccount/token"}},"required":["token_file"]},{"title":"Token Value","properties":{"token":{"description":"The token of the Kubernetes service account.","type":"string","pattern":"^[A-Za-z0-9+\\/._=-]+$"}},"required":["token"]}]}}}}},{"title":"Nacos","type":"object","required":["type","nacos_config"],"properties":{"type":{"type":"string","enum":["nacos"],"description":"The Nacos service type."},"nacos_config":{"type":"object","required":["hosts"],"description":"Nacos service registry configurations.","properties":{"hosts":{"description":"The address of the Nacos API server.","type":"array","minItems":1,"items":{"type":"string","format":"url","minLength":1}},"prefix":{"description":"The prefix of the Nacos API.","type":"string","default":"/nacos/v1"},"default_weight":{"type":"integer","description":"The default weight of the endpoints.","minimum":1,"maximum":100,"example":100,"default":100},"fetch_interval":{"type":"integer","description":"The interval for fetching endpoints (in seconds).","example":30,"default":10},"timeout":{"type":"object","description":"Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.","properties":{"connect":{"type":"integer","description":"Connection timeout.","example":2,"default":2},"send":{"type":"integer","description":"Sending timeout in seconds.","example":2,"default":2},"read":{"type":"integer","description":"Reading timeout in seconds.","example":5,"default":5}}},"auth":{"description":"Nacos authentication configuration.","oneOf":[{"title":"Username & Password","properties":{"username":{"description":"The username of the Nacos API.","type":"string","minLength":1,"example":null},"password":{"description":"The password of the Nacos API.","type":"string","minLength":1,"example":null}},"required":["username","password"]},{"title":"Token","properties":{"token":{"type":"string","description":"The token of the Nacos service.","minLength":1}},"required":["token"]},{"title":"Access Key & Secret Key","properties":{"access_key":{"description":"The access key of the Nacos API.","type":"string","minLength":1},"secret_key":{"description":"The secret key of the Nacos API.","type":"string","minLength":1}},"required":["access_key","secret_key"]}]}}}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"status":{"type":"string","enum":["healthy","lost_connection","connecting"],"default":"connecting","description":"The status of the service registry."},"last_connect_time":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/instance_token":{"post":{"tags":["Gateway Group","Gateway Instance"],"summary":"Create a token for all gateway instances in a gateway group","operationId":"createGatewayInstanceToken","description":"IAM Action: `gateway:CreateGatewayInstance`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"only_token","description":"If true, the response will only contain the token.","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"The token.","type":"object","properties":{"id":{"description":"Token ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"token_plain_text":{"type":"string","description":"The token in plain text.","example":"example-instance-token-redacted"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"Get a service registry connection on a gateway group","operationId":"getServiceRegistry","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"description":"The service registry model.","allOf":[{"type":"object","required":["name","type"],"allOf":[{"type":"object","properties":{"name":{"example":"sample-service-registry","description":"The object name.","type":"string","minLength":1,"maxLength":100},"description":{"type":"string","description":"Service registry description.","example":"service registry description"},"health_check":{"type":"object","description":"Health check configurations.","properties":{"probe_interval":{"default":15,"minimum":1,"type":"integer","format":"int64","description":"The time interval for checking service registry (in seconds)."},"probe_timeout":{"default":5,"minimum":1,"type":"integer","format":"int64","description":"The timeout for checking service registry (in seconds)."}}}}},{"oneOf":[{"title":"Kubernetes","type":"object","required":["type","kubernetes_config"],"properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The kubernetes service type."},"kubernetes_config":{"type":"object","description":"Kubernetes service registry configurations.","properties":{"service":{"description":"The IP address of the Kubernetes API server.","type":"object","required":["schema","host","port"],"properties":{"schema":{"type":"string","enum":["http","https"]},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"string","minLength":1,"example":"6443"}}},"namespace_selector":{"description":"The namespace selector to filter target namespaces.","type":"object","nullable":true,"properties":{"equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to match namespaces whose name is exactly equal to the specified string.","example":"prod"},"not_equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to exclude namespaces whose name is exactly equal to the specified string.","example":"kube-system"},"match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to match namespaces whose names match any of the specified strings.","example":["team-a"]},"not_match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to exclude namespaces whose names match any of the specified strings.","example":["test-env"]}},"oneOf":[{"title":"Equal","required":["equal"]},{"title":"Not Equal","required":["not_equal"]},{"title":"Match","required":["match"]},{"title":"Not Match","required":["not_match"]}]},"label_selector":{"description":"The label selector to filter target endpoints.","type":"string","example":"app=nginx,env=prod"},"client":{"description":"The client name.","oneOf":[{"title":"Token File","properties":{"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","pattern":"^[^\\:*?\"<>|]*$","example":"/var/run/secrets/kubernetes.io/serviceaccount/token"}},"required":["token_file"]},{"title":"Token Value","properties":{"token":{"description":"The token of the Kubernetes service account.","type":"string","pattern":"^[A-Za-z0-9+\\/._=-]+$"}},"required":["token"]}]}}}}},{"title":"Nacos","type":"object","required":["type","nacos_config"],"properties":{"type":{"type":"string","enum":["nacos"],"description":"The Nacos service type."},"nacos_config":{"type":"object","required":["hosts"],"description":"Nacos service registry configurations.","properties":{"hosts":{"description":"The address of the Nacos API server.","type":"array","minItems":1,"items":{"type":"string","format":"url","minLength":1}},"prefix":{"description":"The prefix of the Nacos API.","type":"string","default":"/nacos/v1"},"default_weight":{"type":"integer","description":"The default weight of the endpoints.","minimum":1,"maximum":100,"example":100,"default":100},"fetch_interval":{"type":"integer","description":"The interval for fetching endpoints (in seconds).","example":30,"default":10},"timeout":{"type":"object","description":"Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.","properties":{"connect":{"type":"integer","description":"Connection timeout.","example":2,"default":2},"send":{"type":"integer","description":"Sending timeout in seconds.","example":2,"default":2},"read":{"type":"integer","description":"Reading timeout in seconds.","example":5,"default":5}}},"auth":{"description":"Nacos authentication configuration.","oneOf":[{"title":"Username & Password","properties":{"username":{"description":"The username of the Nacos API.","type":"string","minLength":1,"example":null},"password":{"description":"The password of the Nacos API.","type":"string","minLength":1,"example":null}},"required":["username","password"]},{"title":"Token","properties":{"token":{"type":"string","description":"The token of the Nacos service.","minLength":1}},"required":["token"]},{"title":"Access Key & Secret Key","properties":{"access_key":{"description":"The access key of the Nacos API.","type":"string","minLength":1},"secret_key":{"description":"The secret key of the Nacos API.","type":"string","minLength":1}},"required":["access_key","secret_key"]}]}}}}}]}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"status":{"type":"string","enum":["healthy","lost_connection","connecting"],"default":"connecting","description":"The status of the service registry."},"last_connect_time":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Service Registry","Gateway Group"],"summary":"Update a service registry connection on a gateway group","operationId":"putServiceRegistry","description":"IAM Action: `gateway:UpdateServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"allOf":[{"type":"object","properties":{"name":{"example":"sample-service-registry","description":"The object name.","type":"string","minLength":1,"maxLength":100},"description":{"type":"string","description":"Service registry description.","example":"service registry description"},"health_check":{"type":"object","description":"Health check configurations.","properties":{"probe_interval":{"default":15,"minimum":1,"type":"integer","format":"int64","description":"The time interval for checking service registry (in seconds)."},"probe_timeout":{"default":5,"minimum":1,"type":"integer","format":"int64","description":"The timeout for checking service registry (in seconds)."}}}}},{"oneOf":[{"title":"Kubernetes","type":"object","required":["type","kubernetes_config"],"properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The kubernetes service type."},"kubernetes_config":{"type":"object","description":"Kubernetes service registry configurations.","properties":{"service":{"description":"The IP address of the Kubernetes API server.","type":"object","required":["schema","host","port"],"properties":{"schema":{"type":"string","enum":["http","https"]},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"string","minLength":1,"example":"6443"}}},"namespace_selector":{"description":"The namespace selector to filter target namespaces.","type":"object","nullable":true,"properties":{"equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to match namespaces whose name is exactly equal to the specified string.","example":"prod"},"not_equal":{"type":"string","pattern":"^[a-z0-9]([-a-z0-9_.]*[a-z0-9])?$","description":"Value to exclude namespaces whose name is exactly equal to the specified string.","example":"kube-system"},"match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to match namespaces whose names match any of the specified strings.","example":["team-a"]},"not_match":{"type":"array","items":{"type":"string","pattern":"^[\\x21-\\x7e]*$"},"minItems":1,"description":"List of values to exclude namespaces whose names match any of the specified strings.","example":["test-env"]}},"oneOf":[{"title":"Equal","required":["equal"]},{"title":"Not Equal","required":["not_equal"]},{"title":"Match","required":["match"]},{"title":"Not Match","required":["not_match"]}]},"label_selector":{"description":"The label selector to filter target endpoints.","type":"string","example":"app=nginx,env=prod"},"client":{"description":"The client name.","oneOf":[{"title":"Token File","properties":{"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","pattern":"^[^\\:*?\"<>|]*$","example":"/var/run/secrets/kubernetes.io/serviceaccount/token"}},"required":["token_file"]},{"title":"Token Value","properties":{"token":{"description":"The token of the Kubernetes service account.","type":"string","pattern":"^[A-Za-z0-9+\\/._=-]+$"}},"required":["token"]}]}}}}},{"title":"Nacos","type":"object","required":["type","nacos_config"],"properties":{"type":{"type":"string","enum":["nacos"],"description":"The Nacos service type."},"nacos_config":{"type":"object","required":["hosts"],"description":"Nacos service registry configurations.","properties":{"hosts":{"description":"The address of the Nacos API server.","type":"array","minItems":1,"items":{"type":"string","format":"url","minLength":1}},"prefix":{"description":"The prefix of the Nacos API.","type":"string","default":"/nacos/v1"},"default_weight":{"type":"integer","description":"The default weight of the endpoints.","minimum":1,"maximum":100,"example":100,"default":100},"fetch_interval":{"type":"integer","description":"The interval for fetching endpoints (in seconds).","example":30,"default":10},"timeout":{"type":"object","description":"Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.","properties":{"connect":{"type":"integer","description":"Connection timeout.","example":2,"default":2},"send":{"type":"integer","description":"Sending timeout in seconds.","example":2,"default":2},"read":{"type":"integer","description":"Reading timeout in seconds.","example":5,"default":5}}},"auth":{"description":"Nacos authentication configuration.","oneOf":[{"title":"Username & Password","properties":{"username":{"description":"The username of the Nacos API.","type":"string","minLength":1,"example":null},"password":{"description":"The password of the Nacos API.","type":"string","minLength":1,"example":null}},"required":["username","password"]},{"title":"Token","properties":{"token":{"type":"string","description":"The token of the Nacos service.","minLength":1}},"required":["token"]},{"title":"Access Key & Secret Key","properties":{"access_key":{"description":"The access key of the Nacos API.","type":"string","minLength":1},"secret_key":{"description":"The secret key of the Nacos API.","type":"string","minLength":1}},"required":["access_key","secret_key"]}]}}}}}]}]}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["Service Registry","Gateway Group"],"summary":"Delete a service registry connection on a gateway group","operationId":"deleteServiceRegistry","description":"IAM Action: `gateway:DisconnectServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/connected_services":{"get":{"tags":["Service Registry","Gateway Group","Published Service"],"summary":"List all published services connected to a service registry","operationId":"listServiceRegistryConnectedServices","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order published services by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at","publish_time","name"]}},{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of service versions.","items":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"unhealthy_nodes_count":{"type":"integer","description":"Unhealthy nodes count.","example":0},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/kubernetes/internal_services":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"List all internal services in a Kubernetes service registry","operationId":"listKubernetesInternalServices","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["kubernetes"],"description":"The service type."},"internal_services":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","description":"An array of internal service names."}},"description":"A map of internal services. The Key is the name of namespace and value is the array of internal service names.","example":{"default":["service1","service2"],"kube-system":["kube-dns"]}}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/nacos/namespaces":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"List all namespaces in a Nacos service registry","operationId":"listNacosNamespaces","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of Nacos namespaces.","items":{"type":"object","properties":{"namespace":{"type":"string","description":"Nacos namespace ID.","example":"f8b9a1d3-74c7-4a70-9b89-1fc447c1b2e6"},"namespace_show_name":{"type":"string","description":"Nacos namespace name.","example":"public"}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/nacos/namespaces/{nacos_namespace}/groups":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"List all groups in a Nacos namespace","operationId":"listNacosGroups","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"nacos_namespace","in":"path","required":true,"description":"Nacos namespace name.","example":"public","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of Nacos groups.","items":{"type":"string"},"example":["DEFAULT_GROUP","DEV_GROUP","TEST_GROUP","STAGING_GROUP","PROD_GROUP"]},"total":{"example":5}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/nacos/namespaces/{nacos_namespace}/groups/{nacos_group}/services":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"List all internal services in a Nacos group","operationId":"listNacosInternalServices","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"nacos_namespace","in":"path","required":true,"description":"Nacos namespace name.","example":"public","schema":{"minimum":1,"type":"string"}},{"name":"nacos_group","in":"path","required":true,"description":"Nacos group.","example":"DEFAULT_GROUP","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of Nacos services.","items":{"type":"string"},"example":["auth-service","user-service","order-service","payment-service","inventory-service"]},"total":{"example":5}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/nacos/namespaces/{nacos_namespace}/groups/{nacos_group}/services/{nacos_service}/instances_metadata":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"Get all instance metadata of a Nacos services registry","operationId":"getNacosInstancesMetadata","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"nacos_namespace","in":"path","required":true,"description":"Nacos namespace name.","example":"public","schema":{"minimum":1,"type":"string"}},{"name":"nacos_group","in":"path","required":true,"description":"Nacos group.","example":"DEFAULT_GROUP","schema":{"minimum":1,"type":"string"}},{"name":"nacos_service","in":"path","required":true,"description":"Nacos service.","example":"api7ee3-keycloak","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"value":{"type":"object","description":"An object of Nacos instance metadata.","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"version":["1.0.0","1.0.1"],"env":["prod","staging"],"location":["beijing","shanghai"]}},"total":{"type":"integer","example":3},"list":{"type":"array","description":"Raw list of metadata for each instance.","items":{"type":"object","additionalProperties":{"type":"string"}},"example":[{"version":"1.0.0","env":"prod","location":"beijing"},{"version":"1.0.1","env":"prod","location":"shanghai"},{"version":"1.0.0","env":"staging","location":"beijing"}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}/health_check_history":{"get":{"tags":["Service Registry","Gateway Group"],"summary":"Get health check history of a service registry connection on a gateway group","operationId":"getServiceRegistryHealthCheckHistory","description":"IAM Action: `gateway:GetServiceRegistry`, Resource: `arn:api7:gateway:gatewaygroup/%s`","parameters":[{"name":"service_registry_id","in":"path","required":true,"description":"Service registry ID.","example":"86fb9981-d9d2-4555-9df8-91ae92129335","schema":{"minimum":1,"type":"string"}},{"name":"gateway_group_id","in":"path","required":true,"example":"86fb9981-d9d2-4555-9df8-91ae92129335","description":"Gateway group ID.","schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order health check history by.","schema":{"type":"string","default":"connect_time","enum":["connect_time"]}},{"name":"status","in":"query","description":"Service registry connection status.","schema":{"type":"array","items":{"type":"string","enum":["healthy","lost_connection","connecting"]}}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of health check results of the service registry.","items":{"allOf":[{"type":"object","properties":{"instance_id":{"description":"Instance ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_registry_id":{"description":"Service registry ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"hostname":{"type":"string","description":"Service registry hostname.","example":"nacos-srv.test"},"status":{"type":"string","enum":["healthy","lost_connection","connecting"]},"connect_time":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}/oas":{"get":{"tags":["Service Template"],"summary":"Get the OpenAPI Specification of a service version","operationId":"getServiceVersionOAS","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"raw_openapi":{"type":"string","description":"The raw OpenAPI spec of the service.","example":"Raw OpenAPI spec"},"api_count":{"type":"integer","description":"The number of APIs in the service.","example":10},"api_desc":{"type":"string","description":"The description of the OAS.","example":"OAS description."}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}":{"get":{"tags":["Service Template"],"summary":"Get a service version","operationId":"getServiceVersion","description":"The service version can be found by listing all service versions.<br> IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}/routes":{"get":{"tags":["Service Template"],"summary":"Get all routes in a service version","operationId":"listRoutesInServiceVersion","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of route versions.","items":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}/routes/{route_version_id}":{"get":{"tags":["Service Template"],"summary":"Get a route in a service version","operationId":"getRouteInServiceVersion","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"route_version_id","description":"The unique identifier of the route version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}/stream_routes":{"get":{"tags":["Service Template"],"summary":"Get all stream routes in a service versions","operationId":"listStreamRoutesInServiceVersion","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of route versions.","items":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"stream_route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/service_versions/{service_version_id}/stream_routes/{stream_route_version_id}":{"get":{"tags":["Service Template"],"summary":"Get a stream route in a service version","operationId":"getStreamRouteInServiceVersion","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_version_id","description":"The unique identifier of the service version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"stream_route_version_id","description":"The unique identifier of the stream route version.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"remote_addr":{"description":"Client address filter. If the client request does not originate from `remote_addr`, the request will not be forwarded to the stream server.","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},"server_addr":{"type":"string","description":"Stream server address.","anyOf":[{"title":"IPAddress","type":"string","anyOf":[{"title":"IPv4","type":"string","example":"127.0.0.1"},{"title":"IPv4/CIDR","type":"string","example":"127.0.0.1/24"},{"title":"IPv6","type":"string","example":"2001:db8::"},{"title":"IPv6/CIDR","type":"string","example":"2001:db8::/32"}]},{"type":"string","title":"Domain"}],"example":"mysql"},"server_port":{"type":"integer","maximum":65535,"description":"Stream server port.","example":3306}}},{"type":"object","properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"ip-restriction":{"whitelist":["192.168.0.1/24"],"message":"Access denied"}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"stream_route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_version_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/services/publish":{"post":{"tags":["Service Template"],"summary":"Publish a service template to a gateway group","operationId":"publishServiceTemplate","description":"IAM Action: `gateway:PublishServices`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","requestBody":{"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"create_new_version":{"type":"boolean","description":"If true, create a new service version."},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"services":{"type":"array","minItems":1,"description":"Services configurations.","items":{"type":"object","required":["service_id","version"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"description":"Service version.","type":"string"},"service_version_id":{"description":"Required when `create_new_version` is set to `false`.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/conflict_check":{"post":{"tags":["Published Service"],"summary":"Check service conflict","requestBody":{"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"create_new_version":{"type":"boolean","description":"If true, create a new service version."},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"services":{"type":"array","minItems":1,"description":"Services configurations.","items":{"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"}}},{"type":"object","required":["service_id"],"properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version."},"service_version_id":{"description":"Required when `create_new_version` is set to `false`.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"status":{"default":1,"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"routes":{"type":"array","items":{"description":"The route with management fields.","allOf":[{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"}}}]}}}}]}}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"duplicate":{"type":"array","description":"An array of duplicated services and routes.","items":{"type":"array","description":"An array of conflicting services and routes.","items":{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"type":"string","description":"Service name.","example":"httpbin-svc"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_name":{"type":"string","description":"Route name.","example":"httpbin-route"},"url":{"type":"string","description":"Route URL.","example":"/test"}}}}},"overlapping":{"type":"array","description":"An array of overlapping services and routes.","items":{"type":"array","description":"An array of conflicting services and routes.","items":{"type":"object","properties":{"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"service_name":{"type":"string","description":"Service name.","example":"httpbin-svc"},"route_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"route_name":{"type":"string","description":"Route name.","example":"httpbin-route"},"url":{"type":"string","description":"Route URL.","example":"/test"}}}}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/{service_template_id}/published_services":{"get":{"tags":["Service Template"],"summary":"List all published version of a service template on multiple gateway groups","operationId":"listServiceTemplatePublishedVersions","description":"IAM Action: `gateway:GetPublishedService`, Resource: `arn:api7:gateway:gatewaygroup/%s/publishedservice/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of published services.","items":{"allOf":[{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]},{"type":"object","properties":{"gateway_group_name":{"description":"The object name.","type":"string","minLength":1,"maxLength":100,"example":"us-west-rsc"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"unhealthy_nodes_count":{"type":"integer","description":"Unhealthy nodes count.","example":0},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/services/{service_template_id}/versions/{version}":{"get":{"tags":["Service Template"],"summary":"Get the service version name","operationId":"getServiceVersionByVersionName","description":"IAM Action: `gateway:GetServiceTemplate`, Resource: `arn:api7:gateway:servicetemplate/%s`","parameters":[{"name":"service_template_id","description":"The unique identifier of the service template.","in":"path","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"version","description":"Service version.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","minProperties":1,"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"}}}]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"apisix_service_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"service_id":{"description":"The service ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"version":{"type":"string","description":"Service version.","example":"1.3.2"},"created_at":{"description":"The time (first release) when a service version is created.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The time when a service version is updated.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/plugins":{"get":{"tags":["Plugin"],"summary":"Get all plugin details","operationId":"getPlugin","parameters":[{"name":"subsystem","in":"query","schema":{"type":"string","default":"http","enum":["http","stream"],"example":"stream"},"description":"Type to filter the plugin list. `http` will only show L7 plugins and `stream` will only show L4 plugins."},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"plugin_name":{"description":"Name of the plugin.","example":"prometheus","type":"string","minLength":1,"maxLength":100},"type":{"type":"string","description":"Catalog of the plugin. Plugins are categorized into Authentication, Security, AI, Traffic, Transformation, Observability, Serverless, General, and Other Protocols.","example":"Observability"},"is_custom":{"type":"boolean","description":"If true, the plugin is a custom plugin.","example":false}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/plugins/catalogs":{"get":{"tags":["Plugin"],"summary":"List all plugin catalogs","operationId":"listPluginCatalogs","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"array","items":{"type":"string"},"example":["General","Traffic","Observability","Serverless","Security","Transformation","Authentication","Other protocols"]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/plugins/{plugin_name}/usage":{"get":{"tags":["Plugin"],"summary":"Get the usage of a plugin in all gateway groups","operationId":"getPluginUsage","parameters":[{"name":"plugin_name","description":"Name of the plugin.","in":"path","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","example":{"consumer_credential":{"list":[{"name":"ka","id":"9f1c2c80b6093aa7e9cbd9f0855f56586a646ba0","gateway_group_id":"default","gateway_group_name":"default"},{"name":"jack","id":"439129f8-a6c5-4ea7-9f96-6ed108cfc0b0","gateway_group_id":"ce9bf912-eb47-4c28-85a7-ffae5256d226","gateway_group_name":"jack"},{"name":"test","id":"21c3b211-2463-4cfc-8eb4-1f8cd679eec0","gateway_group_id":"b14f4ec3-f79b-4aa7-baeb-f892540c26f3","gateway_group_name":"29jjc"}],"total":3},"published_service":{"list":[{"name":"httpbin","id":"60109630-3022-4c6d-9b1f-0440ec88ef5f","gateway_group_id":"bfc91d42-b83a-4309-8cab-6763c27f715e","gateway_group_name":"jw_test"},{"name":"name2","id":"4bc1938e-8d3c-4a89-8089-b31bfa6989dc","gateway_group_id":"b14f4ec3-f79b-4aa7-baeb-f892540c26f3","gateway_group_name":"29jjc"}],"total":2}},"properties":{"published_service":{"type":"object","description":"Published services in all gateway groups.","properties":{"total":{"type":"integer","description":"Total number of published services."},"list":{"type":"array","description":"An array of published services in all gateway groups.","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}}}}},"consumer":{"type":"object","description":"Consumers in all gateway groups.","properties":{"total":{"type":"integer","description":"Total number of consumers."},"list":{"type":"array","description":"An array of consumers in all gateway groups.","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}}}}},"global_rule":{"type":"object","description":"Global rules in all gateway groups.","properties":{"total":{"type":"integer","description":"Total number of global rules."},"list":{"type":"array","description":"An array of global rules in all gateway groups.","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"gateway_group_id":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"},"gateway_group_name":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}}}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/openapi/request_body_schema":{"get":{"tags":["Schema"],"summary":"Get OpenAPI schema","description":"The endpoint returns the request body schema of PUT/POST requests for users to understand how to structure a request.","operationId":"getOpenAPISchema","parameters":[{"name":"method","description":"HTTP method to determine which request body to return.","in":"query","required":true,"schema":{"minimum":1,"type":"string","enum":["POST","PUT"]}},{"name":"path","description":"API endpoint.","in":"query","required":true,"example":"/apisix/admin/consumers","schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","example":{"description":"The consumer description.","properties":{"desc":{"description":"The object description.","maxLength":65536,"type":"string"},"labels":{"additionalProperties":{"maxLength":65536,"minLength":1,"pattern":"^.+$","type":"string"},"example":{"keyA":"valueA","keyB":"valueB"},"type":"object"},"plugins":{"description":"The key-value pairs which represent the plugins attached on the object.","type":"object"},"username":{"maxLength":512,"minLength":1,"pattern":"^[a-zA-Z0-9_\\-]+$","type":"string"}},"required":["username"],"type":"object"}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/schema/core":{"get":{"tags":["Schema"],"summary":"Get core resources schema","operationId":"getCoreAPISchema","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"service":{"type":"object","description":"Service(L7) schema."},"route":{"type":"object","description":"Route(L7) schema."},"stream_service":{"type":"object","description":"Stream service(L4) schema."},"stream_route":{"type":"object","description":"Stream route(L4) schema."},"upstream":{"type":"object","description":"Upstream schema."},"consumer":{"type":"object","description":"Consumer schema."},"consumer_credential":{"type":"object","description":"Consumer credential schema."},"global_rule":{"type":"object","description":"Global rule schema."},"ssl":{"type":"object","description":"SSL schema."},"aws_secret":{"type":"object","description":"AWS secret schema."},"vault_secret":{"type":"object","description":"Vault secret schema."},"kubernetes_secret":{"type":"object","description":"Kubernetes secret schema."},"plugin_metadata":{"type":"object","description":"Plugin metadata schema."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/labels/{resource_type}":{"get":{"tags":["Label"],"summary":"Get all labels of a resource type","operationId":"listLabels","parameters":[{"name":"resource_type","in":"path","required":true,"description":"Resource type.","schema":{"type":"string","enum":["gateway_group","consumer","consumer_credential","ssl","service","route","stream_route","role","permission_policy","published_service","secret","contact_point","alert_policy","certificate","api_product","sni","portal","dcr_provider"]}},{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"k8s/namespace":["api7-ingress-system","default","api7"],"manager-by":["api7-ingress-controller","apisix-ingress-controller"]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/system_settings":{"put":{"tags":["System Settings"],"summary":"Update deployment settings","operationId":"putDeploymentSettings","description":"IAM Action: `gateway:UpdateDeploymentSetting`, Resource: `arn:api7:gateway:gatewaysetting/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"dp_manager_address":{"description":"DP manager address.","maxItems":32,"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"string","minLength":1,"pattern":"[^\\/]$","format":"url_scheme_port","description":"The IP address of the control plane.","example":"https://192.168.101.10:7943"}},"source":{"type":"string","enum":["database","config"],"description":"The source of the control plane address and Admin API address."},"admin_api_address":{"type":"string","format":"url_scheme","description":"The URL address of the Admin API.","example":"https://192.168.101.10:7443"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"dp_manager_address":{"description":"DP manager address.","maxItems":32,"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"string","minLength":1,"pattern":"[^\\/]$","format":"url_scheme_port","description":"The IP address of the control plane.","example":"https://192.168.101.10:7943"}},"source":{"type":"string","enum":["database","config"],"description":"The source of the control plane address and Admin API address."},"admin_api_address":{"type":"string","format":"url_scheme","description":"The URL address of the Admin API.","example":"https://192.168.101.10:7443"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["System Settings"],"summary":"Get deployment settings","operationId":"getDeploymentSettings","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"dp_manager_address":{"description":"DP manager address.","maxItems":32,"minItems":0,"uniqueItems":true,"type":"array","items":{"type":"string","minLength":1,"pattern":"[^\\/]$","format":"url_scheme_port","description":"The IP address of the control plane.","example":"https://192.168.101.10:7943"}},"source":{"type":"string","enum":["database","config"],"description":"The source of the control plane address and Admin API address."},"admin_api_address":{"type":"string","format":"url_scheme","description":"The URL address of the Admin API.","example":"https://192.168.101.10:7443"}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/system_settings/scim":{"put":{"tags":["System Settings"],"summary":"Update SCIM settings","operationId":"putSCIMSettings","description":"IAM Action: `iam:UpdateSCIMProvisioning`, Resource: `arn:api7:iam:organization/*`","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}},{"type":"object","additionalProperties":false,"properties":{"scim_encrypt_key":{"type":"string","description":"Base64-encoded encryption key used to secure sensitive SCIM data.","example":"F6OqjCmoRBqFBQIEsdpl33vgfLYTWJe6ynkwitqmaVE="},"scim_key_salt":{"type":"string","description":"Salt value used with the encryption key to strengthen data protection.","example":"example-scim-key-salt-redacted"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["System Settings"],"summary":"Get SCIM settings","operationId":"getSCIMSettings","description":"IAM Action: `iam:GetSCIMProvisioning`, Resource: `arn:api7:iam:organization/*`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}},{"type":"object","additionalProperties":false,"properties":{"scim_encrypt_key":{"type":"string","description":"Base64-encoded encryption key used to secure sensitive SCIM data.","example":"F6OqjCmoRBqFBQIEsdpl33vgfLYTWJe6ynkwitqmaVE="},"scim_key_salt":{"type":"string","description":"Salt value used with the encryption key to strengthen data protection.","example":"example-scim-key-salt-redacted"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/system_settings/scim/token":{"put":{"tags":["System Settings"],"summary":"Generate SCIM Token","operationId":"generateSCIMToken","description":"IAM Action: `iam:UpdateSCIMProvisioning`, Resource: `arn:api7:iam:organization/*`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"string","description":"Value of the SCIM token.","example":"example-scim-token-redacted"}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/system_settings/smtp_server":{"put":{"tags":["System Settings"],"summary":"Update SMTP server settings","description":"IAM Action: `iam:UpdateSMTPServer`, Resource: `arn:api7:iam:organization/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enable":{"type":"boolean","description":"Enable SMTP Server."},"address":{"type":"string","format":"host_port","description":"The SMTP server address in host:port format.","example":"smtp.example.com:587"},"authentication_type":{"type":"string","description":"The authentication type of the SMTP server.","enum":["TLS","STARTTLS"]},"ssl_verify":{"type":"boolean","description":"Whether to validate server-side SSL."},"username":{"type":"string","description":"Username used to authenticate with the SMTP server.","example":"smtp-user@example.com"},"password":{"type":"string","description":"Password used to authenticate with the SMTP server.","example":"secretpassword123"},"from_name":{"description":"Sender's name.","type":"string","pattern":"^\\s*(\"(?:[^\"\\\\]|\\\\.)*\"|([^<>@]+))?\\s*$","example":"John Doe"},"from_address":{"type":"string","format":"email","description":"Sender's email address.","example":"sender@example.com"}},"required":["enable","address","ssl_verify","username","password","from_name","from_address"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"enable":{"type":"boolean","description":"Enable SMTP Server."},"address":{"type":"string","format":"host_port","description":"The SMTP server address in host:port format.","example":"smtp.example.com:587"},"authentication_type":{"type":"string","description":"The authentication type of the SMTP server.","enum":["TLS","STARTTLS"]},"ssl_verify":{"type":"boolean","description":"Whether to validate server-side SSL."},"username":{"type":"string","description":"Username used to authenticate with the SMTP server.","example":"smtp-user@example.com"},"password":{"type":"string","description":"Password used to authenticate with the SMTP server.","example":"secretpassword123"},"from_name":{"description":"Sender's name.","type":"string","pattern":"^\\s*(\"(?:[^\"\\\\]|\\\\.)*\"|([^<>@]+))?\\s*$","example":"John Doe"},"from_address":{"type":"string","format":"email","description":"Sender's email address.","example":"sender@example.com"}},"required":["enable","address","ssl_verify","username","password","from_name","from_address"]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["System Settings"],"summary":"Get SMTP server settings","description":"IAM Action: `iam:GetSMTPServer`, Resource: `arn:api7:iam:organization/*`","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"enable":{"type":"boolean","description":"Enable SMTP Server."},"address":{"type":"string","format":"host_port","description":"The SMTP server address in host:port format.","example":"smtp.example.com:587"},"authentication_type":{"type":"string","description":"The authentication type of the SMTP server.","enum":["TLS","STARTTLS"]},"ssl_verify":{"type":"boolean","description":"Whether to validate server-side SSL."},"username":{"type":"string","description":"Username used to authenticate with the SMTP server.","example":"smtp-user@example.com"},"password":{"type":"string","description":"Password used to authenticate with the SMTP server.","example":"secretpassword123"},"from_name":{"description":"Sender's name.","type":"string","pattern":"^\\s*(\"(?:[^\"\\\\]|\\\\.)*\"|([^<>@]+))?\\s*$","example":"John Doe"},"from_address":{"type":"string","format":"email","description":"Sender's email address.","example":"sender@example.com"}},"required":["enable","address","ssl_verify","username","password","from_name","from_address"]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/system_settings/smtp_server_status":{"get":{"tags":["System Settings"],"summary":"Get SMTP server settings status","description":"Get SMTP server settings status.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"enable":{"type":"boolean","description":"Enable SMTP Server."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/system_infos":{"get":{"tags":["System Infos"],"summary":"Get all system infos","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"api7_ee_version":{"type":"string","description":"API7 Enterprise version.","example":"v3.8.10"},"deployment_id":{"type":"string","description":"A unique identifier that is automatically generated with each deployment of API7 Enterprise.","example":"d1e1ea2b-2cff-4c38-b57e-408e1dffec52"},"deployed_at":{"description":"Timestamp indicating when the API7 EE dashboard was deployed.","type":"integer","minimum":0,"example":1742288230},"free_trial_expired_at":{"description":"Free trial expiry time.","type":"integer","minimum":0,"example":1742288230}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/portal/system_settings/public_access":{"put":{"tags":["Developer Portal Settings"],"summary":"Update developer portal public access","operationId":"putDeveloperPortalPublicAccess","description":"IAM Action: `portal:UpdateDeveloperPortalPublicAccess`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"portal_public_access":{"type":"boolean","description":"If true, allow public access to the developer portal."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"portal_public_access":{"type":"boolean","description":"If true, allow public access to the developer portal."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Developer Portal Settings"],"summary":"Get developer portal public access","operationId":"getDeveloperPortalPublicAccess","description":"IAM Action: `portal:GetDeveloperPortalPublicAccess`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":false,"properties":{"portal_public_access":{"type":"boolean","description":"If true, allow public access to the developer portal."}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/portal/login_options":{"get":{"tags":["Developer Portal Settings"],"summary":"List all developer login options","operationId":"listDeveloperLoginOptions","description":"IAM Action: `portal:GetDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"in":"query","name":"name","schema":{"type":"string"},"description":"Name of the resource."},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Developer Portal Settings"],"summary":"Create a developer login option","operationId":"createDeveloperLoginOption","description":"IAM Action: `portal:CreateDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","client_secret","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The logout URL of the OIDC provider.","example":"http://api7ee3-keycloak/realms/master/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The SP root URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider.","default":true},"logout_idp_session":{"type":"boolean","description":"Whether redirect to IdP for logout or not.","default":false},"private_key":{"type":"string","description":"The private key of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"CAS","properties":{"provider_type":{"type":"string","enum":["cas"],"description":"The login option type."},"cas_config":{"type":"object","description":"CAS configuration.","required":["url"],"properties":{"url":{"type":"string","format":"url","minLength":1,"description":"The URL of the CAS provider."},"send_service":{"type":"boolean","description":"Whether to send service parameters.","default":true},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the CAS provider.","default":true},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of login options","items":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/portal/login_options/{login_option_id}":{"get":{"tags":["Developer Portal Settings"],"summary":"Get a developer login option","operationId":"getDeveloperLoginOption","description":"IAM Action: `portal:GetDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Developer Portal Settings"],"summary":"Update a developer login option","operationId":"putDeveloperLoginOption","description":"IAM Action: `portal:UpdateDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","client_secret","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The logout URL of the OIDC provider.","example":"http://api7ee3-keycloak/realms/master/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The SP root URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider.","default":true},"logout_idp_session":{"type":"boolean","description":"Whether redirect to IdP for logout or not.","default":false},"private_key":{"type":"string","description":"The private key of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"CAS","properties":{"provider_type":{"type":"string","enum":["cas"],"description":"The login option type."},"cas_config":{"type":"object","description":"CAS configuration.","required":["url"],"properties":{"url":{"type":"string","format":"url","minLength":1,"description":"The URL of the CAS provider."},"send_service":{"type":"boolean","description":"Whether to send service parameters.","default":true},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the CAS provider.","default":true},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"patch":{"tags":["Developer Portal Settings"],"summary":"Patch a developer login option","operationId":"patchDeveloperLoginOption","description":"IAM Action: `portal:UpdateDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"portal_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in specific configuration","properties":{"enable_self_registration":{"type":"boolean","description":"Whether to enable self registration."},"registration_auto_approval":{"type":"boolean","description":"Whether to auto approve new registrations."},"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["Developer Portal Settings"],"summary":"Delete a developer login option","operationId":"deleteDeveloperLoginOption","description":"IAM Action: `portal:DeleteDeveloperLoginOption`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/portal/system_settings/scim":{"put":{"tags":["Developer Portal Settings"],"summary":"Update Developer SCIM settings","operationId":"putDeveloperSCIMSettings","description":"IAM Action: `portal:UpdateDeveloperSCIMProvisioning`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}},{"type":"object","additionalProperties":false,"properties":{"scim_encrypt_key":{"type":"string","description":"Base64-encoded encryption key used to secure sensitive SCIM data.","example":"F6OqjCmoRBqFBQIEsdpl33vgfLYTWJe6ynkwitqmaVE="},"scim_key_salt":{"type":"string","description":"Salt value used with the encryption key to strengthen data protection.","example":"example-scim-key-salt-redacted"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Developer Portal Settings"],"summary":"Get Developer SCIM settings","operationId":"getDeveloperSCIMSettings","description":"IAM Action: `portal:GetDeveloperSCIMProvisioning`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"type":"object","additionalProperties":false,"properties":{"enable_scim":{"type":"boolean","description":"Enable or disable the SCIM endpoint for provisioning and user management."}}},{"type":"object","additionalProperties":false,"properties":{"scim_encrypt_key":{"type":"string","description":"Base64-encoded encryption key used to secure sensitive SCIM data.","example":"F6OqjCmoRBqFBQIEsdpl33vgfLYTWJe6ynkwitqmaVE="},"scim_key_salt":{"type":"string","description":"Salt value used with the encryption key to strengthen data protection.","example":"example-scim-key-salt-redacted"}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/portal/system_settings/scim/token":{"put":{"tags":["Developer Portal Settings"],"summary":"Generate Developer SCIM Token","operationId":"generateDeveloperSCIMToken","description":"IAM Action: `portal:UpdateDeveloperSCIMProvisioning`, Resource: `arn:api7:portal:portal/%s/loginsetting/*`","parameters":[{"name":"portal_id","description":"The unique identifier of the portal instance.","in":"query","required":false,"schema":{"default":"default","description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"string","description":"Value of the SCIM token.","example":"example-scim-token-redacted"}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/login_options/{login_option_id}":{"get":{"tags":["Dashbord Login Option"],"summary":"Get a login option","operationId":"getLoginOption","description":"IAM Action: `iam:GetLoginOption`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Dashbord Login Option"],"summary":"Update a login option","operationId":"putLoginOption","description":"IAM Action: `iam:UpdateLoginOption`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of permission boundary mappings defining operations and conditions under which permission boundary are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","client_secret","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The logout URL of the OIDC provider.","example":"http://api7ee3-keycloak/realms/master/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The SP root URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider.","default":true},"logout_idp_session":{"type":"boolean","description":"Whether redirect to IdP for logout or not.","default":false},"private_key":{"type":"string","description":"The private key of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"CAS","properties":{"provider_type":{"type":"string","enum":["cas"],"description":"The login option type."},"cas_config":{"type":"object","description":"CAS configuration.","required":["url"],"properties":{"url":{"type":"string","format":"url","minLength":1,"description":"The URL of the CAS provider."},"send_service":{"type":"boolean","description":"Whether to send service parameters.","default":true},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the CAS provider.","default":true},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"patch":{"tags":["Dashbord Login Option"],"summary":"Patch a login option","operationId":"patchLoginOption","description":"IAM Action: `iam:UpdateLoginOption`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"JSON Patch payload as defined by [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902). See [JSON Patch](https://jsonpatch.com) for more information.","items":{"type":"object","oneOf":[{"title":"add/replace","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["add","replace"]},"path":{"type":"string","description":"Path to the field to be replaced or added. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format.","example":"/name"},"value":{"description":"Value to be added or replaced.","example":"new-name"}},"required":["op","path","value"]},{"title":"remove","properties":{"op":{"type":"string","description":"The operation to be performed.","enum":["remove"]},"path":{"type":"string","description":"Path to the field to be removed. Path should follow the [JSON Pointer](https://jsonpatch.com/#json-pointer) format."}},"required":["op","path"]}]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["Dashbord Login Option"],"summary":"Delete a login option","operationId":"deleteLoginOption","description":"IAM Action: `iam:DeleteLoginOption`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/login_options":{"get":{"tags":["Dashbord Login Option"],"summary":"List all login options","operationId":"listLoginOptions","description":"IAM Action: `iam:GetLoginOption`, Resource: `arn:api7:iam:organization/*`","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"in":"query","name":"name","schema":{"type":"string"},"description":"Name of the resource."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of login options","items":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Dashbord Login Option"],"summary":"Create a login option","operationId":"createLoginOption","description":"IAM Action: `iam:CreateLoginOption`, Resource: `arn:api7:iam:organization/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"allOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of permission boundary mappings defining operations and conditions under which permission boundary are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","client_secret","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The logout URL of the OIDC provider.","example":"http://api7ee3-keycloak/realms/master/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","oneOf":[{"format":"url","minLength":1,"title":"url"},{"title":"$env://","type":"string","pattern":"^\\$env://","example":"$env://john-key-auth"}],"description":"The SP root URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider.","default":true},"logout_idp_session":{"type":"boolean","description":"Whether redirect to IdP for logout or not.","default":false},"private_key":{"type":"string","description":"The private key of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"CAS","properties":{"provider_type":{"type":"string","enum":["cas"],"description":"The login option type."},"cas_config":{"type":"object","description":"CAS configuration.","required":["url"],"properties":{"url":{"type":"string","format":"url","minLength":1,"description":"The URL of the CAS provider."},"send_service":{"type":"boolean","description":"Whether to send service parameters.","default":true},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the CAS provider.","default":true},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of login options","items":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/login_options_for_login":{"get":{"tags":["Dashbord Login Option"],"summary":"List all login options (public)","operationId":"listLoginOptionsForLogin","description":"List login options. No authentication is required, and provider or policy/role details are not included in the response.","parameters":[{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"in":"query","name":"name","schema":{"type":"string"},"description":"Name of the resource."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of login options","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"example":"API7 Integrated Authentication","type":"string","minLength":1,"maxLength":256,"description":"Name of the login option."},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"provider_type":{"type":"string","enum":["ldap","oidc","saml","built_in"],"description":"The login option type.","example":"built_in"},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/ldap/{login_option_id}/login":{"post":{"tags":["User"],"summary":"Log in to API7 Enterprise using the LDAP username and password","operationId":"LDAPLogin","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"The username of the user.","type":"string","minLength":1,"maxLength":128,"example":"john"},"password":{"type":"string","description":"The password of the user.","minLength":1,"maxLength":128,"example":"safe-password"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","allOf":[{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Name of the login option.","example":"example-login"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"disable":{"type":"boolean","description":"If true, disable the login option.","default":false},"role_mapping":{"type":"array","items":{"type":"object","properties":{"role_id":{"description":"Unique identifier for the role.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"role_attribute_key":{"type":"string","description":"The key used to identify the role attribute.","example":"Position"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"example":"exact_match","description":"The operation to apply on the role attribute."},"role_attribute_value":{"type":"string","description":"The value expected for the role attribute based on the operation.","example":"Team Leader"}},"required":["role_id","role_attribute_key","operation","role_attribute_value"]},"description":"A list of role mappings defining operations and conditions under which roles are applied."},"boundary_mapping":{"type":"array","items":{"type":"object","properties":{"permission_policy_id":{"description":"Unique identifier for the boundary permission policy.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"attribute_key":{"type":"string","description":"The Name of the boundary permission policy attribute.","example":"Group"},"operation":{"type":"string","enum":["exact_match","contains_string","exact_match_in_array","contains_string_in_array"],"description":"The operation to apply on the role attribute."},"attribute_value":{"type":"string","description":"The value expected for the boundary permission policy attribute based on the operation.","example":"Finance"}},"required":["permission_policy_id","attribute_key","operation","attribute_value"]},"description":"A list of boundary mappings defining operations and conditions under which boundaries are applied."}}},{"oneOf":[{"title":"OIDC","properties":{"provider_type":{"type":"string","enum":["oidc"],"description":"The login option type."},"oidc_config":{"type":"object","description":"OIDC configuration.","required":["client_id","issuer","request_scopes","root_url"],"properties":{"client_id":{"type":"string","description":"The client ID of the OIDC provider.","example":"my-oidc-client-id"},"client_secret":{"type":"string","description":"The client secret of the OIDC provider.","example":"s3cr3tK3yForOIDC"},"issuer":{"type":"string","description":"The issuer URL of the OIDC provider.","example":"https://accounts.example.com"},"request_scopes":{"type":"array","items":{"type":"string"},"description":"The request scopes of the OIDC provider.","example":["openid","email","profile"]},"ssl_verify":{"type":"boolean","description":"If true, verify the SSL certificate of the OIDC provider.","default":true},"callback_url":{"type":"string","description":"The root URL for the OIDC provider used to generate the callback URL.","example":"http://127.0.0.1:7080"},"logout_url":{"type":"string","description":"The logout URL of the OIDC provider.","example":"https://accounts.example.com/logout"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"SAML","properties":{"provider_type":{"type":"string","enum":["saml"],"description":"The login option type."},"saml_config":{"type":"object","description":"SAML configuration.","required":["idp_metadata_url","sp_root_url"],"properties":{"idp_metadata_url":{"type":"string","description":"The IdP metadata URL of the SAML provider."},"sp_root_url":{"type":"string","description":"The SP root URL of the SAML provider."},"sp_acs_url":{"type":"string","description":"The SP ACS URL of the SAML provider."},"sp_slo_url":{"type":"string","description":"The SP SLO URL of the SAML provider."},"sp_metadata_url":{"type":"string","description":"The SP metadata URL of the SAML provider."},"sign_request":{"type":"boolean","description":"Whether to sign the request of the SAML provider."},"certificate":{"type":"string","description":"The certificate of the SAML provider."},"entity_id":{"type":"string","description":"The entity ID of the SAML provider."},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}}}}}},{"title":"LDAP","properties":{"provider_type":{"type":"string","enum":["ldap"],"description":"The login option type."},"ldap_config":{"type":"object","description":"LDAP configuration.","required":["host","port","base_dn","bind_dn","identifier"],"properties":{"host":{"type":"string","description":"The host domain of the LDAP server."},"port":{"type":"string","description":"The port ID of the LDAP server."},"base_dn":{"type":"string","description":"The base DN of the LDAP server."},"bind_dn":{"type":"string","description":"Search user bind DN."},"bind_password":{"type":"string","description":"Search user bind password."},"identifier":{"type":"string","description":"The identifier of the LDAP server. Together with the username, it forms the full DN.","example":"cn"},"attributes":{"type":"object","description":"The attributes used to map the user information to API7 Enterprise.","additionalProperties":{"type":"string"},"example":{"first_name":"john","last_name":"doe","username":"johndoe"}},"timeout":{"type":"integer","description":"Timeout in seconds.","default":10,"minimum":0},"use_ssl":{"type":"boolean","description":"Set it to true if the LDAP server uses an encrypted TLS connection.","default":false},"ssl_verify":{"type":"boolean","description":"Set it to false if you want to skip SSL certificate validation.","default":true},"root_ca_cert":{"type":"string","description":"Set the data of your root CA certificate."},"client_cert":{"type":"string","description":"The client certificate."},"client_key":{"type":"string","description":"The client private key."}}}}},{"title":"Built-in","properties":{"provider_type":{"type":"string","enum":["built_in"],"description":"The login option type."},"builtin_config":{"type":"object","description":"Built-in configuration.","properties":{"login_with_email":{"type":"boolean","description":"If true, enable email login.","default":false}}}}}]}]}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/ldap/{login_option_id}/logout":{"post":{"tags":["User"],"summary":"Log out from API7 Enterprise using the LDAP username and password","operationId":"LDAPLogout","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}}}}},"/api/cas/{login_option_id}/login":{"get":{"tags":["User"],"summary":"Log in using the CAS provider","operationId":"CASLogin","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"ticket","in":"query","description":"The field of the CAS protocol.","schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to IdP.","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/cas/{login_option_id}/logout":{"get":{"tags":["User"],"summary":"Log out using the CAS provider","operationId":"CASLogout","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"redirect","in":"query","required":true,"schema":{"type":"string"},"description":"Redirect to the given URL after logout."}],"responses":{"302":{"description":"Redirect to IdP.","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/oidc/{login_option_id}/login":{"get":{"tags":["User"],"summary":"Log in using the OIDC provider","operationId":"OIDCLogin","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"307":{"description":"Redirect","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/oidc/{login_option_id}/callback":{"get":{"tags":["User"],"summary":"Log in using the OIDC provider","operationId":"OIDCCallback","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"state","in":"query","description":"The field of the OIDC protocol.","required":true,"schema":{"type":"string"}},{"name":"code","in":"query","description":"The field of the OIDC protocol.","required":true,"schema":{"type":"string"}}],"responses":{"303":{"description":"Redirect to the home page.","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/oidc/{login_option_id}/logout":{"get":{"tags":["User"],"summary":"Log out using the OIDC provider","operationId":"OIDCLogout","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"307":{"description":"Redirect","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/version":{"get":{"tags":["Common"],"summary":"Get Dashboard Version","operationId":"getDashboardVersion","responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"description":"Dashboard version.","type":"string","example":"dev"}}}]}}}}}}},"/api/custom_plugins":{"get":{"tags":["Custom Plugin"],"summary":"List all custom plugins","operationId":"listCustomPlugins","description":"IAM Action: `gateway:GetCustomPlugin`, Resource: `arn:api7:gateway:gatewaysetting/*`","parameters":[{"name":"gateway_group_id","description":"Gateway group ID.","in":"query","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"in":"query","name":"name","schema":{"type":"string"},"description":"Name of the resource."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"Array of custom plugins.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The name of the plugin.","example":"route-id-register"},"version":{"type":"string","description":"The version of the plugin.","example":"0.2"},"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"},"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="},"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"is_obfuscated":{"type":"boolean","description":"Whether the custom plugin’s source code is obfuscated into bytecode.","example":false},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"post":{"tags":["Custom Plugin"],"summary":"Create a custom plugin","operationId":"createCustomPlugin","description":"IAM Action: `gateway:CreateCustomPlugin`, Resource: `arn:api7:gateway:gatewaysetting/*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}},"oneOf":[{"title":"Plugin Source Code","required":["source_code","gateway_groups"],"properties":{"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"}}},{"title":"Plugin File","required":["file","gateway_groups"],"properties":{"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The name of the plugin.","example":"route-id-register"},"version":{"type":"string","description":"The version of the plugin.","example":"0.2"},"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"},"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="},"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"is_obfuscated":{"type":"boolean","description":"Whether the custom plugin’s source code is obfuscated into bytecode.","example":false},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/custom_plugins/{custom_plugin_id}":{"get":{"tags":["Custom Plugin"],"summary":"Get a custom plugin","operationId":"getCustomPlugin","description":"IAM Action: `gateway:GetCustomPlugin`, Resource: `arn:api7:gateway:gatewaysetting/*`","parameters":[{"name":"custom_plugin_id","in":"path","required":true,"description":"Custom plugin ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The name of the plugin.","example":"route-id-register"},"version":{"type":"string","description":"The version of the plugin.","example":"0.2"},"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"},"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="},"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"is_obfuscated":{"type":"boolean","description":"Whether the custom plugin’s source code is obfuscated into bytecode.","example":false},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"put":{"tags":["Custom Plugin"],"summary":"Update a custom plugin","operationId":"putCustomPlugin","description":"IAM Action: `gateway:UpdateCustomPlugin`, Resource: `arn:api7:gateway:gatewaysetting/*`","parameters":[{"name":"custom_plugin_id","in":"path","required":true,"description":"Custom plugin ID.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}}},"oneOf":[{"title":"Plugin Source Code","required":["source_code","gateway_groups"],"properties":{"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"}}},{"title":"Plugin File","required":["file","gateway_groups"],"properties":{"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"name":{"type":"string","description":"The name of the plugin.","example":"route-id-register"},"version":{"type":"string","description":"The version of the plugin.","example":"0.2"},"source_code":{"type":"string","description":"The source code for the plugin.","example":"local core = require(\"apisix.core\")\nlocal ngx = ngx\n\nlocal schema = {\n    type = \"object\"\n}\n\nlocal plugin_name = \"route-id-register\"\n\nlocal _M = {\n  version = 0.2,\n  priority = 1,\n  name = plugin_name,\n  schema = schema,\n  scope = \"global\",\n}\n\nfunction _M.check_schema(conf)\n  return core.schema.check(schema, conf);\nend\n\nfunction _M.log(conf, ctx)\n  if ctx.var.route_id then\n    ngx.var.route_id = ctx.var.route_id\n  end\nend\n\nreturn _M\n"},"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="},"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin.","example":"This plugin records the matched route’s ID into an Nginx variable ($route_id) for use in logging and monitoring."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="},"is_obfuscated":{"type":"boolean","description":"Whether the custom plugin’s source code is obfuscated into bytecode.","example":false},"gateway_groups":{"type":"array","description":"An array of gateway group IDs that the custom plugin is associated with.","items":{"description":"The gateway group ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}},"delete":{"tags":["Custom Plugin"],"summary":"Delete a custom plugin","operationId":"deleteCustomPlugin","description":"IAM Action: `gateway:DeleteCustomPlugin`, Resource: `arn:api7:gateway:gatewaysetting/*`","parameters":[{"name":"custom_plugin_id","in":"path","required":true,"description":"Custom plugin ID.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/custom_plugins/code/parse":{"put":{"tags":["Custom Plugin"],"summary":"Parse custom plugin code","operationId":"parseCustomPluginCode","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","description":"Base64-encoded ZIP archive that contains the plugin package. The archive includes the plugin code and the plugin metadata.","example":"bG9jYWwgY29yZSA9IHJlcXVpcmUoImFwaXNpeC5jb3JlIikKbG9jYWwgbmd4ID0gbmd4Cgpsb2NhbCBzY2hlbWEgPSB7CiAgICB0eXBlID0gIm9iamVjdCIKfQoKbG9jYWwgcGx1Z2luX25hbWUgPSAicm91dGUtaWQtcmVnaXN0ZXIiCgpsb2NhbCBfTSA9IHsKICB2ZXJzaW9uID0gMC4yLAogIHByaW9yaXR5ID0gMSwKICBuYW1lID0gcGx1Z2luX25hbWUsCiAgc2NoZW1hID0gc2NoZW1hLAogIHNjb3BlID0gImdsb2JhbCIsCn0KCmZ1bmN0aW9uIF9NLmNoZWNrX3NjaGVtYShjb25mKQogIHJldHVybiBjb3JlLnNjaGVtYS5jaGVjayhzY2hlbWEsIGNvbmYpOwplbmQKCmZ1bmN0aW9uIF9NLmxvZyhjb25mLCBjdHgpCiAgaWYgY3R4LnZhci5yb3V0ZV9pZCB0aGVuCiAgICBuZ3gudmFyLnJvdXRlX2lkID0gY3R4LnZhci5yb3V0ZV9pZAogIGVuZAplbmQKCnJldHVybiBfTQo="}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","properties":{"name":{"type":"string","description":"The name of the plugin.","example":"route-id-register"},"version":{"type":"string","description":"The version of the plugin.","example":"0.2"},"catalog":{"type":"string","description":"Plugin category, such as \"Traffic\" or \"Observability\".","example":"General"},"description":{"type":"string","description":"A brief description of the plugin."},"documentation_link":{"type":"string","description":"Link to the plugin's documentation.","example":"https://docs.api7.ai/hub/route-id-register"},"author":{"type":"string","description":"Author of the plugin.","example":"plugindev"},"logo":{"type":"string","description":"The base64-encoded logo image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4SURBVHgBrVVLUhsxEH3SaBJSxJQWLLJKzAkClcqCVcINkhuYk6RygnCDkBOYI3iXTVKQE9ipggIGKKb42TAjNWrbY0+BkcY2b6ceqV/3688Ac6CrF+r/tfzmuyMxI25rL75klO+exDbFcxP0luItAjXbKteSsOe7qzAFWBJpbZOIVhNlkAkgyvHP96ZyBiyJMGaXnd8JQhJZgNBZSzGfRKS1LiRxR822dpwPPgq/PAyvRCzJnb1pukhXC9uZi5ylGfgPEzyZQbcWNwpJChtLcxyZ8WOaMYPua/XZRffzoT1xzq0Yn3vGX+B+EJOMr67yFkXZivO1XdjOnTRpROVr6XqKDmYh6JO4xy8vs00mMpJ2kpI0QwTl8RKUiZSlX+9yhcWSPqIiQaVBEyQ/Lbi2X7EK19LiULlOArWqvK00aC7wUSctWom3WcQZNH6/QT30VqACerX4HMMhY+yrfFxwgW3H9339aHLBgwQ8bG4e2sWZu+lAPSq4m0VsfDxF66E9KJE02Uge099Bj5ynzntjknNGuMgk3hd5JqU1McReluOrbx7CRRaynwGvCd5DIzOw5Vb1RmjYghkQdxCVNuhAks0PZ9hBBXgJSEPfGqoXPxdUkGQq8NK7WFL0Zxn0dxk/MAO8GQhX4E6cTSXJVAQnsdHXBmvzSHIP3R3bZScnj8UAAAAASUVORK5CYII="}}}}}]}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/saml/{login_option_id}/login":{"get":{"tags":["User"],"summary":"SAML login (redirect to IdP and call back to Dashboard)","operationId":"SAMLLogin","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"redirect_uri","in":"query","schema":{"type":"string","minLength":1,"pattern":"^/"},"description":"Path to be redirected after callback."}],"responses":{"302":{"description":"Redirect to IdP.","content":{}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/saml/{login_option_id}/logout":{"get":{"tags":["User"],"summary":"SAML Logout (redirect to IdP and call back to Dashboard)","operationId":"SAMLLogout","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"redirect_uri","in":"query","schema":{"type":"string","minLength":1,"pattern":"^/"},"description":"Path to be redirected after callback."}],"responses":{"302":{"description":"Redirect to IdP.","content":{}}}}},"/api/saml/{login_option_id}/acs":{"post":{"operationId":"SAMLACSCallback","tags":["User"],"summary":"SAML ACS/SLO callback (from IdP to Dashboard)","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["SAMLResponse"],"properties":{"SAMLResponse":{"type":"string","description":"Base64 encoded SAML response"},"RelayState":{"type":"string","description":"State information to be relayed with the response"}}}}}},"responses":{"302":{"description":"Redirect to IdP.","content":{}}}}},"/api/saml/{login_option_id}/slo":{"get":{"tags":["User"],"summary":"SAML ACS/SLO callback (from IdP to Dashboard)","operationId":"SAMLSLO","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."},{"name":"SAMLResponse","in":"query","required":true,"schema":{"type":"string"},"description":"Base64 encoded SAML response."},{"name":"RelayState","in":"query","required":false,"schema":{"type":"string"},"description":"State information to be relayed with the response."}],"responses":{"302":{"description":"Redirect to IdP.","content":{}}}},"post":{"operationId":"SAMLSLOCallback","tags":["User"],"summary":"SAML ACS/SLO callback (from IdP to Dashboard)","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["SAMLResponse"],"properties":{"SAMLResponse":{"type":"string","description":"Base64 encoded SAML response"},"RelayState":{"type":"string","description":"State information to be relayed with the response"}}}}}},"responses":{"302":{"description":"Redirect to IdP.","content":{}}}}},"/api/saml/{login_option_id}/metadata":{"get":{"tags":["User"],"summary":"SAML SP metadata","operationId":"SAMLMetadata","parameters":[{"name":"login_option_id","in":"path","required":true,"schema":{"type":"string"},"description":"Login option ID."}],"responses":{"200":{"description":"saml metadata xml response","content":{"application/samlmetadata+xml":{"schema":{"type":"string"}}}}}}},"/api/parse_certificate":{"put":{"tags":["SSL"],"summary":"Parse an SSL certificate","operationId":"parseCertificate","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}},"required":["cert"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of certificates metadata.","items":{"type":"object","properties":{"common_name":{"type":"string","description":"The common name of the certificate.","example":"example.com"},"subject_alt_names":{"type":"array","description":"The subject alternative names of the certificate.","items":{"type":"string","example":"www.example.com"}},"snis":{"type":"array","items":{"type":"string"}},"not_before":{"type":"string","format":"date-time","nullable":true},"not_after":{"type":"string","format":"date-time","nullable":true},"subject":{"type":"string"},"issuer":{"type":"string"},"serial_number":{"type":"string"},"signature_algorithm":{"type":"string"},"extensions":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/validate_cert_key":{"put":{"tags":["SSL"],"summary":"Validate an SSL certificate and key","operationId":"validateCertKey","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cert":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"},"key":{"type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}},"required":["cert","key"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"value":{"type":"boolean","description":"If true, the SSL certificate and key are valid."}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/contact_points":{"post":{"tags":["Contact Point"],"summary":"Create a contact point","operationId":"createContactPoint","description":"IAM Action: `iam:CreateContactPoint`, Resource: `arn:api7:iam:contactpoint/*`","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"get":{"tags":["Contact Point"],"summary":"List Contact Points","operationId":"listContactPoints","description":"IAM Action: `iam:GetContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["email","webhook"]}},{"name":"labels","in":"query","required":false,"description":"Label(s) to filter resources by. The format is `labels[key]=value` and should be URL-encoded.","schema":{"type":"string","minLength":1,"example":"labels%5Bversion%5D=v2"}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"},{"name":"order_by","in":"query","description":"Index to order resources by.","schema":{"type":"string","default":"updated_at","enum":["created_at","updated_at"],"description":"Ascending or descending order to list the resources, by `created_at` or `updated_by` configured in `order_by`."}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of contact points.","items":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/contact_points/{contact_point_id}":{"get":{"tags":["Contact Point"],"summary":"Get a contact point","operationId":"getContactPoint","description":"IAM Action: `iam:GetContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"contact_point_id","in":"path","required":true,"description":"Contact point ID.","schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"put":{"tags":["Contact Point"],"summary":"Update a contact point","operationId":"putContactPoint","description":"IAM Action: `iam:UpdateContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"contact_point_id","in":"path","required":true,"description":"Contact point ID.","schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"allOf":[{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test","minLength":1,"maxLength":256},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}},{"oneOf":[{"title":"Email","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["email"]},"email_config":{"type":"object","description":"Contact point email configurations.","properties":{"email":{"type":"array","items":{"type":"string","format":"email"}}}}},"required":["email_config"]},{"title":"Webhook","type":"object","properties":{"type":{"type":"string","description":"Type of contact point.","enum":["webhook"]},"webhook_config":{"type":"object","description":"Contact point webhook configurations.","properties":{"ssl_verify":{"type":"boolean","description":"If true, perform SSL verification."},"url":{"type":"string","description":"Webhook URL.","format":"url","minLength":1,"maxLength":1024},"method":{"type":"string","description":"HTTP method of the webhook request.","default":"POST","enum":["POST"]},"headers":{"type":"array","description":"Extra HTTP headers to take when sending requests.","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[-_a-zA-Z0-9]+$"},"value":{"type":"string","minLength":1,"maxLength":64}}}}}}},"required":["webhook_config"]}]}],"required":["name","type"]},{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235}}}]}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}},"delete":{"tags":["Contact Point"],"summary":"Delete a contact point","operationId":"deleteContactPoint","description":"IAM Action: `iam:DeleteContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"contact_point_id","in":"path","required":true,"description":"Contact point ID.","schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","example":""}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/contact_points/{contact_point_id}/notification_logs":{"get":{"tags":["Contact Point"],"summary":"List notification logs of a contact point","operationId":"listContactPointNotificationLogs","description":"IAM Action: `iam:GetContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"contact_point_id","in":"path","required":true,"description":"Contact point ID.","schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"in":"query","name":"start_at","description":"Start at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"in":"query","name":"end_at","description":"End at timestamp to filter the audit logs.","schema":{"type":"integer"}},{"name":"resource_type","in":"query","schema":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]}},{"name":"status","in":"query","description":"Notification sending status.","schema":{"type":"string","enum":["success","failed"]}},{"name":"order_by","in":"query","description":"Index to order the notifications by.","schema":{"type":"string","default":"send_time","enum":["send_time"]}},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of notification list.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"contact_point_name":{"type":"string","description":"Name of the contact point.","example":"cp-docs-test"},"resource_type":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]},"resource_id":{"description":"The resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"resource_name":{"example":"Weather Insights API","description":"The object name.","type":"string","minLength":1,"maxLength":100},"status":{"type":"string","description":"Notification sending status.","enum":["success","failed"],"example":"failed"},"send_time":{"type":"integer","example":1759649130,"description":"The time when the notification is sent."},"request":{"type":"string","description":"Request information.","example":"{\"from\": \"test.send@api7.ai\", \"to\": \"test.receive@api7.ai\", \"subject\": \"API7 Notification\", \"content\": \"This is a test notification.\"}"},"response":{"type":"string","description":"Response from the server.","example":"450 The domain must be verified in your account to send emails."}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/contact_points/{contact_point_id}/usages":{"get":{"tags":["Contact Point"],"summary":"List a contact point usages","operationId":"getContactPointUsages","description":"IAM Action: `iam:GetContactPoint`, Resource: `arn:api7:iam:contactpoint/%s`","parameters":[{"name":"contact_point_id","in":"path","required":true,"description":"Contact point ID.","schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},{"name":"resource_type","in":"query","schema":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"An array of contact point usages.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"resource_type":{"type":"string","description":"Type of notification.","enum":["alert_policy","api_product_notification"]},"resource_id":{"description":"The resource ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"b32e678e-7f6b-4a50-b113-550621ed4c01"},"resource_name":{"description":"The resource name.","example":"Weather Insights API","type":"string","minLength":1,"maxLength":100}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/resource_names":{"post":{"tags":["Common"],"summary":"Get resource names","operationId":"queryResourceNames","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"Gateway Groups / Contact Points","type":"object","properties":{"resource_type":{"description":"Resource type.","type":"string","enum":["gateway_group","contact_point"]},"ids":{"type":"array","uniqueItems":true,"minItems":1,"description":"An array of resource IDs.","items":{"type":"string","minLength":1}}},"required":["resource_type","ids"],"additionalProperties":false},{"title":"Resources in a Gateway Group","type":"object","properties":{"resource_type":{"type":"string","description":"Resource type.","enum":["sni","certificate","ca_certificate"]},"ids":{"type":"array","uniqueItems":true,"minItems":1,"description":"An array of resource IDs.","items":{"type":"string","minLength":1}},"gateway_group_id":{"type":"string","description":"The gateway group ID.","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bc1b95c9-b348-4832-acc3-e257d2342df1"}},"required":["resource_type","ids","gateway_group_id"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}},{"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}}}]},"example":{"value":{"b5f57bda-b52b-41f6-9a30-a4c6442a3a74":"gateway-group-1","f6ef6104-32a3-4382-a4b8-07cc17c466d8":"gateway-group-2"}}}}},"400":{"description":"Invalid arguments. Error details will be provided in the response.","content":{}}}}},"/api/approvals":{"get":{"tags":["Approval"],"summary":"List approvals","operationId":"listApprovals","description":"For event type `api_product_subscription`: IAM Action: `portal:ApproveAPIProductSubscription`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s` For event type `developer_registration`: IAM Action: `portal:ApproveDeveloperSignUp`, Resource: `arn:api7:portal:portal/%s/developer/*`","parameters":[{"name":"status","in":"query","schema":{"type":"string","description":"Approval status.","enum":["pending","finished"]}},{"name":"result","in":"query","schema":{"type":"string","description":"Approval outcome.","enum":["accepted","rejected","cancelled"]}},{"name":"event","in":"query","schema":{"type":"string","description":"Approval event.","enum":["api_product_subscription","developer_registration"]}},{"name":"resource_type","in":"query","schema":{"type":"string","description":"Resource type.","enum":["api_product","developer"]}},{"name":"resource_name","in":"query","description":"Resource name.","schema":{"type":"string"}},{"name":"operator_name","description":"Operator name.","in":"query","schema":{"type":"string"}},{"name":"applicant_name","in":"query","description":"Applicant name.","schema":{"type":"string"}},{"name":"page","schema":{"type":"integer","format":"int64","minimum":1},"description":"Page number of the listed resources. Used together with `page_size`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"page_size","schema":{"type":"integer","format":"int64","minimum":1},"description":"Number of resources listed per page. Used together with `page`. For example, when there are 13 resources in total, if the query parameters are `page=1&page_size=10`, the GET response will show the route `total` as `13` and display 10 resources in the first page. If the query parameters are `page=2&page_size=10`, the GET response will show the route `total` as `13` and display 3 resources in the second page.","in":"query"},{"name":"direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order to list the resources by. The sorting index follows the configuration of `order_by`.","in":"query"},{"name":"order_by","in":"query","schema":{"type":"string","default":"applied_at","description":"Index to order approvals by.","enum":["applied_at","resource_name","operated_at"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Condition to search resources by.","example":"version%3Dv2"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"type":"object","description":"The outer structure for encapsulating a list of resources.","properties":{"list":{"type":"array","description":"An array of resources.","items":{"type":"object"}},"total":{"type":"integer","minimum":0,"example":1,"description":"Total number of objects."}}},{"type":"object","properties":{"list":{"type":"array","description":"The array of approval.","items":{"type":"object","properties":{"id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"created_at":{"description":"The object created timestamp.","type":"integer","minimum":0,"example":1742288232},"updated_at":{"description":"The object updated timestamp.","type":"integer","minimum":0,"example":1742288235},"event":{"type":"string","description":"Approval event.","enum":["api_product_subscription","developer_registration"]},"resource_type":{"type":"string","description":"Resource type.","enum":["api_product","developer"]},"resource_id":{"description":"The resource ID.","type":"string","example":"cf232ad4-2e9a-4dc0-ad6f-9c1a898465ae"},"resource_name":{"type":"string","description":"Resource name.","example":"Weather Insights API"},"applicant_type":{"type":"string","description":"Applicant type.","enum":["developer"]},"applicant_id":{"type":"string","description":"When `applicant_type` is `developer`, the applicant ID is the developer ID.","example":"78c93683-3eb3-4129-bb57-3a564a0ab2b0"},"applicant_name":{"type":"string","description":"When `applicant_type` is `developer`, the applicant name is the developer name.","example":"dev1"},"applied_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"result":{"type":"string","description":"Approval outcome.","enum":["accepted","rejected","cancelled"]},"operator_id":{"type":"string","description":"Operator ID.","example":"bf073ca7-ada6-4e75-be80-730436798cce"},"operator_name":{"type":"string","description":"Operator name.","example":"admin1"},"operated_at":{"description":"The object timestamp.","type":"integer","minimum":0,"example":1742288230},"portal_id":{"type":"string","description":"Portal ID."},"portal_name":{"type":"string","description":"Portal name."},"status":{"type":"string","description":"Approval status.","enum":["pending","finished"]}}}}}}]}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/approvals/{approval_id}/accept":{"post":{"tags":["Approval"],"summary":"Accept an approval request","operationId":"acceptApproval","description":"For event type `api_product_subscription`: IAM Action: `portal:ApproveAPIProductSubscription`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s` For event type `developer_registration`: IAM Action: `portal:ApproveDeveloperSignUp`, Resource: `arn:api7:portal:portal/%s/developer/*`","parameters":[{"name":"approval_id","in":"path","description":"Approval ID.","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}},"/api/approvals/{approval_id}/reject":{"post":{"tags":["Approval"],"summary":"Reject an approval request","operationId":"rejectApproval","description":"For event type `api_product_subscription`: IAM Action: `portal:ApproveAPIProductSubscription`, Resource: `arn:api7:portal:portal/%s/apiproduct/%s` For event type `developer_registration`: IAM Action: `portal:ApproveDeveloperSignUp`, Resource: `arn:api7:portal:portal/%s/developer/*`","parameters":[{"name":"approval_id","in":"path","description":"Approval ID.","required":true,"schema":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The outer structure for encapsulating the specific resource.","properties":{"value":{"type":"object","description":"The specific resource."}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"object","description":"The specific resource.","example":{}},"error_msg":{"type":"string","description":"The error message.","example":"error message"}}}}}}}}}},"components":{"schemas":{"HTTPService":{"type":"object","required":["name"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"type":{"type":"string","description":"Type of service. `http` corresponds to L7 service and `stream` corresponds to L4 service.","enum":["http","stream"],"default":"http"},"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]}}},"StreamService":{"type":"object","required":["name"],"properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}},"type":{"type":"string","description":"Type of service. `stream` corresponds to L4 service.","enum":["stream"]},"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}}}},"HTTPUpstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},"StreamUpstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}},"HTTPRoute":{"description":"The route description.","type":"object","required":["name","paths"],"allOf":[{"type":"object","properties":{"name":{"maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"methods":{"description":"The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.","type":"array","uniqueItems":true,"minItems":1,"maxItems":9,"items":{"type":"string","description":"The API (HTTP) method.","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"]}},"vars":{"description":"Conditions in the format of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions) to match requests to routes. Case sensitive when matching a cookie name.","type":"array","example":[["arg_version","==","v2"],["arg_ttl","<",3600]],"items":{}},"paths":{"maxItems":64,"minItems":1,"type":"array","description":"The URL path(s) (after the service's `path_prefix`) that the route will listen to. Each path should start with a `/`.","items":{"type":"string","minLength":1,"maxLength":4096,"example":"/get"}},"priority":{"type":"integer","default":0,"description":"Priority of the route. A higher value corresponds to a higher priority. If different Routes matches to the same URI, then the Route with the highest priority will be matched."},"enable_websocket":{"type":"boolean","description":"If true, enable Websocket proxying for the route.","nullable":true}}},{"type":"object","properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}}]},"HTTPServiceRuntimeConfiguration":{"type":"object","minProperties":1,"properties":{"hosts":{"type":"array","description":"The hosts of the service to accept incoming requests.","uniqueItems":true,"minItems":1,"maxItems":32,"items":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"}},"path_prefix":{"maxLength":4096,"minLength":1,"pattern":"^/","type":"string","description":"The listening path prefix of the service.","example":"/test"},"strip_path_prefix":{"type":"boolean","default":true,"description":"If true, strip the path prefix when proxying the request to the upstream."},"upstream":{"description":"The upstream contains necessary information for the gateway to proxy\nrequest to the backend service.\n","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The upstream name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `http`.","type":"string","enum":["http","https","grpc","grpcs"],"default":"http"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","default":"roundrobin","description":"Load balancing algorithm to distribute traffic.","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream.","minimum":0,"maximum":65535,"type":"integer","example":50},"keepalive_pool":{"description":"Upstream keepalive connection pool.","type":"object","properties":{"size":{"description":"The number of idle keepalive connections per worker to upstream servers.","minimum":1,"type":"integer","default":320},"idle_timeout":{"description":"Time an idle keepalive connection remains open before being closed, in seconds.","minimum":0,"type":"number","format":"float","default":60},"requests":{"description":"The number of requests a single keepalive connection can handle before closing.","minimum":1,"type":"integer","default":1000}}},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"pass_host":{"type":"string","description":"The approach to decide the host header before forwarding requests to an upstream.\n* `pass` uses the host specified in the service.\n* `node` uses the host specified in the upstream.\n* `rewrite` uses custom host.","enum":["pass","node","rewrite"],"default":"pass"},"upstream_host":{"description":"Value to rewrite the host header to. Only used if `pass_host` is `rewrite`.","type":"string","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"nodes":{"type":"array","description":"The upstream endpoints.","example":[{"host":"httpbin.org","port":8080,"weight":100}],"items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"service_name":{"description":"Service name in the service registry. Only valid for service discovery.","type":"string","minLength":1,"maxLength":256,"example":"<ServiceRegistryID>/public/group/httpbin"},"discovery_type":{"type":"string","description":"Type of service discovery. Only valid for service discovery.","enum":["kubernetes","nacos"],"example":"nacos"},"discovery_args":{"description":"Service discovery arguments. Only valid for service discovery.","type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"},"example":{"namespace_id":"public","group_name":"DEFAULT_GROUP"}}}},"tls":{"deprecated":true,"description":"Replace with `client_certificate` and `ca_certificates`","oneOf":[{"properties":{"client_cert":{"type":"string","description":"Certificate.","oneOf":[{"title":"Certificate Reference","description":"Path to the certificate in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Certificate Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The certificate in PEM format.","example":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}]},"client_key":{"type":"string","description":"Private key.","oneOf":[{"title":"Private Key Reference","description":"Path to the private key in environment variable or secret manager.","type":"string","pattern":"^\\$(secret|env|ENV)://","example":"$secret://aws/john/apisix-secrets/john-key-auth"},{"title":"Private Key Content","type":"string","minLength":1,"maxLength":65536,"pattern":"^[^\\$]","description":"The private key in PEM format.","example":"-----BEGIN PRIVATE KEY-----\\nexample-private-key-redacted\\n-----END PRIVATE KEY-----"}]}},"required":["client_cert","client_key"]},{"properties":{"client_cert_id":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"required":["client_cert_id"]}]},"client_certificate":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"},"ca_certificates":{"type":"array","description":"CA certificates.","items":{"description":"The object ID.","type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":256,"example":"bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"}},"tls_verify":{"type":"boolean","description":"If true, verify TLS."},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}},"oneOf":[{"title":"Use Upstream Nodes","required":["nodes"]},{"title":"Use Service Registry","required":["service_name","discovery_type"]}]},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},"StreamServiceRuntimeConfiguration":{"type":"object","minProperties":1,"properties":{"upstream":{"description":"Upstream configurations.","type":"object","properties":{"name":{"default":"default","maxLength":65536,"description":"The object name.","type":"string","minLength":1,"example":"us-west-rsc"},"scheme":{"description":"The protocol that is used for communicating with the backend service when the service type is `stream`.","type":"string","enum":["tcp","udp"],"default":"tcp"},"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"type":{"type":"string","description":"Load balancing algorithm to distribute traffic.","default":"roundrobin","example":"chash","enum":["chash","roundrobin","least_conn","ewma"]},"hash_on":{"description":"Type of value to hash on when `type` is `chash`.","type":"string","enum":["vars","header","cookie","consumer","vars_combinations"],"default":"vars"},"key":{"type":"string","minLength":1,"description":"The `key` is used when `type` is `chash`. The corresponding upstream ID is determined based on the `hash_on` and `key` values. - When `hash_on` is set to `vars`, `key` is required and supports [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `vars_combinations`, `key` is required and supports a combination of [built-in variables](https://docs.api7.ai/enterprise/reference/built-in-variables). - When `hash_on` is set to `header`, `key` is required and should be the name of the header. - When `hash_on` is set to `cookie`, `key` is required and should be the name of the cookie. - When `hash_on` is set to `consumer`, `key` is not required, as the hash algorithm uses the authenticated consumer name.","example":"$host"},"retries":{"description":"The number of retries while passing the request to an upstream using the underlying Nginx mechanism.","minimum":0,"maximum":65535,"type":"integer"},"retry_timeout":{"description":"Timeout to continue with retries. Setting this to 0 disables the retry timeout.","type":"number","format":"float","minimum":0,"default":0},"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"nodes":{"type":"array","description":"The upstream endpoints.","items":{"description":"The definition for an upstream endpoint.","required":["host","port","weight"],"type":"object","properties":{"host":{"description":"Upstream host.","pattern":"^\\\\*?[0-9a-zA-Z-._]+$","type":"string","example":"httpbin.org"},"port":{"description":"Upstream port.","maximum":65535,"minimum":1,"type":"integer","example":8080},"weight":{"description":"Upstream weight.","maximum":65535,"minimum":0,"type":"integer","example":100},"priority":{"description":"Node priority. A higher value corresponds to a higher priority.","type":"integer","default":0}}}},"checks":{"type":"object","description":"Health check configurations.","anyOf":[{"title":"Active Check","type":"object","required":["active"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}}}},{"title":"Passive Check","type":"object","required":["active","passive"],"properties":{"active":{"type":"object","description":"Active health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"timeout":{"type":"number","format":"float","default":1,"description":"Active check timeout in seconds."},"concurrency":{"type":"integer","format":"int64","default":10,"description":"The number of targets to be checked at the same time during the active check."},"host":{"type":"string","description":"The HTTP host.","pattern":"^\\*?[0-9a-zA-Z-._]+$","example":"httpbin.org"},"port":{"type":"integer","minimum":1,"maximum":65535,"format":"int64","description":"By default, the port is the same as the one defined in the upstream target."},"http_path":{"type":"string","default":"/","description":"The HTTP path in HTTP probe requests."},"https_verify_certificate":{"type":"boolean","description":"Whether to verify the target's TLS certificate.","default":true},"req_headers":{"type":"array","description":"The request headers.","minItems":1,"uniqueItems":true,"items":{"type":"string","example":"user-agent: go/1.20"}},"healthy":{"type":"object","description":"Active health check healthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking healthy targets in seconds."},"http_statuses":{"default":[200,302],"type":"array","minItems":1,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":1,"type":"integer","default":2,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Active health check unhealthy configurations.","properties":{"interval":{"default":1,"minimum":1,"type":"integer","format":"int64","description":"Time interval of checking unhealthy targets in seconds."},"http_statuses":{"type":"array","default":[429,404,500,501,502,503,504,505],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"http_failures":{"minimum":1,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."},"tcp_failures":{"minimum":1,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":1,"maximum":254,"default":3,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."}}}}},"passive":{"type":"object","description":"Passive health check configurations.","properties":{"type":{"type":"string","enum":["http","https","tcp"],"default":"http","description":"Active check probing type."},"healthy":{"type":"object","description":"Passive health check healthy configurations.","properties":{"http_statuses":{"type":"array","default":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered healthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"successes":{"minimum":0,"type":"integer","default":5,"format":"int64","description":"The number of successful probes to define a healthy target."}}},"unhealthy":{"type":"object","description":"Passive health check unhealthy configurations.","properties":{"http_statuses":{"type":"array","default":[429,500,503],"minItems":1,"uniqueItems":true,"description":"A list of HTTP response status codes which are considered unhealthy.","items":{"minimum":200,"maximum":599,"type":"integer"}},"tcp_failures":{"minimum":0,"maximum":254,"type":"integer","default":2,"format":"int64","description":"The number of TCP-related failures to define an unhealthy target."},"timeouts":{"minimum":0,"maximum":254,"default":7,"type":"integer","format":"int64","description":"The number of probe timeouts to define an unhealthy target."},"http_failures":{"minimum":0,"maximum":254,"type":"integer","default":5,"format":"int64","description":"The number of HTTP-related failures to define an unhealthy target."}}}}}}}]}}},"status":{"description":"The object status. 1 means the object is active while 0 means it's inactive.\n","type":"integer","enum":[0,1]},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},"RouteRuntimeConfiguration":{"type":"object","additionalProperties":false,"properties":{"timeout":{"description":"Timeout settings for connecting to, sending, and receiving messages from the upstream, in seconds.","type":"object","properties":{"connect":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Connection timeout in seconds."},"send":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Sending timeout in seconds."},"read":{"minimum":0,"exclusiveMinimum":true,"type":"integer","default":60,"description":"Receiving timeout in seconds."}}},"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},"StreamRouteRuntimeConfiguration":{"type":"object","additionalProperties":false,"properties":{"plugins":{"description":"Key-value pairs of plugins and their configurations on the object.","type":"object","example":{"key-auth":{}}}}},"VaultSecret":{"allOf":[{"title":"Vault","description":"HashiCorp Vault configurations when Vault is the secret provider.","type":"object","required":["uri","prefix","token"],"properties":{"uri":{"description":"Vault endpoint.","example":"http://10.42.17.8:8200","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"prefix":{"type":"string","description":"Vault prefix to access secrets.","example":"kv/apisix"},"token":{"type":"string","description":"Vault token.","example":"apisix-quickstart-vault-token"},"namespace":{"type":"string","description":"Vault namespace.","example":"apisix"},"kv_version":{"type":"string","description":"Vault KV secrets engine version.","enum":["kv-v1"],"default":"kv-v1"},"authentication_method":{"type":"string","description":"Authentication method.","enum":["token"],"default":"token"}}},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]},"AWSSecret":{"allOf":[{"title":"AWS Secret","description":"AWS Secret configurations when AWS Secret is the secret provider.","type":"object","required":["access_key_id","secret_access_key"],"properties":{"access_key_id":{"description":"AWS access key ID.","type":"string"},"secret_access_key":{"description":"AWS secret access key.","type":"string"},"session_token":{"description":"AWS session token.","type":"string"},"region":{"type":"string","description":"AWS region.","default":"us-east-1"},"endpoint_url":{"description":"AWS endpoint.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"}}},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]},"KubernetesSecret":{"allOf":[{"type":"object","description":"Kubernetes Secret configurations when Kubernetes Secret is the secret provider.","properties":{"apiserver_addr":{"description":"Kubernetes API server Address.","type":"string","pattern":"^[^/]+://([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?"},"token":{"description":"Service account token for Kubernetes API authentication","type":"string","minLength":1},"token_file":{"description":"The path to the token file of the Kubernetes service account.","type":"string","minLength":1}},"oneOf":[{"title":"Kubernetes Secret (Token)","required":["apiserver_addr","token"]},{"title":"Kubernetes Secret (Token File)","required":["apiserver_addr","token_file"]}]},{"type":"object","properties":{"desc":{"description":"The object description.","type":"string","maxLength":65536,"example":"Object description."},"labels":{"type":"object","additionalProperties":{"type":"string","pattern":"^.+$","minLength":1,"maxLength":65536},"description":"Key-value pairs of labels.","example":{"version":"v2","env":"prod"}}}}]}},"securitySchemes":{"APIKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"},"BasicAuth":{"type":"http","scheme":"basic"}}}}
