# Retrieving the configuration of a specific service instance.

`GET /devops/config/{moduleName}/{podName}`

Return the configuration of a specific service instance.

Authentication (security requirement alternatives):

```json
[
  {
    "DevOpsBasic": []
  },
  {
    "DevOpsBearer": []
  }
]
```

- DevOpsBasic: http (basic). Eclipse Ditto devops user (devops) + password (foobar)
- DevOpsBearer: http (bearer). A JSON Web Token issued by a supported OAuth 2.0 Identity Provider for the Eclipse Ditto devops user.

Parameters:

- `moduleName` (path, string, required) - The name of module
  Type: string
  
  Example:
  
  ```json
  "gateway"
  ```

- `podName` (path, string, required) - The name of pod
  Type: string
  
  Example:
  
  ```json
  "ditto-gateway-764fc5f474-qrm2r"
  ```

- `path` (query, string, optional) - The path points to information on service name, service instance index, JVM arguments and environment variables.
  Type: string
  
  Example:
  
  ```json
  "ditto.info"
  ```

Responses:

- 200: Return The current value of specific service instance.

Content type: application/json

Type: Array<RetrieveConfigService>

Items:
  Reference: [RetrieveConfigService](https://sourcey-ditto.pages.dev/http-api-doc/models/retrieveconfigservice.md); Type: RetrieveConfigService

```json
"{\n  \"gateway\": {\n    \"podName\": {\n      \"type\": \"common.responses:retrieveConfig\",\n      \"status\": 200,\n      \"config\": {\n        \"cluster\": {\n          \"cluster-status-roles-blocklist\": [\n              \"cluster1\",\n              \"......\" ,\n              \"clusterN\"\n          ],\n          \"number-of-shards\": 20\n        },\n        \"ddata\": {\n          \"vm arg1\": \"string\",\n          \".............\": \"string\",\n          \"vm argn\" : \"string\"\n        },\n        \"devops\": {\n          \"feature\": {\n            \"merge-things-enabled\": true\n          },\n          \"namespace\": {\n            \"block-time\": \"string\"\n          }\n        },\n        \"gateway\": {\n          \"authentication\": {\n            \"devops\": {\n              \"devops-authentication-method\": \"string\",\n              \"password\": \"string\",\n              \"secured\": true,\n              \"status-authentication-method\": \"string\",\n              \"statusPassword\": \"string\"\n            },\n            \"http\": {\n              \"proxy\": {\n                \"enabled\": false\n              }\n            },\n            \"oauth\": {\n              \"allowed-clock-skew\": \"string\",\n              \"openid-connect-issuers\": {\n                \"google\": {\n                  \"issuer\": \"string\"\n                }\n              },\n              \"protocol\": \"https\",\n              \"token-integration-subject\": \"string\"\n            },\n            \"pre-authentication\": {\n              \"enabled\": \"true\"\n            }\n          }\n        }\n      }\n    }\n  }\n}"
```

- 401: The request could not be completed due to missing authentication.

Content type: text/plain

Type: TextUnauthorizeError

Schema: [TextUnauthorizeError](https://sourcey-ditto.pages.dev/http-api-doc/models/textunauthorizeerror.md)

Example:

```json
"The supplied authentication is invalid"
```

## Examples

### cURL

```bash
curl -X GET 'https://ditto.eclipseprojects.io/devops/config/gateway/ditto-gateway-764fc5f474-qrm2r' \
  -H 'Authorization: Basic WU9VUl9VU0VSTkFNRTpZT1VSX1BBU1NXT1JE'
```

### JavaScript

```javascript
const response = await fetch('https://ditto.eclipseprojects.io/devops/config/gateway/ditto-gateway-764fc5f474-qrm2r', {
  method: 'GET',
  headers: {
    'Authorization': 'Basic WU9VUl9VU0VSTkFNRTpZT1VSX1BBU1NXT1JE',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://ditto.eclipseprojects.io/devops/config/gateway/ditto-gateway-764fc5f474-qrm2r',
    headers={
        'Authorization': 'Basic WU9VUl9VU0VSTkFNRTpZT1VSX1BBU1NXT1JE',
    },
)
print(response.text)
```
