Skip to content
Jesper Hjorth edited this page May 16, 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.

General stuff

These are DiMe-specific things, not user account specific, and thus do not require authentication.

GET /api/ping
GET /api/dime_id

Profile API

POST api/profile (adding new profile, profile name response: profile ID)
POST api/profile (modifying a profile if the ID is given in the posted data)
GET api/profile/{ID} (get the content of profile, what is in the profile?)
DELETE api/profile/{ID} (deleting obviously)

Example

POST api/profile with the data:

{
  name: “Kai’s formula profile”,
  search_keywords: [“x”, “y”, ],
  tags: ["tag1", "tag2"],	
}

DiMe response:

{
  id: 83724, 
  name: “Kai’s formula profile”,
  search_keywords: [“x”, “y”, ],
  tags: ["tag1", "tag2"],	
}

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

POST /api/account/register supplied parameters: username, password

POST /api/account/remove supplied parameters: username

POST /api/account/recover supplied parameters: email 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)

Clone this wiki locally