Configuration Management API

Introduction

The configuration of k5-projects and projects is done via a REST API called Configuration Management API.

It is split up into two controllers:

This API provides a Swagger UI for ease-of-use but you can use the tool of your choice for calling APIs (e.g. cURL, Postman).

Tip:

As long as not configured otherwise, the default URL where you can find the Configuration Management Swagger UI is built like this:

<https://ssob-config>.<domain>

The exact URL can be found within the route named k5-configuration-management. It can be easily retrieved by executing

oc get route k5-configuration-management -n <namespace>

, whereby <namespace> points to the namespace, where IBM Industry Solutions Workbench is installed (e.g. k5-tools).

API Endpoints of K5-Project Configuration

The following API endpoints are available:

  • /api/cfg/v1/runtimes/k5ProjectBindings/kafka/
    • GET: Get all Kafka bindings of a k5-project
  • /api/cfg/v1/runtimes/k5ProjectBindings/kafka//
    • GET: Get a specific Kafka binding of a k5-project
    • POST: Create or update a Kafka binding for a k5-project
    • DELETE: Delete a specific Kafka binding of a k5-project
  • /api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/
    • GET: Get all MongoDB bindings of a k5-project
  • /api/cfg/v1/runtimes/k5ProjectBindings/mongoDb//
    • GET: Get a specific MongoDB binding of a k5-project
    • POST: Create or update a MongoDB binding for a k5-project
    • DELETE: Delete a specific MongoDB binding of a k5-project
  • /api/cfg/v1/runtimes/k5ProjectBindings/oidc/
    • GET: Get all authentication bindings of a k5-project
  • /api/cfg/v1/runtimes/k5ProjectBindings/oidc//
    • GET: Get a specific authentication binding of a k5-project
    • POST: Create or update an authentication binding for a k5-project
    • DELETE: Delete a specific authentication binding of a k5-project

Path Parameters (K5-Project Configuration)

ParameterTypeDescription
bindingNamestringThe name of the binding.
namespacestringThe name of the specific k5-project, e.g. dev-stage. Passing the namespace of the Solution Hub will return the results for the default.

Operations (K5-Project Configuration)

Get all Kafka bindings of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}

HTTP method:

GET

Description:

Get all Kafka bindings of a k5-project

curl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get a list of Kafka settings (media type: application/json)

Get a specific Kafka binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}/{bindingName}

HTTP method:

GET

Description:

Get a specific Kafka binding of a k5-project

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}/{bindingName>}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get the settings of a specific Kafka binding of a certain k5-project. (media type: application/json)

Create or update a Kafka binding for a project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}

HTTP method:

POST

Description:

Create or update a Kafka binding for a project

curl -X POST "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}/{bindingName>}" -H "accept: */*" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: application/json" -d "{\"kafka_brokers_sasl\":[\"string\"],\"user\":\"string\",\"password\":\"string\",\"saslJaasConfigLoginModuleQualifiedName\":\"org.apache.kafka.common.security.scram.ScramLoginModule\",\"saslMechanism\":\"SCRAM-SHA-512\",\"kafka_custom_config\":[{\"key\":\"null\",\"value\":\"null\"}]}"

Body Parameters (in JSON notation):

ParameterDescription
"kafka_brokers_sasl": []Bootstrap address, that will be used for bootstrapping the messaging broker
"user":Name of the user, that will be used for accessing the messaging broker
"password":Password of the user, that will be used for accessing the messaging broker
"saslMechanism":SASL mechanism that is used by the Kafka client to communicate with the messaging server; either PLAIN or SCRAM-SHA-512
"saslJaasConfigLogin ModuleQualifiedName":SASL Jaas Config Login Module that is used by the Kafka client to communicate with the messaging server; either org.apache.kafka.common.security.plain.PlainLoginModule or org.apache.kafka.common.security.scram.ScramLoginModule
"kafka_custom_config": []Allows to specify some custom arguments for connecting to the messaging server; usually this is not needed (see example below)

Kafka Custom Config Example:

[
  {
    "key": "mySpecialKey",
    "value": "mySpecialValue"
  }
]

Responses:

  • 201 - The Kafka binding has been successfully created. (media type: /)
Note:

Add the Kafka certificates to the Truststore. Please see the Product Configuration to update the truststore.

Delete a specific Kafka binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}/{bindingName}

