---
title: "Get a ConfigMap"
method: GET
path: "/kubernetes/{id}/namespaces/{namespace}/configmaps/{configmap}"
tags: ["kubernetes"]
---

# Get a ConfigMap

`GET /kubernetes/{id}/namespaces/{namespace}/configmaps/{configmap}`

Get a ConfigMap by name for a given namespace.
**Access policy**: Authenticated user.

## Path parameters

- `id` integer, required
- `namespace` string, required
- `configmap` string, required

## Response `200`

Success

- KubernetesK8sConfigMap
  - `Annotations` object
  - `ConfigurationOwner` string
  - `ConfigurationOwnerId` string
  - `ConfigurationOwners` KubernetesK8sConfigurationOwnerResource[]
    - `Id` string
    - `Name` string
    - `ResourceKind` string
  - `CreationDate` string
  - `Data` object
  - `IsUsed` boolean
  - `Labels` object
  - `Name` string
  - `Namespace` 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 or a configmap with the specified name in the given namespace.
- `500` — Server error occurred while attempting to retrieve a configmap by name within the specified namespace.

---

[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)
