Endpoint
These methods allow you to create and manage compute endpoints in your Neon project. For related information, see Manage compute endpoints.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /projects/{project_id}/endpoints | List compute endpoints |
POST | /projects/{project_id}/endpoints | Create compute endpoint |
GET | /projects/{project_id}/endpoints/{endpoint_id} | Retrieve compute endpoint details |
PATCH | /projects/{project_id}/endpoints/{endpoint_id} | Update compute endpoint |
DELETE | /projects/{project_id}/endpoints/{endpoint_id} | Delete compute endpoint |
POST | /projects/{project_id}/endpoints/{endpoint_id}/start | Start compute endpoint |
POST | /projects/{project_id}/endpoints/{endpoint_id}/suspend | Suspend compute endpoint |
POST | /projects/{project_id}/endpoints/{endpoint_id}/restart | Restart compute endpoint |
Example
List compute endpoints, 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.endpoint.list({
projectId: "project-1",
});
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.