List
List plans
client.v1.plans.list(PlanListParamsquery?, RequestOptionsoptions?): CursorPage<idstringdescriptionstringnamestringcustom_fieldsRecord<string, string>PlanListResponse>
get/v1/plans
List all available plans.
Parameters
querylimitnumbernext_pagestringPlanListParams
Returns
PlanListResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
// Automatically fetches more pages as needed.
for await (const planListResponse of client.v1.plans.list()) {
console.log(planListResponse.id);
}
200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"description": "description",
"name": "name",
"custom_fields": {
"foo": "string"
}
}
],
"next_page": "next_page"
}