Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Neon Consumption API

Query consumption metrics for projects and accounts. Available for Scale, Business, and Enterprise plan accounts.

Neon Consumption API is one of 13 APIs that Neon publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Consumption. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 2 operations across 2 paths, and defines 4 schemas. It is described by OpenAPI 3.1.0, at version 2.0.

Requests are made against a single base URL, https://console.neon.tech/api/v2.

2 operations 2 paths 4 schemas 2 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.0
Base URL
https://console.neon.tech/api/v2
Authentication
HTTP Bearer
Terms of Service
Resource Areas
1

Authentication & Security 1

Neon Consumption API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (API Key) (bearerAuth). By default, every request must be authenticated.

  • bearerAuth — Neon API keys are used to authenticate requests. Include the API key in the Authorization header as a Bearer token.

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 GET. Each is listed below with its method, path, parameters, and response codes.

Consumption 2

Query consumption metrics for projects and accounts. Available for Scale, Business, and Enterprise plan accounts.

GET
/consumption_history/account
Get account consumption metrics
getConsumptionHistoryPerAccount 3 params → 200401403
GET
/consumption_history/projects
Get project consumption metrics
getConsumptionHistoryPerProject 5 params → 200401403

Schemas 4

The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are ConsumptionMetric (6 properties), Pagination (4 properties), ConsumptionHistoryPerProject (2 properties), ConsumptionHistoryPerAccount (1 property). Each schema is shown below with its type and property counts.

ConsumptionHistoryPerAccount
object
Account-level consumption metrics
1 property
Pagination
object
Pagination metadata for list responses
4 properties
ConsumptionMetric
object
A consumption metric data point
6 properties
ConsumptionHistoryPerProject
object
Project-level consumption metrics
2 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

neon-consumption-api-openapi.yml Raw ↑

Other APIs Neon publishes across the network.

Neon Data API
Neon Serverless Driver
Neon Auth
Neon API Keys API
Neon Auth API
Neon Branches API
Neon Data API API
Neon Databases API
Neon Endpoints API
Neon Operations API
Neon Projects API
Neon Roles API