HTTP method:

DELETE

Description:

Delete a specific Kafka binding of a k5-project

curl -X DELETE "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/kafka/{namespace}/{bindingName>}" -H  "accept: */*" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 204 - The Kafka binding has been deleted. (media type: /)

Get all MongoDB bindings of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}

HTTP method:

GET

Description:

Get all MongoDB bindings of a k5-project

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace>}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get a list of MongoDB settings (media type: application/json)

Get a specific MongoDB binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}/{bindingName}

HTTP method:

GET

Description:

Get a specific MongoDB binding of a k5-project

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}/{bindingName>}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get the settings of a specific MongoDB binding of a certain k5-project. (media type: application/json)

Create or update a MongoDB binding for a project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace} HTTP method:

POST

Description:

Create or update a MongoDB binding for a project

curl -X POST "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}/{bindingName>}" -H "accept: */*" -H "Authorization: Bearer {BearerToken}" -H "Content-Type: application/json;charset=UTF-8" -d "string"

Body parameter:

Enter the mongodb connection string directly.

Responses:

  • 201 - The MongoDB binding has been successfully created. (media type: /)

Delete a specific MongoDB binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}/{bindingName}

HTTP method:

DELETE

Description:

Delete a specific MongoDB binding of a k5-project

curl -X DELETE "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/mongoDb/{namespace}/{bindingName>}" -H  "accept: */*" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 204 - The MongoDB binding has been deleted. (media type: /)

Get all authentication bindings of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}

HTTP method:

GET

Description:

Get all authentication bindings of a k5-project

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace>}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get a list of authentication settings (media type: application/json)

Get a specific authentication binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}/{bindingName}

HTTP method:

GET

Description:

Get a specific authentication binding of a k5-project

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}/{bindingName>}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - Get the settings of a specific authentication binding of a certain k5-project. (media type: application/json)

Create or update a authentication binding for a project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}

HTTP method:

POST

Description:

Create or update a authentication binding for a project

curl -X POST "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}/{bindingName>}" -H "accept: */*" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: application/json" -d "{\"issuer\":\"string\",\"clientId\":\"string\",\"clientSecret\":\"string\",\"tokenUri\":\"string\",\"jwkUri\":\"string\",\"userAuthorizationUri\":\"string\"}"

Body Parameters (in JSON notation):

ParameterDescription
"issuer":The issuer of the token
"clientId":The client id to use
"clientSecret":The client secret
"tokenUri":The token URL of the identity provider that is used to get tokens
"jwkUri":The URL of the JSON Web Key set
"userAuthorizationUri":The URL of the identity provider that is used to authenticate
"baseUrl":Deprecated: The base URL of the identity provider
"realm":Deprecated: The realm that is used for authentication
"tokenEndpoint":Deprecated: The token URL of the identity provider that is used to get tokens

Responses:

  • 201 - The authentication binding has been successfully created. (media type: /)

Delete a specific authentication binding of a k5-project

Endpoint:

/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}/{bindingName}

HTTP method:

DELETE

Description:

Delete a specific authentication binding of a k5-project

curl -X DELETE "<https://{your-hostname}/api/cfg/v1/runtimes/k5ProjectBindings/oidc/{namespace}/{bindingName>}" -H  "accept: */*" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 204 - The authentication binding has been deleted. (media

API Endpoints of Solution Configuration

The following API endpoints are available:

  • /api/cfg/v1/runtimes/{runtimeName}/solutions/
    • GET: Get all solutions that have a Solution Configuration
  • api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations
    • GET: Get all Project Configurations
  • api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations{configurationName}
    • GET: Get a specific Project Configuration
    • POST: Create or update a specific Project Configuration
    • DELETE: Delete a specific Project Configuration
  • /api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations
    • GET: Get all Solution Configurations
  • /api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName}
    • GET: Get a specific Solution Configuration
    • POST: Create or update a specific Solution Configuration
    • DELETE: Delete a specific Solution Configuration

Path Parameters (Solution Configuration)

