The update API lets you trigger a background refresh of the local xivstrings
data from the latest ixion release, then poll for completion.
POST /api/version is asynchronous. It returns immediately with
202 Accepted, while the server downloads strings.zip, rebuilds the Bleve
index, and swaps the in-memory store in the background.
Updates are disabled unless the server is started with the
XIVSTRINGS_UPDATE_TOKEN environment variable.
Clients must pass the same value as the token query parameter:
POST /api/version?token=your-secret-token
If the token is missing or invalid, the server rejects the request.
GET /api/version
Returns the currently active data version and the latest update job status.
Example response when idle:
{
"version": "publish-20260303-8b409c8",
"update": {
"state": "idle"
}
}Example response while running:
{
"version": "publish-20260303-8b409c8",
"update": {
"state": "running",
"startedAt": "2026-05-11T13:06:40Z"
}
}Example response after success:
{
"version": "publish-20260510-deadbeef",
"update": {
"state": "success",
"startedAt": "2026-05-11T13:06:40Z",
"finishedAt": "2026-05-11T13:10:12Z",
"version": "publish-20260510-deadbeef",
"updated": true
}
}Example response after a no-op check:
{
"version": "publish-20260510-deadbeef",
"update": {
"state": "success",
"startedAt": "2026-05-11T13:20:00Z",
"finishedAt": "2026-05-11T13:20:01Z",
"version": "publish-20260510-deadbeef",
"updated": false
}
}Example response after failure:
{
"version": "publish-20260303-8b409c8",
"update": {
"state": "error",
"startedAt": "2026-05-11T13:06:40Z",
"finishedAt": "2026-05-11T13:07:05Z",
"error": "fetch latest release: github api status 403: rate limit exceeded"
}
}POST /api/version?token=...
Starts an update job if one is not already running.
Example response when a new job starts:
{
"message": "update started",
"update": {
"state": "running",
"startedAt": "2026-05-11T13:06:40Z"
}
}Example response when a job is already running:
{
"message": "update already in progress",
"update": {
"state": "running",
"startedAt": "2026-05-11T13:06:40Z"
}
}The update object can contain these fields:
state: one ofidle,running,success, orerrorstartedAt: UTC timestamp in RFC 3339 formatfinishedAt: UTC timestamp in RFC 3339 formatversion: release version detected by the completed update jobupdated:trueif a new version was downloaded and loaded,falseif the latest version was already presenterror: failure message forstate = "error"
- Call
POST /api/version?token=.... - If the server returns
202, start pollingGET /api/version. - Continue polling while
update.stateisrunning. - Stop when
update.statebecomessuccessorerror. - Read
update.updatedto determine whether a new version was actually applied.
200 OK: returned byGET /api/version202 Accepted: returned byPOST /api/versionwhen the request is accepted400 Bad Request: missingtoken401 Unauthorized: invalidtoken403 Forbidden: updates are disabled becauseXIVSTRINGS_UPDATE_TOKENis not configured405 Method Not Allowed: unsupported HTTP method500 Internal Server Error: unexpected server-side error while reading the current version
curl http://127.0.0.1:8080/api/versioncurl -X POST "http://127.0.0.1:8080/api/version?token=your-secret-token"watch -n 5 'curl -s http://127.0.0.1:8080/api/version'