Connecting an information system
Your application sends X-Road requests to your security server. The security server forwards them to the other organisation.
This page covers step 6 of the guide: Confirm it works.
What you need
Section titled “What you need”Find these values on the server page in the dashboard:
| Value | Where |
|---|---|
| Client endpoint | The address your application calls. It ends with /r1/. |
| Client id and Client secret | The service token. Your application sends it with every request. |
The Client secret is shown once. Store it in a safe place when you see it.
The client endpoint and the service token work only after you finish step 6.
Step 6: Confirm it works
Section titled “Step 6: Confirm it works”- In step 6 of the guide, press Copy with token. This copies a test command with your values and your token.
- Paste the command in a terminal. Run it.
- If you get a
200response with XML, it works. - Press It works — finish onboarding.
The test command asks the Estonian Business Register for its list of methods. The screen does not show your token. The copied command has it.
Make requests from your application
Section titled “Make requests from your application”Every request needs three headers:
| Header | Value |
|---|---|
CF-Access-Client-Id |
Your Client id. |
CF-Access-Client-Secret |
Your Client secret. |
X-Road-Client |
Your subsystem: <instance>/<member class>/<member code>/<subsystem>. |
The address has this form:
<client endpoint><instance>/<member class>/<member code>/<subsystem>/<service>The second part is the service you call. The other organisation tells you its values.
Example:
curl \ -H "CF-Access-Client-Id: <client id>" \ -H "CF-Access-Client-Secret: <client secret>" \ -H "X-Road-Client: <instance>/COM/12345678/my-app" \ "<client endpoint><instance>/GOV/70000310/arireg/listMethods"Get access to a service
Section titled “Get access to a service”The other organisation decides who can use its service. Ask it to give access to your subsystem. Send it the X-Road-Client value.
If you lose the token
Section titled “If you lose the token”Press Regenerate next to the service token. The old token stops working at once. Update every application that uses it.