Skip to content
Mats Sjöberg edited this page Nov 15, 2016 · 20 revisions

General comments

In the long run DiMe should perhaps follow Principles of good RESTful API Design, for example using PUT and PATCH for updating existing objects instead of POST'ing with the id given. But for now we'll stick with the old way in order to be consistent with the rest of the DiMe API.

Also API versioning should be introduced at some point, e.g. /api/v1, /api/v2 and so on.

Model API

register model (register name, get ID?)

Tag API

Get list of n most common tags.

GET /api/tag/most_common

[{
  id: 38093,
  name: "reknow",
  eventsCount: 30,
  elementsCount: 28,
  actors: ["KEA 1.0", "lucene"],
  lastAdded: timestamp,
},
]

Get events for tag with given id

GET /api/tag/events/38093
GET /api/tag/informationelements/38093

Account API

Requesting A Password Reset

POST /api/requestPasswordReset

curl

curl -X POST \
  -u username:password \
  -d '{"email":"testuser@mail.com"}' \
  http://<SERVER_HOST>/api/requestPasswordReset
HTTP response headers:
Status: 200 (OK)
HTTP response body:
{}

Also, backwards compatibility is an issue, since people have not supplied emails earlier

Status API

DiMe event count DiMe document count DiMe status, active loggers, API activity (log)