E587 corrected system API doc (#3906) · FusionAuth/fusionauth-site@d29235e · GitHub
[go: up one dir, main page]

Skip to content

Commit d29235e

Browse files
authored
corrected system API doc (#3906)
It said you can't use the system status without an API key, but that is not true. It didn't have a valid response for the unauthenticated request
1 parent 84a9ce4 commit d29235e

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

astro/src/content/docs/apis/system.mdx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,45 @@ This API is used to retrieve the status of a reindex request. This may be useful
225225

226226
The Status API is used to retrieve the current status and metrics for FusionAuth. This is useful for monitoring. For health checks, prefer [the Health API](/docs/apis/system#retrieve-system-health).
227227

228-
By default, this API requires authentication. If you prefer to allow unauthenticated access to this endpoint from local scrapers, you may set `fusionauth-app.local-metrics.enabled=true`. See the [configuration reference](/docs/reference/configuration) for more info.
228+
By default, this API requires authentication to return full results. If you prefer to allow unauthenticated access to this endpoint from local scrapers, you may set `fusionauth-app.local-metrics.enabled=true`. See the [configuration reference](/docs/reference/configuration) for more info.
229+
230+
If you call this API without an API key, you will receive a status response only.
229231

230232
<Aside type="note">
231233
FusionAuth also supports a system status check [using Prometheus](/docs/operate/monitor/prometheus).
232234
</Aside>
233235

234236
### Request
235237

236-
<API method="GET" uri="/api/status" authentication={["local-bypass", "none"]} title="Return the system status without an API key"/>
238+
<API method="GET" uri="/api/status" authentication={["none"]} title="Return the system status without an API key"/>
237239

238240
<API method="GET" uri="/api/status" authentication={["api-key"]} title="Return the system status with an API key"/>
239241

242+
<API method="GET" uri="/api/status" authentication={["local-bypass"]} title="Return the system status without an API key with local bypass configured"/>
243+
240244
### Response
241-
The JSON response from the Status API is complex and subject to change. The only exception is the `version` key.
245+
246+
This JSON response body varies based on whether you:
247+
248+
* provide an API key
249+
* do not provide an API key
250+
* configure local bypass
251+
252+
When no API key is used and local bypass is not enabled, the response consists of the `status` key.
253+
254+
```json
255+
{
256+
"status": "ok"
257+
}
258+
```
259+
260+
When retrieved with an API key or if local bypass is enabled, the JSON response from the Status API is complex and subject to change. The only exception is the `version` key.
242261

243262
The `version` key will not change and will be returned as below. As a reminder, an API key is required to obtain this value unless explicitly allowed from `localhost`.
263+
244264
```json
245265
{
246-
"version": "1.26.1"
266+
"version": "1.59.0"
247267
}
248268
```
249269

@@ -259,7 +279,6 @@ _Response Codes_
259279
| 454 | The FusionAuth database connection pool connectivity is below the healthy threshold. Additional information may be available in the JSON response which is retrieved when using an API key.<br/><br/> As of version `1.51.1` this status code will no longer be returned based upon the connectivity health check. In practice you only need to monitor for `452` to ensure FusionAuth is able to connect to the database. {/* eslint-disable-line */} |
260280
| 460 | FusionAuth is using Elasticsearch and the search service is reporting an unhealthy cluster status. In a cluster with 2+ nodes, this means the cluster status is being reported as `yellow` or `red`. In a single-node Elasticsearch configuration this means the cluster status is `red.`<br/><br/> As of version `1.51.1` this status code will no longer be returned based upon the Elasticsearch health check. If you are using an external Elasticsearch or OpenSearch service, you will want to monitor that separately from FusionAuth. {/* eslint-disable-line */} |
261281
| 500 | FusionAuth is not functioning properly. This could indicate that the database connectivity failed or one or more services within FusionAuth failed. Consult the FusionAuth [Troubleshooting](/docs/operate/troubleshooting/troubleshooting) to learn more about the failure or contact FusionAuth support for assistance. |
262-
263282
## Retrieve System Health
264283

265284
<Aside type="version">

0 commit comments

Comments
 (0)
0