ParameterTypeDescription
configurationNamestringThe name of the configuration: ssob-sdo-values-yaml
runtimeNamestringThe name of the specific k5-project, e.g. dev-stage
solutionAcronymstringThe acronym of a solution, e.g. ORDERS

Operations (Solution Configuration)

Get all solutions that have a Solution Configuration

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/

HTTP method:

GET

Description:

Get all solutions that have a Solution Configuration

curl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/" -H "accept: application/json" -H "Authorization: Bearer {Bearer Token}"

Responses:

  • 200 - A list of all acronyms of solutions that have a Solution Configuration. (media type: application/json)

Get all K5-Project Configurations

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations

HTTP method:

GET

Description:

Get all K5-Project Configurations

curl -X GET "https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations" -H "accept: application/json" -H "Authorization: Bearer {Bearer Token}"

Responses:

  • 200 - A list of all K5-Project Configurations (media type: application/json)

Get a specific K5-Project Configuration

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName}

HTTP method:

GET

Description:

Get a specific K5-Project Configuration

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName>}" -H "accept: text/plain" -H "Authorization: Bearer {Bearer Token}"

Responses:

  • 200 - The content of the requested K5-Project Configuration (media type: application/json)

Create or Update K5-Project Configurations

Each new k5-project needs a project configuration. These settings can be edited later, but the changes will only affect new solutions or existing solutions without a Solution Configuration after they have been re-deployed.

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName}

HTTP method:

POST

Description:

Create or update a specific K5-Project Configuration

curl -x POST "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName>}" -H  "accept: text/plain" -H  "Authorization: Bearer {BearerToken}" -H  "Content-Type: text/plain" -d "

Responses:

  • 201 - The K5-Project Configuration has been successfully created (media type: /)

Body Parameters (in YAML notation):

ParameterDescriptionDefault value

environment:

        host:

Hostname of the specific k5-project (e.g. dev-stage.apps.openshift-cluster.mydomain.cloud)required - no default value available

eventManager:

        secretName:

Secret of the OIDC configuration for the event managerevent-manager-oauth-client-secret

feature:

        corsPolicy:

Defines if cross-origin resource sharing is enabled or not. If set to true, CORS policy where the value is set to '*' (any origin is allowed) is enabled.false

feature:

        dataEvents:

Defines if solutions shall send events to a k5-project namespace-wide topic.false

feature:

        devBinding:

Defines that solutions use DEV bindings, that are defined in the Solution Designer if no service binding is deployed in the Kubernetes cluster. This feature flag will be set automatically (true for DEV projects) if spec.configuration.configurationManagement. autoConfiguration.enabled is set in the k5-project crd instance (see Create a k5-project)false

feature:

        exposeInternalApi:

Defines if the internal APIs of a solution are exposed to the provided Swagger UI.false

feature:

        kafkaEvents:

Defines if Kafka will be available in the deployed solution. If Kafka events are enabled, sent business events (see Events) are sent to the Kafka service and then handled and executed by the solution. If Kafka events are not enabled, sent business events are directly handled and executed by the solutions without using a Kafka service (event-streaming). The revision logging (audit) and data events are also not sent to a Kafka service and just written to the log output without Kafka being enabled. The logger names are audit-event for the revision logging and data-event for the data events. Ensure that a Kafka service is available and enabled in the k5project if it should be used by solutions. This feature flag will be set automatically if spec.configuration.configurationManagement. autoConfiguration.enabled is set in the k5project crd instance (see Create a k5-project)true

feature:

        testSupport:

Defines if an additional API for testing is available. This feature flag will be set automatically to true if spec.configuration.configurationManagement.autoConfiguration.enabled is set in the k5project crd instance (see Create a k5-project)false

image:

        registry:

Specifies the image registry for the solutionimage-registry.openshift-image-registry.svc:5000

imagepullSecret:

        name:

The secret used to pull images for solution deployment (not needed for OpenShift registry).nil

mongodb:

        secretName:

Service binding name for the MongoDB service (created by the k5-project-operator)k5-default-document-storage-service-binding

messagehub:

        secretName:

Service binding name for the message hub service (created by the k5-project-operator)k5-default-message-service-binding

