@ordinlabs/wsm-api-client
v2.3.0-alpha.1
Published
Workspace Manager Client SDK ============================
Downloads
275
Readme
Workspace Manager Client SDK
The Workspace Manager Typescript Client SDK provides a mechanism for scripting actions the Workspace Manager admin application.
Getting an API Key
- Log in to the admin application.
- Click on your username in the top right corner and click the Profile link.
- Click on the Profile tab.
- Click the Generate new access key button.
- Provide a description of the key and an expiration date.
- Click the Generate button.
- Copy the key and store it in a safe place. Note: there is no way to view the key after this dialog is dismissed.
Using the SDK
import { newRpcClient } from '@ordinlabs/wsm-api-client';
async function go() {
const rpcClient = newRpcClient({
baseUrl: 'https://www.example.com',
apiKey: 'the-api-key',
});
await rpcClient.startWorkspace({workspaceId: '12345'});
}
go().catch(e => console.error(e));