Skip to content

Sign Up API

The first step to using Metronome is to sign up for an account. We currently require only an internal contact who we can contact to discuss assistant, support and montly billing.

You must select your own organisation slug, which is an alphanumeric string that may also contain dash characters. In the following examples, The Flower Boutique is the name of the organisation and they have chosen the slug ‘the-flower-boutique’. At this time we have a cluster in the ‘eu-west-1’ region which is in northern France. If you require a cluster in another region, please contact us.

sign-up.ts
import { AccessManagementApi, ServerConfiguration, createConfiguration } from "@privatedataservices/metronome-client";
const yourOrgSlug = "the-flower-boutique";
const internalContact = "dpo-team@code-examples.com";
const signupConfiguration = createConfiguration({baseServer: new ServerConfiguration(`https://{$yourOrgSlug}.prod.eu-west-1.privatedataservices.com`, {})});
const signupClient = new AccessManagementApi(signupConfiguration);
try {
const response = await signupClient.signUp({internalContact: internalContact});
console.log("Your dev master API key is %s to be used on server %s and your production master API key is %s to be used on server %s", response.devMasterApiKeyId, response.devApiUrl, response.productionMasterApiKeyId, response.productionApiUrl);
} catch(err) {
console.error("Failed to sign up because: %s", JSON.stringify(err));
console.error(err);
}

Once excuted, you should carefully record your dev and production server URLs, as well as the master API keys for each environment. These master keys have full permissions on your server, able to create and modify API keys, create and modify policies, query usage logs and send telemetry. While other API keys can be modified to enable or disable, change permissions etc, these master API keys are immutable, so take good care of them.

Ideally you should use these keys to create other API keys with appropriate permissions for your other systems to submit telemetry or query expiry notices. Perhaps you might use them to create policies directly but we consider it good practice to create an API key solely for managing your policies. Reducing the permission scope for other API keys reduces the chance for error during later operations.

You will need to use the dev and production server URLs when making calls to Metronome. You should store these URLs in configuration data for your dev and production environments so that clients connect to the appropriate instance. API keys created on the dev environment cannot be used on production and vice versa.