Skip to content

Commit 91162b7

Browse files
authored
vault(api): fix nav to pki cert counters api (#1237)
* vault(api): fix nav to pki cert counters api * vault(api): fix pki cert counters docs Add Enterprise-only banner. Fix sample request and response payloads to align with documented YYYY-MM format. Fix typo in first paragraph.
1 parent 97c15e4 commit 91162b7

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed
Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ description: >-
55
Use the `/sys/billing/certificates` endpoint to fetch data about the number of PKI certificates issued by Vault.
66
---
77

8-
`# /sys/billing/certificates`
8+
# `/sys/billing/certificates`
99

10-
Use the `/sys/billing/certificates` endpoint to fetch data about the
11-
number of PKI certificates issued by Vault. for a cluster.
10+
@include '../partials/alerts/enterprise-only.mdx'
11+
12+
Use the `/sys/billing/certificates` endpoint to fetch data about the number of PKI certificates issued by a Vault cluster.
1213

1314
## PKI Certificate Counts
1415

@@ -24,7 +25,6 @@ By default, the endpoint returns data for the current billing period.
2425
- `start_time` `(string: "")` - The year and month indicating the first month of the
2526
query range in format `YYYY-MM`. The `start_time` is required if an `end_time` is provided.
2627

27-
2828
- `end_time` `(string: "")` - The year and month indicating the last month of the
2929
query range in format `YYYY-MM`. The `end_time` is required if a `start_time`
3030
is provided.
@@ -33,8 +33,8 @@ is provided.
3333

3434
```json
3535
{
36-
"start_time": "2025-01-01",
37-
"end_time": "2025-01-01"
36+
"start_time": "2025-10",
37+
"end_time": "2025-11"
3838
}
3939
```
4040

@@ -44,7 +44,7 @@ is provided.
4444
$ curl \
4545
--header "X-Vault-Token: ..." \
4646
--data @payload.json \
47-
http://127.0.0.1:8200/v1/sys/billing/certificates
47+
http://127.0.0.1:8200/v1/sys/billing/certificates?end_time=2025-11&start_time=2025-10
4848
```
4949

5050
### Sample response
@@ -53,10 +53,17 @@ $ curl \
5353
{
5454
"months": [
5555
{
56-
"timestamp": "2025-01-01",
5756
"counts": {
58-
"issued_certificates": 123
59-
}
57+
"issued_certificates": 0
58+
},
59+
"error": "certificate counts not found for 2025-10",
60+
"timestamp": "2025-10"
61+
},
62+
{
63+
"counts": {
64+
"issued_certificates": 2
65+
},
66+
"timestamp": "2025-11"
6067
}
6168
]
6269
}

content/vault/v1.21.x/data/api-docs-nav-data.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@
429429
"title": "<code>/sys/auth</code>",
430430
"path": "system/auth"
431431
},
432+
{
433+
"title": "<code>/sys/billing/certificates</code>",
434+
"path": "system/billing/certificates"
435+
},
432436
{
433437
"title": "<code>/sys/capabilities</code>",
434438
"path": "system/capabilities"
@@ -841,4 +845,4 @@
841845
}
842846
]
843847
}
844-
]
848+
]

0 commit comments

Comments
 (0)