---
title: "Get a list of services"
method: GET
path: "/kubernetes/{id}/services"
tags: ["kubernetes"]
---

# Get a list of services

`GET /kubernetes/{id}/services`

Get a list of services that the user has access to.
**Access policy**: Authenticated user.

## Path parameters

- `id` integer, required

## Query parameters

- `withApplications` boolean

## Response `200`

Success

- KubernetesK8sServiceInfo[]
  - `AllocateLoadBalancerNodePorts` boolean
  - `Annotations` object
  - `Applications` KubernetesK8sApplication[] — serviceList screen
    - `Annotations` object
    - `ApplicationOwner` string
    - `ApplicationType` string
    - `Configurations` KubernetesConfiguration[]
      - `ConfigurationOwner` string
      - `Data` object
      - `Kind` string
    - `Containers` unknown[]
      - unknown
    - `CreationDate` string
    - `CustomResourceMetadata` KubernetesCustomResourceMetadata
      - `apiVersion` string
      - `kind` string
      - `name` string
      - `plural` string
      - `scope` string
    - `DeploymentType` string
    - `Id` string
    - `Image` string
    - `Kind` string
    - `Labels` object
    - `LoadBalancerIPAddress` string
    - `MatchLabels` object
    - `Metadata` KubernetesMetadata
      - `annotations` object
      - `labels` object
    - `Name` string
    - `Namespace` string
    - `Pods` KubernetesPod[]
      - `ContainerName` string
      - `CreationDate` string
      - `Image` string
      - `ImagePullPolicy` string
      - `Name` string
      - `NodeName` string
      - `PodIP` string
      - `Resource` KubernetesK8sApplicationResource
        - `CpuLimit` number
        - `CpuRequest` number
        - `MemoryLimit` integer
        - `MemoryRequest` integer
      - `Status` string
      - `Uid` string
    - `PublishedPorts` KubernetesPublishedPort[]
      - `IngressRules` KubernetesIngressRule[]
        - `Host` string
        - `IP` string
        - `Path` string
        - `TLS` KubernetesTLSInfo[]
          - `hosts` string[]
      - `Port` integer
    - `Resource` KubernetesK8sApplicationResource
      - `CpuLimit` number
      - `CpuRequest` number
      - `MemoryLimit` integer
      - `MemoryRequest` integer
    - `ResourcePool` string
    - `RunningPodsCount` integer
    - `ServiceId` string
    - `ServiceName` string
    - `ServiceType` string
    - `StackId` string
    - `StackKind` string
    - `StackName` string
    - `Status` string
    - `TotalPodsCount` integer
    - `Uid` string
  - `ClusterIPs` string[]
  - `CreationDate` string
  - `ExternalIPs` string[]
  - `ExternalName` string
  - `IngressStatus` KubernetesK8sServiceIngress[]
    - `Hostname` string
    - `IP` string
  - `Labels` object
  - `Name` string
  - `Namespace` string
  - `Ports` KubernetesK8sServicePort[]
    - `Name` string
    - `NodePort` integer
    - `Port` integer
    - `Protocol` string
    - `TargetPort` string
  - `Selector` object
  - `Type` string
  - `UID` string

## Other responses

- `400` — Invalid request payload, such as missing required fields or fields not meeting validation criteria.
- `401` — Unauthorized access - the user is not authenticated or does not have the necessary permissions. Ensure that you have provided a valid API key or JWT token, and that you have the required permissions.
- `403` — Permission denied - the user is authenticated but does not have the necessary permissions to access the requested resource or perform the specified operation. Check your user roles and permissions.
- `404` — Unable to find an environment with the specified identifier.
- `500` — Server error occurred while attempting to retrieve all services.

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
