---
title: "Get Service"
method: GET
path: "/api/v1/services/{service_id}"
tags: ["Services"]
---

# Get Service

`GET /api/v1/services/{service_id}`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v1/services/{service_id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v1/services/:service_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Services API endpoint returns a single service by id.

## Path parameters

- `service_id` integer, required: Service object ID

## Response `200`

Successful Response

- ServiceModel: Model for service object after processing the raw response of the services API (linpr)
  - `id` integer, required
  - `name` string, required
  - `paths` RepositoryPaths[], required
    - `id` integer, required
    - `name` string
    - `paths` string[], required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/linearb/apis/linearb-api.md) - [All operations](https://skmtc.dev/linearb/apis/linearb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linearb/apis/linearb-api/revisions/3aea06710db6?raw)
