Skip to content

Commit 41586c4

Browse files
Merge pull request #35 from DataSeer/bugfix/ping
Bugfix/ping
2 parents 54123d7 + 613dfcc commit 41586c4

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [2.0.1](https://github.com/DataSeer/snapshot-api/compare/v2.0.0...v2.0.1) (2025-02-13)
6+
7+
8+
### Features
9+
10+
* add durations (ms) in HTTP logs, for grafana charts ([5cc660c](https://github.com/DataSeer/snapshot-api/commits/5cc660cd03e0da98e07c25618c3319298091e626))
11+
12+
13+
### Bug Fixes
14+
15+
* ping API route (/ping) must return HTTP status 200 even if a service check health status failed ([db53d4d](https://github.com/DataSeer/snapshot-api/commits/db53d4dd21d4ad7a771d2d82cfdfe02f7ed1676f))
16+
17+
18+
### Documentation
19+
20+
* update the 'user documentation' (cumulated score) ([46d7868](https://github.com/DataSeer/snapshot-api/commits/46d7868d99e059f08c769c7b1b42c2a5ea4731cb))
21+
522
## [2.0.0](https://github.com/DataSeer/snapshot-api/compare/v1.0.0...v2.0.0) (2025-01-15)
623

724

USER_DOCUMENTATION.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
This document provides detailed information about the available endpoints in
1313
the [Snapshot API](https://snapshot.dataseer.ai) (hosted on [snapshot.dataseer.ai](https://snapshot.dataseer.ai)).
14-
The API expects to receive one PDF document for each request, along with, requred parameters and an authentication
14+
The API expects to receive one PDF document for each request, along with, required parameters and an authentication
1515
token, and it returns a JSON response with the computed OSI scores and other relevant information.
1616

1717
## Authentication
@@ -23,8 +23,8 @@ The API tokens must be included in each requests `Authorization header`:
2323
Authorization: Bearer <your_token>
2424
```
2525

26-
Should you need an API token or have issues with authentication, please contact the DataSeer support. Each API token is
27-
bounded to a specific user and API throughput limits of 100 request each 15 minutes.
26+
Should you need an API token or have issues with authentication, please contact DataSeer support ([email protected]). Each API token is
27+
bounded to a specific user.
2828

2929
## API Endpoints
3030

@@ -236,5 +236,5 @@ The API uses standard HTTP status codes to indicate the success or failure of re
236236
| `document_type` is not supplied | 400 | Missing document type. It is a required information to be supplied as field 'document_type' of the parameter 'options'. Check the documentation for more information. |
237237
| `document_type` is supplied but invalid: empty, null or of a non-acceptable type | 400 | The supplied document type is empty or null. It is a required information to be supplied as field 'document_type' of the parameter 'options'. Check the documentation for more information. |
238238
| `document_type` is supplied but indicate a document that type that is not supported | 400 | The SnapShot tool does not support this type of document. Check the documentation for more information. |
239-
| `supplementary_files` are not JSON well formed | 400 | The supplementary file list cannot be parsed as a JSON object. |
239+
| `supplementary_files` are not well formed JSON | 400 | The supplementary file list cannot be parsed as a JSON object. |
240240

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodejs-rest-api",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "nodejs REST API to interact with GenShare",
55
"main": "src/server.js",
66
"engines": {

src/controllers/healthController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports.getPing = async (req, res) => {
4848
const allHealthy = [genshareResult, grobidResult, datastetResult]
4949
.every(service => service.response.status === 200);
5050

51-
const overallStatus = allHealthy ? 200 : 503;
51+
const overallStatus = 200;
5252

5353
res.status(overallStatus).json({
5454
status: allHealthy ? 'healthy' : 'unhealthy',

0 commit comments

Comments
 (0)