Projects (SDK)
List and read the Microtica projects your credential can access with the SDK's projects namespace, the entry point for every other resource.
The projects namespace lists and reads the projects your credential can access. A project id is the first argument to almost every other namespace method, so you'll often start here.
Methods
| Method | Returns |
|---|---|
projects.list() | The projects your credential can access. |
projects.get(projectId) | One project's full record. |
Examples
List your projects and use the first id elsewhere:
TypeScript
import { Microtica } from "@microtica/sdk";
const microtica = new Microtica({ token: process.env.MICROTICA_TOKEN! });
const projects = await microtica.projects.list();
const projectId = projects[0].id;
const project = await microtica.projects.get(projectId);
console.log(project.name, project.paymentPlan?.name);Next steps
The SDK client
Construct the Microtica SDK client with an API key, set the request timeout, inspect identity, and handle errors in your Node.js code.
Environments (SDK)
Clone, deploy, wait on, and tear down Microtica environments and their resources with the SDK's envs namespace, plus config management.