> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Get Service by Name

GET https://control-plane.example.com/api/v1/{tenant}/services/{name}

Reference: https://docs.fabricgateway.ai/reference/admin-api/services/get-service-by-name

## Authentication

- `fg-tenant-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required)
- `name` (string, required)

## Response

### 200

200- service exists

- `id` (string, optional)
- `name` (string, optional)
- `owned_by` (string, optional)
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional)
- `config` (ApiV1TenantServicesNameGetResponsesContentApplicationJsonSchemaConfig, optional)

## Errors

### 404 Not Found Error

404- service not found

- `error` (string, optional)

### 500 Internal Server Error

Server Error

## Types

### ApiV1TenantServicesNameGetResponsesContentApplicationJsonSchemaConfig

- `protocol` (string, optional)
- `discovery` (string, optional)
- `upstreams` (list of ApiV1TenantServicesNameGetResponsesContentApplicationJsonSchemaConfigUpstreamsItems, optional)
- `balancer` (string, optional)
- `access_mode` (string, optional)

### ApiV1TenantServicesNameGetResponsesContentApplicationJsonSchemaConfigUpstreamsItems

- `target` (string, optional)
- `weight` (integer, optional)
- `tags` (list of string, optional)

## Examples

**Response**

```json
{
  "id": "9e0911f5-ad50-4dc0-b344-45c7bccb7e28",
  "name": "example-service",
  "owned_by": "Postman",
  "created_at": "2026-06-25T08:01:29.072Z",
  "updated_at": "2026-06-29T10:03:12.3Z",
  "config": {
    "protocol": "http",
    "discovery": "static",
    "upstreams": [
      {
        "target": "https://upstream-a.example.com",
        "weight": 100,
        "tags": [
          "Development"
        ]
      },
      {
        "target": "https://upstream-b.example.com",
        "weight": 100
      }
    ],
    "balancer": "round-robin",
    "access_mode": "gated"
  }
}
```

**SDK Code**

```python Services_getServiceByName_example
import requests

url = "https://control-plane.example.com/api/v1/acme/services/example"

headers = {"fg-tenant-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Services_getServiceByName_example
const url = 'https://control-plane.example.com/api/v1/acme/services/example';
const options = {method: 'GET', headers: {'fg-tenant-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Services_getServiceByName_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://control-plane.example.com/api/v1/acme/services/example"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("fg-tenant-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Services_getServiceByName_example
require 'uri'
require 'net/http'

url = URI("https://control-plane.example.com/api/v1/acme/services/example")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["fg-tenant-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Services_getServiceByName_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://control-plane.example.com/api/v1/acme/services/example")
  .header("fg-tenant-api-key", "<apiKey>")
  .asString();
```

```php Services_getServiceByName_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://control-plane.example.com/api/v1/acme/services/example', [
  'headers' => [
    'fg-tenant-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Services_getServiceByName_example
using RestSharp;

var client = new RestClient("https://control-plane.example.com/api/v1/acme/services/example");
var request = new RestRequest(Method.GET);
request.AddHeader("fg-tenant-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Services_getServiceByName_example
import Foundation

let headers = ["fg-tenant-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://control-plane.example.com/api/v1/acme/services/example")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```