Enrolling Treasury
Treasury won't be accessible by the UI immediately. You'll need to create a Treasury instance and connect it via the admin API.
In the near future we will publish a hosted UI to managed this.
Create an Organization.
Sign in to the portal and create an Organization if you haven't already.
From here you can go ahead and invite other users to your organization. However, they won't have any credentials yet on Treasury.
Create a Treasury for your organization
This will associate a treasury instance with your organization that your users can then connect to on the UI.
In order to create this, you need to set a API_URL
. This is what the UI will try to connect to when users try to connect.
This should not be a public endpoint, but a private URL that will work within a network inside your organization, e.g. http://example.internal:8777
or https://example.internal.
You can use http://127.0.0.1:8777 to test with if you have a demo running locally.
Locate Treasury Name
Use the API_URL
of your instance to read it.
curl ${API_URL}/v1/treasury
Set TREASURY_NAME
.
Locate Organization Name
- Using CLI
- Using Curl
Login.
treasury access-token create
Get your organization.
treasury admin organizations ls
Copy access-token from https://auth.cordial.systems/login, set ACCESS_TOKEN
.
curl -H "Authorization: Bearer $ACCESS_TOKEN" https://admin.cordialapis.com/v1/organizations
Set ORGANIZATION_NAME
.
Create
Registering a treasury in the Admin API uses POST.
- Using CLI
- Curl
- HTTPie
treasury admin treasuries create --api-url ${API_URL} --organization ${ORGANIZATION_NAME} ${TREASURY_NAME}
curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'content-type: application/json' \
--data '{ "description":"my first treasury", "organization": "'"${ORGANIZATION_ID}"'", "api":"'"${API_URL}"'"}' \
https://admin.cordialapis.com/v1/${TREASURY_NAME}
http -A bearer -a ${ACCESS_TOKEN} \
https://admin.cordialapis.com/v1/${TREASURY_NAME} \
description="my first treasury" organization="${ORGANIZATION_ID}" api="${API_URL}"
Update
Change information if necessary (using PUT
instead of POST
).
- Using CLI
- Curl
- HTTPie
treasury admin treasuries update ${TREASURY_NAME} ---set-api ${API_URL} --description "my treasury"
curl -X PUT -H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'content-type: application/json' \
--data '{ "description":"my first treasury", "organization": "'"${ORGANIZATION_ID}"'", "api":"'"${API_URL}"'"}' \
https://admin.cordialapis.com/v1/${TREASURY_NAME}
http -A bearer -a ${ACCESS_TOKEN} \
PUT \
https://admin.cordialapis.com/v1/${TREASURY_NAME} \
description="my first treasury" organization="${ORGANIZATION_ID}" api="${API_URL}"
Check UI
Now you should be able to select your treasury, which will connect via your API_URL
.
Adding users
The users you invited to your organization will be able to see the Treasury but they will not be able
to submit any data. You will need to separately create invite credentials to enable them to enroll
WebAuthn credentials. Use the users
tab on the UI and work with your other admins to get requests approved
to enroll other users.