Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: api
page_title: /sys/billing/certificates - HTTP API
description: >-
Use the `/sys/billing/certificates` endpoint to fetch data about the number of PKI certificates issued by Vault.
---

`# /sys/billing/certificates`

Use the `/sys/billing/certificates` endpoint to fetch data about the
number of PKI certificates issued by Vault. for a cluster.

## PKI Certificate Counts

The Certificate Counts endpoint returns the number of PKI certificates issued by Vault, or an error, for each month of the given time range.
By default, the endpoint returns data for the current billing period.

| Method | Path |
| :----- | :-------------------------- |
| `GET` | `/sys/billing/certificates` |

### Request parameters

- `start_time` `(string: "")` - The year and month indicating the first month of the
query range in format `YYYY-MM`. The `start_time` is required if an `end_time` is provided.


- `end_time` `(string: "")` - The year and month indicating the last month of the
query range in format `YYYY-MM`. The `end_time` is required if a `start_time`
is provided.

### Sample payload

```json
{
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-01-01T00:00:00Z"
}
```

### Sample request

```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--data @payload.json \
http://127.0.0.1:8200/v1/sys/billing/certificates
```

### Sample response

```json
{
"months": [
{
"timestamp": "2025-01-01T00:00:00Z",
"counts": {
"issued_certificates": 123
}
}
]
}
```
Loading