oidc:

        secretName:

The name of the secret holding the OIDC configuration for the solution.k5-default-iam-service-binding

rbac:

        useSelfCreated:

Use self-created default service account, role and role binding. If true the specific service account names are not usedfalse

rbac:

        serviceAccountName:

Set existing service account name for the solution deployment, only used if rbac.useSelfCreated is falsek5-viewer-sa

rbac:

        provisioner:

                serviceAccountName:

Set existing service account name for the deployment jobs, only used if rbac.useSelfCreated is falsek5-editor-sa

route:

        action:

Exposes /action of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        api:

Exposes /api of the project. Hence the implemented APIs of the project itselftrue

route:

        apiBinding:

Exposes /api-binding of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        apiDocs:

Exposes /api-docs of the project. Hence the Swagger or OpenApi resourcestrue

route:

        artifacts:

Exposes /artifacts of the project. Hence the additional artifacts like the BAW toolkit. Only available in case of Domain Service Projectstrue

route:

        audit:

Exposes /audit of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        data:

Exposes /data of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        error:

Exposes /error of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        internal:

Exposes /internal of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        message:

Exposes /message of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        root:

Exposes / of the project. If the root of the project is exposed, no additional routes will be created as they are not required. Be aware that all internal paths are exposed like actuator and health check, too.false

route:

        sys:

Exposes /sys of the project. Only available in case of Domain Service Projects (TypeScript)true

route:

        testsupport:

Exposes /testsupport of the project. Only available in case of Domain Service Projects (TypeScript)true

solution:

        logging:

Adjust the log level configuration for Domain Services. The configured log config.json will be used in the solution's Helm deployment and the information will be saved in the deployment of the solution. For more information about the log level configuration see Change Default Log Level for a Domain Service Projectsee example below

Example of parameter solution.logging:

solution:
  logging: {
    "/src-impl/api/apitest/operations/*": "trace",
    "/src-impl/api/apitest/operations/addDate.test": "info",
    "/src-impl/api/apitest/operations/addNumber": "error",
    "/sdk/v1/*": "info",
    "/sdk/v1/handler/*": "trace"
  }

Delete K5-Project Configurations

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName}

HTTP method:

DELETE

Description:

Delete a specific K5-Project Configuration

curl -X DELETE "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/-/configurations/{configurationName>}" -H  "accept: text/plain" -H  "Authorization: Bearer

Responses:

  • 204 - The K5-Project Configuration has been deleted (media type: /)

Get all Solution Configurations of a project

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations

HTTP method:

GET

Description:

Get all Solution Configurations of a Solution

curl -X GET "{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations" -H "accept: application/json" -H  "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - A list of all Solution Configurations of the requested project (media type: application/json)

Get a specific Solution Configuration of a project

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName}

HTTP method:

GET

Description:

Get a specific Solution Configuration

curl -X GET "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName>}" -H  "accept: text/plain" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - The content of the requested Solution Configuration (media type: text/plain)

Create or Update Solution Configurations

If creating or changing the Solution Configuration, not all possible parameters have to be included in the request body. Only the configuration parameters that are deviating from the Project Configuration should be included.

Note:

Any change to the configuration will only be applied to the project after re-deploying it.

Tip:

You can also use the Solution Configuration to set solution-specific test configurations.

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName}

HTTP method:

POST

Description:

Create or update a specific Solution Configuration

curl -X POST "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName>}" -H "accept: */*" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: text/plain" -d "

Body Parameters (in YAML notation):

ParameterDescriptionDefault value

environment:

        host:

Hostname of the specific k5-project (e.g. dev-stage.apps.openshift-cluster.mydomain.cloud)required - no default value available

eventManager:

        secretName:

Secret of the OIDC configuration for the event managerevent-manager-oauth-client-secret

feature:

        corsPolicy:

Defines if cross-origin resource sharing is enabled or not. If set to true, CORS policy where the value is set to '*' (any origin is allowed) is enabled.false

feature:

        dataEvents:

Defines if solutions shall send events to a k5-project namespace-wide topic.

feature:

        devBinding:

