Skip to content

Activities

GET /api/activities

Returns activities stored in OSIRIS.

This endpoint can be used to retrieve activity records, select specific fields, filter results, aggregate records by a field, or export full activity data.

The API key can be passed as query parameter:

1
GET /api/activities?apikey=YOUR_API_KEY

or as HTTP header:

1
X-API-Key: YOUR_API_KEY

Parameters

Parameter Type Description
apikey string API key, if required.
json string JSON-encoded MongoDB filter. Overrides filter if both are provided.
filter object/array Alternative filter parameter. Mainly useful for internal calls.
columns[] array Optional list of fields to return.
aggregate string Groups activities by the given field and returns counts.
full boolean Returns full activity records as streamed JSON.
limit integer Limits the number of returned records.
offset integer Skips records when limit is used.

Default Response

Without additional parameters, the endpoint returns a compact activity list.

1
GET /api/activities?apikey=YOUR_API_KEY
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "status": 200,
  "count": 1,
  "data": [
    {
      "id": "665ef1234567890abcdef123",
      "activity": "Rendered activity entry",
      "icon": "ph-book-open",
      "type": "Publication",
      "subtype": "Journal Article",
      "year": 2025
    }
  ]
}

Default fields:

Field Description
id Activity ID as string.
activity Rendered HTML representation for web display.
icon Icon representing the activity type.
type Rendered activity type.
subtype Rendered activity subtype.
year Activity year.

Selecting Columns

Use columns[] to request specific fields.

1
GET /api/activities?apikey=YOUR_API_KEY&columns[]=title&columns[]=year&columns[]=type

Some fields are read from the rendered activity representation:

1
web, print, icon, type, subtype, authors, title, departments

All other fields are read directly from the activity record.

Example:

1
GET /api/activities?apikey=YOUR_API_KEY&columns[]=title&columns[]=doi&columns[]=year
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "status": 200,
  "count": 1,
  "data": [
    {
      "id": "665ef1234567890abcdef123",
      "title": "Rendered publication title",
      "doi": "10.1234/example",
      "year": 2025
    }
  ]
}

Filtering

Use the json parameter to pass a MongoDB filter.

1
GET /api/activities?apikey=YOUR_API_KEY&json={"year":2025}

URL-encoded:

1
GET /api/activities?apikey=YOUR_API_KEY&json=%7B%22year%22%3A2025%7D

Example: publications from 2025:

1
2
3
4
{
  "type": "publication",
  "year": 2025
}

Example with MongoDB operator:

1
2
3
4
5
{
  "year": {
    "$gte": 2023
  }
}

Pagination

Pagination is available through the global limit and offset parameters.

1
GET /api/activities?apikey=YOUR_API_KEY&limit=50&offset=100

The count field contains the total number of matching records before pagination is applied.

1
2
3
4
5
6
7
{
  "limit": 50,
  "offset": 100,
  "status": 200,
  "count": 350,
  "data": []
}

Aggregation

Use aggregate to group activities by one field.

1
GET /api/activities?apikey=YOUR_API_KEY&aggregate=year
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "status": 200,
  "count": 2,
  "data": [
    {
      "count": 42,
      "value": 2025
    },
    {
      "count": 37,
      "value": 2024
    }
  ]
}

Aggregation can be combined with filters:

1
GET /api/activities?apikey=YOUR_API_KEY&aggregate=year&json=%7B%22type%22%3A%22publication%22%7D

If the aggregation field contains authors, OSIRIS unwinds the authors array before grouping.

Example:

1
GET /api/activities?apikey=YOUR_API_KEY&aggregate=authors.user

Full Export

Use full=1 to retrieve full activity records.

1
GET /api/activities?apikey=YOUR_API_KEY&full=1

This returns streamed JSON:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "status": 200,
  "data": [
    {
      "_id": "665ef1234567890abcdef123",
      "type": "publication",
      "year": 2025
    }
  ],
  "count": 1
}

This mode is intended for exports or synchronization. It may return large datasets.

GET /api/html

Returns publication records as pre-rendered HTML citations.

This endpoint is intended for websites and external systems that want to display publication lists without implementing their own citation formatting.

The returned HTML is generated by OSIRIS and can be embedded directly into web pages.

Parameters

Parameter Type Description
apikey string API key, if required.
limit integer Maximum number of publications returned.

Returned Publications

The endpoint currently returns publications matching the following criteria:

  • Activity type is publication
  • Publication year is greater than or equal to the start year (OSIRIS setting)
  • At least one author is marked as affiliated

Example Request

1
GET /api/html?apikey=YOUR_API_KEY&limit=10

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "status": 200,
  "count": 1,
  "data": [
    {
      "id": "6458fcb30d695c593828763f",
      "html": "\u003Cb\u003EKoblitz J.\u003C/b\u003E (2023) Metabolism from the magic angle. \u003Ci\u003ENature Chemical Biology\u003C/i\u003E ",
      "year": 2023,
      "departments": [
        "BID"
      ],
      "link": "https://dx.doi.org/10.1038/s41589-023-01317-2"
    },
  ]
}

Returned Fields

Field Description
id Activity ID
html Pre-rendered publication citation in HTML format
year Publication year
departments Associated departments
link DOI, PubMed, or external URL if available

The link field is automatically generated using the following priority:

  1. DOI
  2. PubMed ID
  3. External URL stored in the publication record

If none of these values are available, link is returned as null.

Typical Use Cases

  • Institutional publication lists
  • Research group websites
  • Personal profile pages
  • Public publication portals
  • Automated content integration into CMS systems