POST /configservice/api/resources/{resourceName}/path/{pathName}

As of Version

2023 Autumn

Request MethodPOST
Response FormatHTTP status code
Required Permissionsuccessful authentication
Description

Updates the global configuration file specified by resourceName in Git at the path specified by pathName.

The previous file is replaced by the new file in the request body.

To apply the new configuration, after the successful update, all services that reference the contained configuration parameters have to be refreshed/restarted.

Request Example

The following example request updates the application-oauth2.yml configuration file in order to introduce new tenants.

After successful resource update, the following endpoints have to be called to apply the new configuration:

cURL example for unix bash
curl -s -i -k -X POST --url "http://configservice.yuuvis/api/resources/application-oauth2.yml/path/|" \
-H "Content-Type: multipart/form-data; boundary=--------------------------522935013788975240240820" \
--data-binary '----------------------------522935013788975240240820
Content-Disposition: form-data; name="resource"; filename=""
Content-Type: application/json



keycloak.host: 192.168.62.151:30111
authentication.oauth2.tenants:
- name: yuuvistest
  clientId: yuuvis-authentication-service
  clientSecret: dbdf4856-3c86-4e5f-aca7-96f3d93d35b4
  userAuthorizationUri: https://${keycloak.host}/auth/realms/yuuvistest/protocol/openid-connect/auth
  accessTokenUri: https://${keycloak.host}/auth/realms/yuuvistest/protocol/openid-connect/token
  userInfoUri: https://${keycloak.host}/auth/realms/yuuvistest/protocol/openid-connect/userinfo
  endSessionUri: https://${keycloak.host}/auth/realms/yuuvistest/protocol/openid-connect/logout
  userNameExtractionPattern: $.sub
  scope: openid
- name: testyuuvis
  clientId: yuuvis-authentication-service
  clientSecret: 61048b73-8cd7-4682-b78c-786c5dc8a2a1
  userAuthorizationUri: https://${keycloak.host}/auth/realms/testyuuvis/protocol/openid-connect/auth
  accessTokenUri: https://${keycloak.host}/auth/realms/testyuuvis/protocol/openid-connect/token
  userInfoUri: https://${keycloak.host}/auth/realms/testyuuvis/protocol/openid-connect/userinfo
  endSessionUri: https://${keycloak.host}/auth/realms/testyuuvis/protocol/openid-connect/logout
  userNameExtractionPattern: $.sub
  scope: openid
# configuration for the yuuvis organization service
keycloak.server: https://keycloak-https.infrastructure/auth
keycloak.admin.username: keycloak
keycloak.admin.password: changeme
----------------------------522935013788975240240820--'

Response Example

200 OK