Quickstart

Clone an SDK, set your credentials and make a first request against the Neon API.

  1. Clone an SDK

    Every SDK is published as source on GitHub. Clone the one for your language and run its test script; its README lists the toolchain it needs.

    bash
    gh repo clone OctriDev/neon-typescript-showcase-sdk
    cd neon-typescript-showcase-sdk
    ./scripts/test
  2. Set your credentials

    The quickstart reads its credentials from the environment, so nothing secret goes into source control.

    bash
    export API_TOKEN="..."
  3. Make a request

    The example below calls client.branch.getMaskingRules (GET /projects/{project_id}/branches/{branch_id}/masking_rules) with example values for its required arguments.

    ts
    import { Neon } from "@octridev/neon";
    
    async function main() {
      const client = new Neon({
        // Optional: replaces the default server and any server an operation declares.
        baseUrl: "https://console.neon.tech/api/v2",
        auth: { bearerAuth: process.env.API_TOKEN! },
      });
      const result = await client.branch.getMaskingRules({ projectId: "a", branchId: "a" });
      console.log(result);
    }
    
    main().catch(console.error);