Invoking Data Fabric REST API when SSO is configured

Describes how an SSO user can invoke Data Fabric REST API.

SSO users can access Data Fabric REST API by using a bearer token.

As an SSO user, you must first obtain a bearer token from Keycloak.

Use the following curl command to obtain a bearer token from Keycloak:

curl -X POST \ https://<data_fabric_server_ip>/realms/master/protocol/openid-connect/token \ -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'client_id=edf-client'  \ --data-urlencode 'grant_type=password'  --data-urlencode
'client_secret=<client_secret>' \  --data-urlencode 'scope=openid' --data-urlencode 'username=<username>' --data-urlencode 'password=<password>'

Once you obtain a bearer token, you can invoke the Data Fabric REST API with authentication by using the obtained bearer token:

curl "https://<data_fabric_server_ip>:8443/rest/<command>/<subcommand>" \ --header 'Authorization: Bearer <bearer token obtained from Keycloak>'
NOTE
The aforementioned steps are applicable to all maprcli commands invoked using REST. For a complete maprcli reference, see maprcli and REST API Syntax.