This API is used to list all ConfigMap resource objects under a specified Namespace.
GET /api/v1/namespaces/{namespace}/configmaps
Table 1 describes the parameters of this API.
Parameter |
Mandatory |
Description |
---|---|---|
pretty |
No |
If 'true', then the output is pretty printed. |
labelSelector |
No |
A selector to restrict the list of returned objects by their labels. Defaults to everything. |
fieldSelector |
No |
A selector to restrict the list of returned objects by their fields. Defaults to everything. |
includeUninitialized |
No |
If true, partially initialized resources are included in the response. |
watch |
No |
Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
resourceVersion |
No |
When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds |
No |
Timeout for the list/watch call. |
namespace |
Yes |
Object name and auth scope, such as for teams and projects. |
N/A
Response parameters:
For the description about response parameters, see Table 4.
Example response:
{ "kind": "ConfigMapList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces/ns-12130306-s/configmaps", "resourceVersion": "419140" }, "items": [ { "metadata": { "name": "test-12130306", "namespace": "ns-12130306-s", "selfLink": "/api/v1/namespaces/ns-12130306-s/configmaps/test-12130306", "uid": "efd6d9e0-dfb3-11e7-9c19-fa163e2d897b", "resourceVersion": "419081", "creationTimestamp": "2017-12-13T03:15:57Z", "enable": true }, "data": { "property_1": "test" } } ] }
Table 2 describes the status code of this API.
Status Code |
Description |
---|---|
200 |
This operation succeeds, and a group of ConfigMap resource objects is returned. |
For the description about status codes, see section Status Codes.