Skip to content

Commit ed94a76

Browse files
committed
Add docs for new sys/billing/certificates endpoint
1 parent ae4648f commit ed94a76

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: api
3+
page_title: /sys/billing/certificates - HTTP API
4+
description: >-
5+
The `/sys/billing/certificates` endpoint is used to return data about the number of PKI certificates issued by Vault.
6+
---
7+
8+
`# /sys/billing/certificates`
9+
10+
The `/sys/billing/certificates` endpoint is used to return data about the number of PKI certificates issued by Vault.
11+
It returns information for the entire cluster.
12+
13+
## PKI Certificate Counts
14+
15+
This endpoint returns the number of PKI certificates issued by Vault in each month of the given time range.
16+
If there are no counts for a given month, an error will be returned for that month.
17+
18+
| Method | Path |
19+
| :----- | :-------------------------- |
20+
| `GET` | `/sys/billing/certificates` |
21+
22+
### Request Parameters
23+
24+
- `start_time` `(string: <required>)` - The first month for which to return certificate counts.
25+
The time must be a timestamp in RFC 3339 format (e.g., `2025-01-01T00:00:00Z` for January 2025).
26+
27+
- `end_time` `(string: <required>)` - The last month for which to return certificate counts. The `end_time` must not be before the `start_time`.
28+
The time must be a timestamp in RFC 3339 format (e.g., `2025-01-01T00:00:00Z` for January 2025).
29+
30+
### Sample Payload
31+
32+
```json
33+
{
34+
"start_time": "2025-01-01T00:00:00Z",
35+
"end_time": "2025-01-01T00:00:00Z"
36+
}
37+
```
38+
39+
### Sample request
40+
41+
```shell-session
42+
$ curl \
43+
--header "X-Vault-Token: ..." \
44+
--data @payload.json \
45+
http://127.0.0.1:8200/v1/sys/billing/certificates
46+
```
47+
48+
### Sample response
49+
50+
```json
51+
{
52+
"months": [
53+
{
54+
"timestamp": "2025-01-01T00:00:00Z",
55+
"counts": {
56+
"issued_certificates": 123
57+
}
58+
}
59+
]
60+
}
61+
```

0 commit comments

Comments
 (0)