Open FastFelix771 opened 7 years ago
Name: Status
URL: back.end/global/status
Method: GET
Request: empty
Response: { version: 1.0.0, uptime: 1059439074 }
A simple ping to check if the backend can be reached. The uptime timestamp is the current uptime in milliseconds.
@jens1o This looks similiar to your formerly suggested ping endpoint - would this one fit for such needs?
Yeah, that's looking good :)
Stay fresh!
Name: Public Key
URL: back.end/global/key
Method: GET
Request: empty
Response: { strength: 4096, key: AbeEuewggewregZUouihef==, fingerprint: 8ßsd898fsd8f9ew8aeffg000 }
Provides the backends public RSA encryption key. The key is provided as base64 encoded string and needs to be decoded before its usable as encryption key.
The strength is sent in case that applications have to specify it in their crypto-handler before they can use the key. This data could be read from the key itself, but especially for smaller applications without libraries that support such actions, this may be a lot more convenient.
The fingerprint is an SHA-256 hash which can be used to validate the keys integrity. To validate the integrity of the key, the key itself first needs to be decoded.
@jens1o Any ideas for the api version list? back.end/global/versions or back.end/global/api - something like that.
api version list
There's no need for that? We can do that via the status
endpoint?
There's no need for that? We can do that via the status endpoint?
We could. But i would like to preserve the status endpoint for a simple "are-u-alive"-check.
Following mostly the pattern of the usual, versioned, endpoints - here we should declare the global endpoints for the RESTful backend.
Things to remember about global endpoints:
Name: PingPong URL: back.end/global/ping/pong Method: GET Request: { json structure here } Response: { json structure here }
Some description.... ..... .....