API7 Docs

Get a service registry connection on a gateway group

GET /api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}

GET /api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

service_registry_id*string

Service registry ID.

Length1 <= length
gateway_group_id*string

Gateway group ID.

Length1 <= length

Response Body

application/json

curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/service_registries/86fb9981-d9d2-4555-9df8-91ae92129335"

Successfully retrieved or modified the service registry connection.

{
  "value": {
    "name": "sample-service-registry",
    "description": "service registry description",
    "health_check": {
      "probe_interval": 15,
      "probe_timeout": 5
    },
    "type": "kubernetes",
    "kubernetes_config": {
      "service": {
        "schema": "http",
        "host": "httpbin.org",
        "port": "6443"
      },
      "namespace_selector": {
        "equal": "prod",
        "not_equal": "kube-system",
        "match": [
          "team-a"
        ],
        "not_match": [
          "test-env"
        ]
      },
      "label_selector": "app=nginx,env=prod",
      "client": {
        "token_file": "/var/run/secrets/kubernetes.io/serviceaccount/token"
      }
    },
    "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
    "gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
    "created_at": 1742288232,
    "updated_at": 1742288235,
    "status": "healthy",
    "last_connect_time": 1742288230
  }
}
Complete operation details and schema variants

GET /api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}

Get a service registry connection on a gateway group

IAM Action: gateway:GetServiceRegistry, Resource: arn:api7:gateway:gatewaygroup/%s

Parameters

  • service_registry_id (path, string, required): Service registry ID.
  • gateway_group_id (path, string, required): Gateway group ID.

Responses

  • 200: Successfully retrieved or modified the service registry connection.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional):
  • allOf variant 1
  • allOf variant 1
  • allOf variant 1
  • value.name (string, optional): The object name.
  • value.description (string, optional): Service registry description.
  • value.health_check (object, optional): Health check configurations.
  • value.health_check.probe_interval (integer, optional): The time interval for checking service registry (in seconds).
  • value.health_check.probe_timeout (integer, optional): The timeout for checking service registry (in seconds).
  • allOf variant 2
  • oneOf variant 1: Kubernetes
  • value.type (string, required): The kubernetes service type.
  • value.kubernetes_config (object, required): Kubernetes service registry configurations.
  • value.kubernetes_config.service (object, optional): The IP address of the Kubernetes API server.
  • value.kubernetes_config.service.schema (string, required):
  • value.kubernetes_config.service.host (string, required): The HTTP host.
  • value.kubernetes_config.service.port (string, required):
  • value.kubernetes_config.namespace_selector (object,null, optional): The namespace selector to filter target namespaces.
  • value.kubernetes_config.namespace_selector.equal (string, optional): Value to match namespaces whose name is exactly equal to the specified string.
  • value.kubernetes_config.namespace_selector.not_equal (string, optional): Value to exclude namespaces whose name is exactly equal to the specified string.
  • value.kubernetes_config.namespace_selector.match (array, optional): List of values to match namespaces whose names match any of the specified strings.
  • value.kubernetes_config.namespace_selector.not_match (array, optional): List of values to exclude namespaces whose names match any of the specified strings.
  • oneOf variant 1: Equal
  • oneOf variant 2: Not Equal
  • oneOf variant 3: Match
  • oneOf variant 4: Not Match
  • value.kubernetes_config.label_selector (string, optional): The label selector to filter target endpoints.
  • value.kubernetes_config.client (object, optional): The client name.
  • oneOf variant 1: Token File
  • value.kubernetes_config.client.token_file (string, required): The path to the token file of the Kubernetes service account.
  • oneOf variant 2: Token Value
  • value.kubernetes_config.client.token (string, required): The token of the Kubernetes service account.
  • oneOf variant 2: Nacos
  • value.type (string, required): The Nacos service type.
  • value.nacos_config (object, required): Nacos service registry configurations.
  • value.nacos_config.hosts (array, required): The address of the Nacos API server.
  • value.nacos_config.prefix (string, optional): The prefix of the Nacos API.
  • value.nacos_config.default_weight (integer, optional): The default weight of the endpoints.
  • value.nacos_config.fetch_interval (integer, optional): The interval for fetching endpoints (in seconds).
  • value.nacos_config.timeout (object, optional): Timeout settings for connecting to, sending requests to, and receiving responses from Nacos, in seconds.
  • value.nacos_config.timeout.connect (integer, optional): Connection timeout.
  • value.nacos_config.timeout.send (integer, optional): Sending timeout in seconds.
  • value.nacos_config.timeout.read (integer, optional): Reading timeout in seconds.
  • value.nacos_config.auth (object, optional): Nacos authentication configuration.
  • oneOf variant 1: Username & Password
  • value.nacos_config.auth.username (string, required): The username of the Nacos API.
  • value.nacos_config.auth.password (string, required): The password of the Nacos API.
  • oneOf variant 2: Token
  • value.nacos_config.auth.token (string, required): The token of the Nacos service.
  • oneOf variant 3: Access Key & Secret Key
  • value.nacos_config.auth.access_key (string, required): The access key of the Nacos API.
  • value.nacos_config.auth.secret_key (string, required): The secret key of the Nacos API.
  • oneOf variant 3: Consul
  • value.type (string, required): The Consul service type.
  • value.consul_config (object, required): Consul service registry configurations.
  • value.consul_config.servers (array, required): The addresses of the Consul servers.
  • value.consul_config.token (string, optional): The ACL token for authenticating with Consul.
  • value.consul_config.weight (integer, optional): The default weight of the discovered endpoints.
  • value.consul_config.fetch_interval (integer, optional): The interval for fetching endpoints (in seconds).
  • value.consul_config.timeout (object, optional): Timeout settings for connecting to, sending requests to, and receiving responses from Consul, in seconds.
  • value.consul_config.timeout.connect (integer, optional): Connection timeout.
  • value.consul_config.timeout.send (integer, optional): Sending timeout in seconds.
  • value.consul_config.timeout.read (integer, optional): Reading timeout in seconds.
  • allOf variant 2
  • value.id (string, optional): The object ID.
  • value.gateway_group_id (string, optional): The gateway group ID.
  • value.created_at (integer, optional): The object created timestamp.
  • value.updated_at (integer, optional): The object updated timestamp.
  • allOf variant 2
  • value.status (string, optional): The status of the service registry.
  • value.last_connect_time (integer, optional): The object timestamp.
  • 400: Invalid arguments. Error details will be provided in the response.

cURL

curl -X GET '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/service_registries/{service_registry_id}'