Defines that solutions use DEV bindings, that are defined in the Solution Designer if no service binding is deployed in the Kubernetes cluster. This feature flag will be set automatically (true for DEV projects) if spec.configuration.configurationManagement.autoConfiguration.enabled is set in the k5-project crd instance (see Create a k5-project)false

feature:

        exposeInternalApi:

Defines if the internal APIs of a solution are exposed to the provided Swagger UI.false

feature:

        kafkaEvents:

Defines if Kafka will be available in the deployed solution. If Kafka events are enabled, sent business events (see Events) are sent to the Kafka service and then handled and executed by the solution. If Kafka events are not enabled, sent business events are directly handled and executed by the solutions without using a Kafka service (event-streaming). The revision logging (audit) and data events are also not sent to a Kafka service and just written to the log output without Kafka being enabled. The logger names are audit-event for the revision logging and data-event for the data events. Ensure that a Kafka service is available and enabled in the k5project if it should be used by solutions. This feature flag will be set automatically ifspec.configuration.configurationManagement.autoConfiguration.enabled is set in the k5project crd instance (see Create a k5-project)true

feature:

        testSupport:

Defines if an additional API for testing is available. This feature flag will be set automatically to true if spec.configuration.configurationManagement.autoConfiguration.enabled is set in the k5project crd instance (see Create a k5-project)false

image:

        registry:

Specifies the image registry for the solution.image-registry.openshift-image-registry.svc:5000

imagepullSecret:

        name:

The secret used to pull images for solution deployment (not needed for OpenShift registry).nil

mongodb:

        secretName:

Service binding name for the MongoDB service (created by the k5-project-operator)k5-default-document-storage-service-binding

messagehub:

        secretName:

Service binding name for the message hub service (created by the k5-project-operator).k5-default-message-service-binding

oidc:

        secretName:

The name of the secret holding the OIDC configuration for the solution.k5-default-iam-service-binding

rbac:

        useSelfCreated:

Use self-created default service account, role and role binding. If true the specific service account names are not used.false

rbac:

        serviceAccountName:

Set existing service account name for the solution deployment, only used if rbac.useSelfCreated is false.k5-viewer-sa

rbac:

        provisioner:

                serviceAccountName:

Set existing service account name for the deployment jobs, only used if rbac.useSelfCreated is false.k5-editor-sa

solution:

        logging:

Adjust the log level configuration for Domain Services. The configured log config.json will be used in the solution's Helm deployment and the information will be saved in the deployment of the solution. For more information about the log level configuration see how to Change Default Log Level for a Domain Service Projectsee example below

user:

        user-alias:

                default:

Username used for executing the solution's tests (e.g. dev-test-user). The test user must exist or be created in the realm that this k5-project is using.

user:

        <test-username>:

test-username e.g. dev-test-user. Password used for the specified default user for executing the solution's tests (e.g. password123). This user must match the value provided above for the user-alias.

Example of parameter solution.logging:

solution:
  logging: {
    "/src-impl/api/apitest/operations/*": "trace",
    "/src-impl/api/apitest/operations/addDate.test": "info",
    "/src-impl/api/apitest/operations/addNumber": "error",
    "/sdk/v1/*": "info",
    "/sdk/v1/handler/*": "trace"
  }

Responses:

  • 201 - The Solution Configuration has been successfully created (media type: /)
Warning:

Be aware that updating a Solution Configuration will replace the content of the current configuration with this configurationName. New parameters cannot be appended to existing configurations.

Delete Solution Configurations

Endpoint:

/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName}

HTTP method:

DELETE

Description:

Delete a specific Solution Configuration

curl -X DELETE "<https://{your-hostname}/api/cfg/v1/runtimes/{runtimeName}/solutions/{solutionAcronym}/configurations/{configurationName>}" -H  "accept: text/plain" -H "Authorization: Bearer {BearerToken}"

Responses:

204 - The Solution Configuration has been deleted (media type: /)

Topic Binding Configuration

