---
title: "Fetch site activity, optionally filtered by user or org"
method: GET
path: "/activity/"
tags: ["site"]
---

# Fetch site activity, optionally filtered by user or org

`GET /activity/`

## Request

- Base URL: `https://dados.gov.pt/api/1`
- URL: `https://dados.gov.pt/api/1/activity/`
- Auth: none declared

## Query parameters

- `page` integer
- `page_size` integer
- `user` string
- `organization` string
- `related_to` string

## Headers

- `X-Fields` string, mask

## Response `200`

Success

- ActivityPage
  - `data` Activity[]: The page data
    - `actor` UserReference
      - `class` string, required: The object class
      - `id` string, required: The object unique identifier
      - `avatar` string: The user avatar URL
      - `avatar_thumbnail` string: The user avatar thumbnail URL. This is the square (500x500) and cropped version.
      - `first_name` string: The user first name
      - `last_name` string: The user larst name
      - `page` string: The user web page URL
      - `slug` string: The user permalink string
      - `uri` string: The API URI for this user
    - `changes` string[]: Changed attributes as list
    - `created_at` string, date-time: When the action has been performed
    - `extras` object: Extras attributes as key-value pairs
    - `icon` string, required: The icon of the activity
    - `key` string, required: The key of the activity
    - `label` string, required: The label of the activity
    - `organization` OrganizationReference
      - `class` string, required: The object class
      - `id` string, required: The object unique identifier
      - `acronym` string: The organization acronym
      - `badges` BadgeRead[]: The organization badges
        - `kind` string, required
      - `logo` string: The organization logo URL
      - `logo_thumbnail` string: The organization logo thumbnail URL. This is the square (100x100) and cropped version.
      - `name` string: The organization name
      - `page` string: The organization web page URL
      - `permissions` OrganizationPermissions
        - `delete` boolean
        - `edit` boolean
        - `harvest` boolean
        - `members` boolean
        - `private` boolean
      - `slug` string: The organization string used as permalink
      - `uri` string: The API URI for this organization
    - `related_to` string, required: The activity target name
    - `related_to_id` string, required: The activity target object identifier
    - `related_to_kind` string, required: The activity target object class name
    - `related_to_url` string, required: The activity target model
  - `next_page` string: The next page URL if exists
  - `page` integer, required: The current page
  - `page_size` integer, required: The page size used for pagination
  - `previous_page` string: The previous page URL if exists
  - `total` integer, required: The total paginated items

## Changes

- **2025-06-12** `7e14e0c246b4`: 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2025-02-18** `8a6c4a5665e6`: 1 info
  - added the new optional `query` request parameter `related_to`

[Operation history](https://skmtc.dev/dados/apis/udata-api/changes/activity/get.md)

---

[API](https://skmtc.dev/dados/apis/udata-api.md) - [All operations](https://skmtc.dev/dados/apis/udata-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dados/apis/udata-api/revisions/77edaf8a00ea?raw)
