<< Back to GForge REST API

Entity: Activitylog



Fetch an activity log entry, or a list of entries.

Parameters (7)

Name Type Description
sort_field array List of fields to sort by (In search requests). (Options include id, date, section, refId, description, activityType, url, userId, projectId) Not required
sort_dir string Direction to sort (In search requests). (Either asc or desc) Not required
page_num int Page number of request (In search requests). Not required
page_size int Number of entries to show per request (In search requests). Not required
userId int Filter searched entries by userId (In search requests). Not required
projectId int Filter searched entries by projectId (In search requests). Not required
activityLogId int Id of activity log (In single entry requests). This field is not set in the GET query parameters, but is set in the resource location itself (GET /api/activitylog/[activity log id]) Required only in single entry requests

Return: \gforge\core\models\api\ActivityLogBasic

Zero or more ActivityLog entries.

Name Type Description
id int Unique database field for the activity log
date \datetimetz Date and time of the log
section string Type of the associated object
refId int Id of object associated with this activity log
description string Description of the action that was logged
activityType string Type of activity
url string Url associated with the log
userApiUrl string Api url of user
projectApiUrl String Api url of project
userId int Unique identifier for the user
project \models\Project
projectId int
extendedData object Additional information about the target of this activity record (e.g., tracker item, document, wiki page, user, etc.). Fields and format depend on the target object.



Create a new Activity Log entry.

Parameters (6)

Name Type Description
date string Entry date of the event. Not required
section string Section of the entry. Required
ref_id int Reference identifier of the entry. Required
description string Description of the entry. Not required
url string URL location of the event entry. Not required
project mixed Project identifier of entry. This identifier can be the synthetic numeric identifier or the unix name of the project. Required

Return: string

The URL of the new activity log entry.

Example 1

Submit a new activity log entry.
curl -d section=tracker -d refId=1 -d description="This is a description" -d project=example_project --user username:password http://gforge.api/activitylog
    id: <id of created activity log>
    date: <current date in string format>
    section: "tracker"
    refId: 1
    descrption: "This is a description"
    activityType: "create"
    url: "create"
    userApiUrl: "/api/user/<user id>"
    projectApiUrl: "/api/project/<project id>"
    userId: <user id>
    projectId: <project id>