DataAPI
4 operations in the Neon API work with dataapi. Each is in the API reference with its parameters, responses and generated code.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /projects/{project_id}/branches/{branch_id}/data-api/{database_name} | Retrieve Neon Data API configuration |
POST | /projects/{project_id}/branches/{branch_id}/data-api/{database_name} | Create Neon Data API |
PATCH | /projects/{project_id}/branches/{branch_id}/data-api/{database_name} | Update Neon Data API |
DELETE | /projects/{project_id}/branches/{branch_id}/data-api/{database_name} | Delete Neon Data API |
Example
Retrieve Neon Data API configuration, with the TypeScript SDK:
ts
import { Neon } from "@octridev/neon";
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.dataApi.get({
projectId: "project-1",
branchId: "branch-1",
databaseName: "databaseName",
});
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.