---
title: "Get a Service"
method: GET
path: "/{workspace}/services/{ServiceIdOrName}"
tags: ["Services"]
---

# Get a Service

`GET /{workspace}/services/{ServiceIdOrName}`

Get a Service using ID or name.

## Path parameters

- `workspace` string, required

## Response `200`

Successfully fetched Service

- Service — Service entities, as the name implies, are abstractions of each of your own upstream services. Examples of Services would be a data transformation microservice, a billing API, etc. The main attribute of a Service is its URL (where Kong should proxy traffic to), which can be set as a single string or by specifying its `protocol`, `host`, `port` and `path` individually. Services are associated to Routes (a Service can have many Routes associated with it). Routes are entry-points in Kong and define rules to match client requests. Once a Route is matched, Kong proxies the request to its associated Service. See the [Proxy Reference][proxy-reference] for a detailed explanation of how Kong proxies traffic.
  - `ca_certificates` string[], nullable — Array of `CA Certificate` object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to `null` when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).
  - `client_certificate` object, nullable — Certificate to be used as client certificate while TLS handshaking to the upstream server.
    - `id` string
  - `connect_timeout` integer, nullable — The timeout in milliseconds for establishing a connection to the upstream server.
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `enabled` boolean, nullable — Whether the Service is active. If set to `false`, the proxy behavior will be as if any routes attached to it do not exist (404). Default: `true`.
  - `host` string, required — The host of the upstream server. Note that the host value is case sensitive.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `name` string, nullable — The Service name.
  - `path` string, nullable — The path to be used in requests to the upstream server.
  - `port` integer, nullable — The upstream server port.
  - `protocol` 'grpc' | 'grpcs' | 'http' | 'https' | 'tcp' | 'tls' | 'tls_passthrough' | 'udp' | 'ws' | 'wss', nullable — The protocol used to communicate with the upstream.
  - `read_timeout` integer, nullable — The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server.
  - `retries` integer, nullable — The number of retries to execute upon failure to proxy.
  - `tags` string[], nullable — An optional set of strings associated with the Service for grouping and filtering.
  - `tls_sans` object, nullable — Additional Subject Alternative Names that can be matched on Upstream server's TLS certificate (in addition to `host`).
    - `dnsnames` string[] — A dnsName for TLS verification.
    - `uris` string[] — An URI for TLS verification.
  - `tls_verify` boolean, nullable — Whether to enable verification of upstream server TLS certificate. If set to `null`, then the Nginx default is respected.
  - `tls_verify_depth` integer, nullable — Maximum depth of chain while verifying Upstream server's TLS certificate. If set to `null`, then the Nginx default is respected.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.
  - `url` string, nullable — Helper field to set `protocol`, `host`, `port` and `path` using a URL. This field is write-only and is not returned in responses.
  - `write_timeout` integer, nullable — The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server.

## Other responses

- `401` — Unauthorized
- `404` — Resource does not exist

---

[API](https://skmtc.net/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.net/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
