Skip to content

Commit 2e54b77

Browse files
authored
Add docs for new sys/billing/certificates endpoint (#1107)
This is a copy of #1042 that's up to date with `main`
2 parents 80a8caa + bb2c72d commit 2e54b77

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
layout: api
3+
page_title: /sys/billing/certificates - HTTP API
4+
description: >-
5+
Use the `/sys/billing/certificates` endpoint to fetch data about the number of PKI certificates issued by Vault.
6+
---
7+
8+
`# /sys/billing/certificates`
9+
10+
Use the `/sys/billing/certificates` endpoint to fetch data about the
11+
number of PKI certificates issued by Vault. for a cluster.
12+
13+
## PKI Certificate Counts
14+
15+
The Certificate Counts endpoint returns the number of PKI certificates issued by Vault, or an error, for each month of the given time range.
16+
By default, the endpoint returns data for the current billing period.
17+
18+
| Method | Path |
19+
| :----- | :-------------------------- |
20+
| `GET` | `/sys/billing/certificates` |
21+
22+
### Request parameters
23+
24+
- `start_time` `(string: "")` - The year and month indicating the first month of the
25+
query range in format `YYYY-MM`. The `start_time` is required if an `end_time` is provided.
26+
27+
28+
- `end_time` `(string: "")` - The year and month indicating the last month of the
29+
query range in format `YYYY-MM`. The `end_time` is required if a `start_time`
30+
is provided.
31+
32+
### Sample payload
33+
34+
```json
35+
{
36+
"start_time": "2025-01-01T00:00:00Z",
37+
"end_time": "2025-01-01T00:00:00Z"
38+
}
39+
```
40+
41+
### Sample request
42+
43+
```shell-session
44+
$ curl \
45+
--header "X-Vault-Token: ..." \
46+
--data @payload.json \
47+
http://127.0.0.1:8200/v1/sys/billing/certificates
48+
```
49+
50+
### Sample response
51+
52+
```json
53+
{
54+
"months": [
55+
{
56+
"timestamp": "2025-01-01T00:00:00Z",
57+
"counts": {
58+
"issued_certificates": 123
59+
}
60+
}
61+
]
62+
}
63+
```

0 commit comments

Comments
 (0)