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 (see Configuration for how roles are granted from user groups):

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 draft data.

mica-external-editor

Can add draft data and submit data access requests.

mica-data-access-officer

Can manage data access requests.

mica-user

Can view published data and submit data access requests.

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).