REST API Introduction¶
The REST API allows to do all necessary operations for managing Documents and handling Publication Flow. As Mica manages both draft
and published
states of each document, there are distinct REST entry points, requiring different level of permissions.
Authentication¶
Mica supports Basic authentication, which consists of a HTTP request’s header field in the form of Authorization: Basic <credentials>
, where credentials is the Base64 encoding of user’s (or application’s) ID and password joined by a single colon :
.
Using cURL, it is as simple as providing the –user option:
curl --user <id>:<password> [...]
Authorization¶
Authorizations are role based. The built-in roles are:
Role | Description |
---|---|
mica-administrator |
Can edit/publish data and change system configuration. |
mica-reviewer |
Can edit draft data and publish them. |
mica-editor |
Can edit data draft data. |
mica-data-access-officer |
Can manage data access requests. |
mica-user |
Can view published data. |
Clients¶
Usage examples provided are based on cURL, a command line client, the Python command line tool (see Python Introduction) and the R package micar (published content only).