This page shows how the REST API of the protected self-service flows can be used. It uses the address-change flow from the demo configuration as an example.
Prerequisite
- The protected self-service REST API requires an authenticated session to be accessible.
Starting a protected self-service flow
To start a protected self-service flow the following REST resource is used:
<loginapp-uri>/rest/protected/self-service/flows/{flowId}/select/
| This part of the URI depends on the deployment, Airlock Gateway (WAF) configuration and/or IAM instance configuration. |
| This parameter identifies the flow and the name is configurable. |
Starting a protected self-service flow
A protected self-service flow follows the rules of the flow architecture and can be started like any other flow.
- The status code must return 200 OK.
- Every response to a REST API call will return a nextStep parameter to indicate if all conditions of the current step are met so that the flow can continue to the next step.
- A response with status code 200 OK and without nextStep parameter declares the flow as successfully completed.
REST call sequence
The following REST call sequence shows how to use the protected self-service REST API from a REST client's point of view.
- This example will use the following sequence:
- Authentication of the User.
- Select and initiate the flow.
- Retrieve the context data (e.g. to prefill the UI).
- Update context data.
- Continue the flow.
- Validate the update with mTAN/OTP check.
Step 1 - HTTP Request - Authentication step
Step 1 - HTTP Response - Authentication step
Step 2 - HTTP Request - Select and start the flow with id "address-change"
Step 2 - HTTP Response - Start the flow with id "address-change"
Step 3 - HTTP Request - Retrieve data from the user
Step 3 - HTTP Response - Retreive data from the user
Step 4 - HTTP Request - Update context data
Step 4 - HTTP Response - Update context data
Step 5 - HTTP Request - Complete data/edit with continue
Step 5 - HTTP Response - Complete data/edit with continue
Step 6 - HTTP Request - Validate data/edit with mtan/otp/check
Step 6 - HTTP Response - Validate data/edit with mtan/otp/check
Further information and links
- Internal links:
- Usage - User self-registration flows provides a more detailed overview of the use of requests and responses in a flow.
- Example – User self-registration flow provides a conceptual view of the execution of an example flow.