Quickstart
This walks through installing a client, authenticating, and making your first request — listing the resource pools your account can see.
1. Install
npm install @devium/rms
pip install devium-rms-api
2. Authenticate and make a request
import { AuthApiClient, ResourceApiClient } from '@devium/rms';
const host = 'https://app.devium.io';
// 1. Exchange credentials for tokens (stored on the auth client).
const auth = new AuthApiClient(`${host}/api/v1/auth`);
const { accessToken } = await auth.login({
username: 'you@example.com',
password: '••••••••',
});
// 2. Use the token with any domain client.
const resources = new ResourceApiClient(`${host}/api/v1/resources`);
resources.setAccessToken(accessToken);
// 3. Make a request.
const pools = await resources.getAllPools();
console.log(pools);
from devium.rms.api.auth_api_client import AuthAPIClient
from devium.rms.api.resources_api_client import ResourcesAPIClient
host = "https://app.devium.io"
# 1. Exchange credentials for tokens.
auth = AuthAPIClient(base_url=host)
tokens = auth.login(username="you@example.com", password="••••••••")
# 2. Use the token with any domain client.
resources = ResourcesAPIClient(base_url=host, access_token=tokens["access_token"])
# 3. Make a request.
pools = resources.get_all_pools()
print(pools)
# 1. Get a token.
ACCESS_TOKEN=$(curl -s -X POST https://app.devium.io/api/v1/auth/token \
-d "username=you@example.com" -d "password=••••••••" \
| jq -r .access_token)
# 2. List pools.
curl https://app.devium.io/api/v1/resources/ \
-H "Authorization: Bearer $ACCESS_TOKEN"
That's it — you've authenticated and read from the API. Each domain has its own client (UserApiClient, OrganizationApiClient, AnalyticsApiClient, LCMApiClient, …) following the same shape: construct it, set the access token, call typed methods.
note
The JavaScript clients accept and return camelCase and convert to the API's snake_case for you. The Python clients work with plain dicts using the API's snake_case keys.
Next steps
- Authentication — token refresh and long-lived sessions.
- More client and REST reference sections are on the way.