The following API endpoints are available:

  • /api/cfg/v2/projects/-/topicBindings
    • GET: Get all Topic Bindings in the environment
  • /api/cfg/v2/projects/-/topicBindings/
    • GET: Get a Topic Binding in the environment
    • POST: Create or update a Topic Binding in the environment
    • DELETE: Delete a Topic Binding in the environment
  • /api/cfg/v2/projects/-/topicBindings//template
    • POST: Create a Topic Binding template in the environment
  • /api/cfg/v2/projects//topicBindings
    • GET: Get all Topic Bindings in a specific k5project
  • /api/cfg/v2/projects//topicBindings/
    • GET: Get a Topic Binding in a specific k5project
    • POST: Create or update a Topic Binding in a k5project
    • DELETE: Delete a Topic Binding in a k5project

Path Parameters (Topic Binding Configuration)

ParameterTypeDescription
topicAliasstringThe alias name of the topic.
k5projectstringThe name of the specific k5-project, e.g. dev-stage. Passing the namespace of the Solution Hub will return the results for the default.

Operations (Topic Binding Configuration)

Get all Topic Bindings in the environment

Endpoint:

/api/cfg/v2/projects/-/topicBindings

HTTP method:

GET

Description:

Get all Topic Bindings in the environment

curl -X GET "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - The content of the requested Topic Binding Configuration (media type: application/json)

Get a Topic Binding in the environment

Endpoint:

/api/cfg/v2/projects/-/topicBindings/{topicAlias}

HTTP method:

GET

Description:

Get a Topic Binding in the environment

curl -X GET "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings/{topicAlias}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - The content of the requested Topic Binding Configuration (media type: application/json)

Create or update a Topic Binding in the environment

Endpoint:

/api/cfg/v2/projects/-/topicBindings/{topicAlias}

HTTP method:

POST

Description:

Create or update a Topic Binding in the environment

