Fetch Recent Activities
GET
/activitiesFetches the recent activities for a Project/Test Plan/User
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, ReportsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new ReportsApi(config);
const result = await api.getActivities({ "company": "example"});console.log(result);curl --request GET \ "https://api.testcollab.io/activities?token=$TESTCOLLAB_TOKEN&company=123"Parameters
Section titled “Parameters”| Name | Location | Type | Required | Description |
|---|---|---|---|---|
company |
query | string | Yes | Company ID |
user |
query | integer | No | User ID |
project |
query | integer | No | Project ID |
entity |
query | string | No | Possible Values - testcase / testplan / suite |
entity_id |
query | integer | No | Entity ID - testplan / testcase / suite |
_limit |
query | integer | No | Limit the size of the returned results |
_start |
query | integer | No | Skip a specific number of entries (for pagination) |
_sort |
query | string | No | Sort according to a specific field. |
_filter |
query | string | No | Stringified filter object (the filtering guide) |
Response
Section titled “Response”200 — Activities log
| Field | Type | Required | Description |
|---|---|---|---|
[].entity |
string | Yes | Type of entity |
[].entity_id |
number | Yes | Entity ID |
[].entity_title |
string | Yes | Entity show/display field |
[].test_case_title |
string | No | Test case title |
[].test_plan_title |
string | No | Test plan title |
[].project |
Project Mini | No | — |
[].project.id |
number | Yes | — |
[].project.name |
string | Yes | — |
[].project.archived |
boolean | Yes | — |
[].project.activity |
string | No | — |
[].project.totalTimeSpentLabel |
string | No | — |
[].project.created_at |
string | Yes | — |
[].project.updated_at |
string | Yes | — |
[].activity_type |
string | Yes | Activity Type Values: add, edit, delete, publish, run, status_change, testcase_status_change, archive, reopen, finished_run, assignee_change, comment, release_verdict_change, link. |
[].user |
User | Yes | — |
[].user.id |
number | Yes | — |
[].user.name |
string | Yes | — |
[].user.about_me |
string | No | — |
[].user.email |
string | Yes | If email is modified then a confirmation should be sent |
[].user.avatar |
Upload | No | — |
[].user.avatar.id |
number | Yes | — |
[].user.avatar.name |
string | Yes | — |
[].user.avatar.hash |
string | Yes | — |
[].user.avatar.ext |
string | Yes | — |
[].user.avatar.mime |
string | Yes | — |
[].user.avatar.size |
string | Yes | — |
[].user.avatar.url |
string | Yes | — |
[].user.avatar.created_by |
number | No | — |
[].user.avatar.created_at |
string | Yes | — |
[].user.avatar.updated_at |
string | Yes | — |
[].user.username |
string | No | — |
[].user.last_active |
string | No | — |
[].user.confirmed |
boolean | No | — |
[].user.rank |
string | No | Values: User, Administrator. |
[].user.projects |
Project User Minified Collection | No | — |
[].user.projects[].id |
number | Yes | — |
[].user.projects[].user |
number | Yes | — |
[].user.projects[].project |
number | Yes | — |
[].user.projects[].role |
number | Yes | — |
[].user.projects[].created_at |
string | Yes | — |
[].user.projects[].updated_at |
string | Yes | — |
[].user.created_at |
string | No | — |
[].user.is_guest |
number | No | — |
[].audit_info |
Activity Audit Info | No | — |
[].audit_info.release_name |
string | No | Name of the release |
[].audit_info.old_verdict |
string | No | Previous verdict value |
[].audit_info.new_verdict |
string | No | New verdict value |
[].audit_info.changes |
Array of Activity Field Change | No | List of field-level changes made in this activity |
[].audit_info.target_type |
string | No | Type of the linked item (for risk link/unlink activities) Values: test_case, requirement, defect. |
[].audit_info.target_id |
integer | No | Id of the linked item (for risk link/unlink activities) |
[].audit_info.target_title |
string | No | Title of the linked item (for risk link/unlink activities) |
[].audit_info.test_plan_id |
integer | No | Id of the test plan (for defect unlink activities) |
[].created_at |
string | No | Time when the activity was performed |
[].updated_at |
string | No | Time when the activity was performed |
[]Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |