Realms and Admins

Realm is isolated domain of data.

Use Orangepill Console to purchase credits and activate access to Tiers. Tiers are available in various Cluster Zones (US, EU). Each activated Tier will be deployed as new Realm. Tier settings like rate limit and available API credits apply to each Realm.

Realm data is physically isolated and private. It cannot be shared with other Realms.

Use Realms to separate various projects and data domains. You cannot make transactions or share identities, virtual accounts or any other entity outside the scope of Realm.

Setup Realm Admin User

You can create Users for the Realm using Orangepill Console or using API.

You can find realm.id in Orangepill Console.

For Roles list check here.

For Scopes list check here.

New Identity will be created and assigned to new User. Fieldsidentity.country and identity.accounting_currency will be set to realm.country and realm.accounting_currency values.

echo "create admin user for Realm id=634b5be77f6a7b0be52dffcc"

curl --location --request POST 'https://api.orangepill.cloud/v1/realms/634b5be77f6a7b0be52dffcc/users' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "user1",
    "password": "password1",
    "scopes": "realm",
    "roles": "admin",
    "data": {
        "my_field_1": "my_value_1",
        "email": "optional@email.com"
    }
}'

In response we get new Admin User in Realm with access to all scopes. You can use this User to interact with API.

{
    "id": "636eb6d79cfba3cb92ac479a",
    "username": "user1",
    "password": "21da8dc09355b747831267aeee57cf7ac82d7da748cb97c110e7853e14b90835d0965baa3bc7ca7ef53d4225b5afa98062fc141f28c2c7b42ecda7b5b593ded6",
    "identity": "636eb6d79cfba3cb92ac4799",
    "scopes": "realm,own",
    "roles": "admin,manage,user",
    "data": {
        "my_field_1": "my_value_1",
        "email": "optional@email.com"
    },
    "created_at": 1668200151426,
    "active": true,
    "deleted": false
}

List available API credits

Use this API call to check currently available API credits for this Realm.

echo "create admin user for Realm id=634b5be77f6a7b0be52dffcc"

curl --location --request GET 'https://api.orangepill.cloud/v1/realms/634b5be77f6a7b0be52dffcc/credits/available' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'

In response we will get number of available credits.

{
    "credits": 245033
}

Last updated