curl -X POST "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings/{topicAlias}" -H "accept: application/json" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: application/json" -d "{\"kafka_brokers_sasl\":[\"string\"],\"user\":\"string\",\"password\":\"string\",\"saslJaasConfigLoginModuleQualifiedName\":\"org.apache.kafka.common.security.scram.ScramLoginModule\",\"saslMechanism\":\"SCRAM-SHA-512\",\"kafka_custom_config\":[{\"key\":\"null\",\"value\":\"null\"}]}"

Body Parameters (in JSON notation):

ParameterDescription
"topicName":Name of the Topic
"kafkaBinding":Name of the Kafka binding secret

Kafka Custom Config Example:

{
  "topicName": "myTopicName",
  "kafkaBinding": "myKafkaBinding"
}

Responses:

  • 201 - The topic binding has been successfully created. (media type: application/json)

Delete a Topic Binding in the environment

Endpoint:

/api/cfg/v2/projects/-/topicBindings/{topicAlias}

HTTP method:

DELETE

Description:

Delete a Topic Binding in the environment

curl -X DELETE "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings/{topicAlias}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 204 - The Topic Binding has been deleted. (media type: application/json)

Create a Topic Binding template in the environment

Endpoint:

/api/cfg/v2/projects/-/topicBindings/{topicAlias}/template

HTTP method:

POST

Description:

Create or update a Kafka binding for a project

curl -X POST "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings/{topicAlias}/template" -H "accept: application/json" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: application/json" -d "{\"kafka_brokers_sasl\":[\"string\"],\"user\":\"string\",\"password\":\"string\",\"saslJaasConfigLoginModuleQualifiedName\":\"org.apache.kafka.common.security.scram.ScramLoginModule\",\"saslMechanism\":\"SCRAM-SHA-512\",\"kafka_custom_config\":[{\"key\":\"null\",\"value\":\"null\"}]}"

Body Parameters (in JSON notation):

ParameterDescription
"topicName":Name of the Topic
"kafkaBinding":Name of the Kafka binding secret

Kafka Custom Config Example:

{
  "topicName": "myTopicName",
  "kafkaBinding": "myKafkaBinding"
}

Responses:

  • 201 - The Topic binding has been successfully created. (media type: application/json)

Get all Topic Bindings in a specific k5project

Endpoint:

/api/cfg/v2/projects/{k5project}/topicBindings

HTTP method:

GET

Description:

Get a list of all Topic Bindings in a specific k5project. This API can serve as an entry point for other APIs.

curl -X GET "<https://{your-hostname}/api/cfg/v2/projects/{k5project}/topicBindings" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - The content of the requested Topic Binding Configuration (media type: application/json)

Get a Topic Binding in a specific k5project

Endpoint:

/api/cfg/v2/projects/-/topicBindings/{topicAlias}

HTTP method:

GET

Description:

Get a Topic Binding in a certain k5project.

curl -X GET "<https://{your-hostname}/api/cfg/v2/projects/-/topicBindings/{topicAlias}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 200 - The content of the requested Topic Binding Configuration (media type: application/json)

Create or update a Topic Binding in a k5project

Endpoint:

/api/cfg/v2/projects/{k5project}/topicBindings/{topicAlias}

HTTP method:

POST

Description:

Create or update a Kafka binding for a project

curl -X POST "<https://{your-hostname}/api/cfg/v2/projects/{k5project}/topicBindings/{topicAlias}" -H "accept: application/json" -H "Authorization: Bearer {BearerToken}" -H  "Content-Type: application/json" -d "{\"kafka_brokers_sasl\":[\"string\"],\"user\":\"string\",\"password\":\"string\",\"saslJaasConfigLoginModuleQualifiedName\":\"org.apache.kafka.common.security.scram.ScramLoginModule\",\"saslMechanism\":\"SCRAM-SHA-512\",\"kafka_custom_config\":[{\"key\":\"null\",\"value\":\"null\"}]}"

Body Parameters (in JSON notation):

ParameterDescription
"topicName":Name of the Topic
"kafkaBinding":Name of the Kafka binding secret

Kafka Custom Config Example:

{
  "topicName": "myTopicName",
  "kafkaBinding": "myKafkaBinding"
}

Responses:

  • 201 - The Kafka binding has been successfully created. (media type: application/json)

Delete a Topic Binding in a k5project

Endpoint:

/api/cfg/v2/projects/{k5project}/topicBindings/{topicAlias}

HTTP method:

DELETE

Description:

Delete a Topic Binding in a k5project

curl -X DELETE "<https://{your-hostname}/api/cfg/v2/projects/{k5project}/topicBindings/{topicAlias}" -H  "accept: application/json" -H "Authorization: Bearer {BearerToken}"

Responses:

  • 204 - The Topic Binding has been deleted. (media type: application/json)

Examples

Example 1

The following example creates a Solution Configuration named example-configuration for the service project service1 to

  • disable the test support
  • use the DEV binding for calling API Dependencies
  • not support Events
  • not expose the internal APIs

Enter the following values at the Swagger UI:

runtimeName            dev-stage
solutionAcronym        service1
configurationName      example-configuration
Request body(data)     feature:
                         testSupport: false
                         devBinding: true
                         kafkaEvents: false
                         exposeInternalApi: false

Or use the following cURL command:

curl -X POST "https://{your-hostname}/api/cfg/v1/runtimes/dev-stage/solutions/service1/configurations/example-configuration" -H  "accept: */*" -H "Authorization: Bearer {BearerToken}" -H "Content-Type: text/plain" -d "feature:    testSupport: false    devBinding: true    kafkaEvents: false    exposeInternalApi: false"

Example2

This example creates or changes the test configuration of the service project service1 to user "Testuser" with password " Password".

Enter the following values at the Swagger UI:

runtimeName            dev-stage
solutionAcronym        service1
configurationName      service1-test
Request body           user-alias:
                         default: "Testuser"
                       user:
                         Testuser: "Password"

Or use the following cURL command:

curl -X POST "https://{your-hostname}/api/cfg/v1/runtimes/dev-stage/solutions/service1/configurations/service1-test" -H  "accept: */*" -H "Authorization: Bearer {BearerToken}" -H "Content-Type: text/plain" -d "user-alias:    default: \"Testuser\"    user:        Testuser: \"Password\""

Example 3

Example body parameter for a typical development stage (data):

environment:
  host: "dev-stage.apps.openshift-cluster.mydomain.cloud"
feature:
  corsPolicy: true
  devBinding: true
  testSupport: true

Example 4

Example body parameter for a typical production stage (data):

environment:
  host: "prod.apps.openshift-cluster.mydomain.cloud"
feature:
  corsPolicy: true