<< Back to GForge REST API

Entity: Project

GET

getActivity

Get the activity metrics for this project.

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
start string Optional. Start date/time for the activity window. Default: "-15 days".
end string Optional. End date/time for the activity window. Default: "tomorrow".

Return: \gforge\core\models\api\StatsBasic[]

Zero or more records, containing the time-series data between the specified start and end dates.

Name Type Description
statDate \datetimetz Time stamp for the measure
title string Human-readable name of the measure
measure float The actual numeric measurement
section string Type of the associated object, if any
refId int Id of associated object, if any
url string Url associated with the stat, if any

getActivitylog

Get recent activity log data for the specified Project

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
start string Optional. Start date/time for activity records to return. Default: no lower bound.
end string Optional. End date/time for activity records to return. Default: no upper bound.

Return: \StdClass

An object with an activity_log array of ActivityLogBasic structures.

Example 1

Basic request
  GET http://api.mygforge.tld/project/gforge5/activitylog
  or
  GET http://api.mygforge.tld/project/138/activitylog

    {
     "activity_log":[
        {
           "id":388241,
           "date":"2014-11-18 10:37:52 -0600",
           "section":"project",
           "refId":138,
           "description":"joined chat",
           "activityType":"join",
           "url":null,
           "userApiUrl":"\/api\/user\/25868",
           "projectApiUrl":"\/api\/project\/138",
           "userId":25868,
           "projectId":138,
           "user":{
              "id":25868,
              "unixName":"tbibbs",
              "password":null,
              "firstname":"Tony",
              "lastname":"Bibbs",
              "email":"tbibbs@gforgegroup.com",
              "timezone":"US\/Central",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/custom_avatars\/25868.jpg",
              "html_url":"\/gf\/user\/tbibbs\/",
              "details_url":"\/api\/user\/tbibbs\/details",
              "isSiteAdmin":true,
              "api_url":"\/api\/user\/tbibbs"
           },
           "subItems":[
              {
                 "id":388236,
                 "date":"2014-11-18 10:11:15 -0600",
                 "section":"project",
                 "refId":138,
                 "description":"joined chat",
                 "activityType":"join",
                 "url":null,
                 "userApiUrl":"\/api\/user\/33887",
                 "projectApiUrl":"\/api\/project\/138",
                 "userId":33887,
                 "projectId":138,
                 "user":{
                    "id":33887,
                    "unixName":"cvizcaya",
                    "password":null,
                    "firstname":"Celina",
                    "lastname":"Vizcaya",
                    "email":"cvizcaya@gforgegroup.com",
                    "timezone":"America\/Buenos_Aires",
                    "status":1,
                    "externalId":null,
                    "isGroup":"N",
                    "ccode":"AR",
                    "language":"en",
                    "theme":1,
                    "img_url":"\/images\/custom_avatars\/33887.jpg",
                    "html_url":"\/gf\/user\/cvizcaya\/",
                    "details_url":"\/api\/user\/cvizcaya\/details",
                    "isSiteAdmin":false,
                    "api_url":"\/api\/user\/cvizcaya"
                 }
              },
              ...               {
                 "id":388186,
                 "date":"2014-11-18 05:59:42 -0600",
                 "section":"project",
                 "refId":138,
                 "description":"joined chat",
                 "activityType":"join",
                 "url":null,
                 "userApiUrl":"\/api\/user\/14030",
                 "projectApiUrl":"\/api\/project\/138",
                 "userId":14030,
                 "projectId":138,
                 "user":{
                    "id":14030,
                    "unixName":"adriandelatabla",
                    "password":null,
                    "firstname":"Javier Adri\u00e1n",
                    "lastname":"Ortiz de la Tabla",
                    "email":"atabla@gforgegroup.com",
                    "timezone":"America\/Buenos_Aires",
                    "status":1,
                    "externalId":null,
                    "isGroup":"N",
                    "ccode":"AR",
                    "language":"en",
                    "theme":1,
                    "img_url":"\/images\/custom_avatars\/14030.jpg",
                    "html_url":"\/gf\/user\/adriandelatabla\/",
                    "details_url":"\/api\/user\/adriandelatabla\/details",
                    "isSiteAdmin":true,
                    "api_url":"\/api\/user\/adriandelatabla"
                 }
              }
           ]
        }
     ]
  }

getBuilds

Gets the most recent build from each job associated with the project.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).

Return: \gforge\plugins\build\models\api\BuildBasic[]

Array of the most recent builds associated with the project.

Name Type Description
id int Unique database identifier for the build
description string description of this build
changelog string Changes made from the previous build
url string url to this build
job mixed the associated Job
wasSuccessful bool Whether this build was successful or not
buildDate \DateTime The date of the last message posting in this forum, across all threads (read-only)
buildNumber int Identifier for the build instance, provided by the build engine.

getChat

Get a reference to the project chat thread.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).

Return: \gforge\plugins\forum\models\api\ForumBasic

The forum and thread for this project's chat room.

Name Type Description
id int Unique database identifier for the forum
section string section the forum belongs to
refId int ID of the referenced object
forumName string Name of the forum
description string Description of the forum
isPublic bool Determines if the forum is for public access or private
sendAllPostsTo string The comma separated list of emails to send posts to
threadCount int The number of child threads in this forum (read-only)
messageCount int The total number of messages in this forum, across all threads (read-only)
mostRecentDate \DateTime The date of the last message posting in this forum, across all threads (read-only)
moderationLevel int The level of moderation for this forum, across all threads. (read-only) 0 = no postings are held for moderation, 1 = postings from non-project members are moderated, 3 = postings from non-forum-admins are moderated.
forumThreads \gforge\plugins\forum\models\api\ForumThreadBasic Zero or more threads that belong to this forum (optional data)

getCustomsplash

Gets the useCustomSplash setting for a given project or false if none

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID.

Return: \gforge\core\models\api\SettingBasic|false

The useCustomSplash setting object, or false if not set.

getDetails

Get the detailed data for a specific project. Callers may specify the unixName or the database id in the id parameter.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID.
rel string Optional. Comma-separated list of related entities to embed (e.g. "admins,members,activity_stats,activity_log,trackers,childCount").

Related Entities (6)

Return: \gforge\core\models\api\ProjectDetail

A ProjectDetail structure if the project exists. Otherwise, a NotFoundException.

Name Type Description
registerPurpose string Returns the purpose for this project
projectText1 string Returns special field 1
projectText2 string Returns special field 2
projectText3 string Returns special field 3
projectText4 string Returns special field 4
projectText5 string Returns special field 5
projectText6 string Returns special field 6
isWorkflowScriptEnabled bool Returns 'Y' if enabled, 'N' otherwise
id int Unique database identifier for the project
name string Name of the project
unixName string Short, unix-friendly identifier for the project. This is usually also the project's shell logon.
description string Public description for the project
homepageUrl string GFAS url for the project
createDate \DateTime Date of project creation
isPublic string Returns "Y" if the project is public, "N" otherwise
status string Returns the status code for the project
isTemplate string Returns "Y" if the project is a template
templateProjectId int Returns the project used as template for this project
parentProjectId string Returns the parent project id for this project --- used as output, not allowed for input
averageRating int Returns the average rate for the project

Example 1

Get the project details. The unix name or ID can be used.
  GET http://api.mygforge.tld/project/gforge5/details
  or
  GET http://api.mygforge.tld/project/138/details
{
 "registerPurpose":"This is a testing ground for technologies and demo code for the complete from-scratch rewrite
 of GForge using PHP5 technology.",
 "projectText1":null,
 "projectText2":null,
 "projectText3":null,
 "projectText4":null,
 "projectText5":null,
 "projectText6":null,
 "isWorkflowScriptEnabled":null,
 "plugins":[
    "tracker",
    "docman",
    "frs",
    "mailman",
    "build",
    "wiki",
    "scmgit",
    "forum",
    "news"
 ],
 "id":138,
 "name":"GForge AS",
 "unixName":"gforge5",
 "description":"We Believe in Great Software.  For over two decades GForge has helped software organizations
deliver their ideas to market faster using their own process.  The project is the core GForge project and it has
two active efforts.  The first is maintenance on the existing GForge product and the second is delivering the
next generation of GForge.  ",
 "homepageUrl":"\/gf\/project\/gforge5\/",
 "createDate":"2005-10-10 01:37:46 -0500",
 "isPublic":"Y",
 "status":1,
 "isTemplate":"N",
 "templateProjectId":0,
 "rel":[
 ]
}

Example 2

Get the project details, with all associated related data.
  GET http://api.mygforge.tld/project/gforge5/details?rel=admins,members,activity_stats,activity_log,trackers
  or
  GET http://api.mygforge.tld/project/138/details?rel=admins,members,activity_stats,activity_log,trackers
{
    "registerPurpose":"This is a testing ground for technologies and demo code for the complete from-scratch
rewrite of GForge using PHP5 technology.",
     "projectText1":null,
     "projectText2":null,
     "projectText3":null,
     "projectText4":null,
     "projectText5":null,
     "projectText6":null,
     "isWorkflowScriptEnabled":null,
     "plugins":[
        "tracker",
        "docman",
        "frs",
        "mailman",
        "build",
        "wiki",
        "scmgit",
        "forum",
        "news"
     ],
     "id":138,
     "name":"GForge AS",
     "unixName":"gforge5",
     "description":"We Believe in Great Software.  For over two decades GForge has helped software organizations
deliver their ideas to market faster using their own process.  The project is the core GForge project and it has
two active efforts.  The first is maintenance on the existing GForge product and the second is delivering the
next generation of GForge.  ",
     "homepageUrl":"\/gf\/project\/gforge5\/",
     "createDate":"2005-10-10 01:37:46 -0500",
     "isPublic":"Y",
     "status":1,
     "isTemplate":"N",
     "templateProjectId":0,
     "rel":{
        "admins":[
           {
              "id":5945,
              "unixName":"mtutty",
              "password":null,
              "firstname":"Michael",
              "lastname":"Tutty",
              "email":"MTUTTY@gforgegroup.com",
              "timezone":"America\/Chicago",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/custom_avatars\/5945.jpg",
              "html_url":"\/gf\/user\/mtutty\/",
              "details_url":"\/api\/user\/mtutty\/details",
              "isSiteAdmin":true,
              "api_url":"\/api\/user\/mtutty"
           },
           {
              "id":25868,
              "unixName":"tbibbs",
              "password":null,
              "firstname":"Tony",
              "lastname":"Bibbs",
              "email":"tbibbs@gforgegroup.com",
              "timezone":"US\/Central",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/custom_avatars\/25868.jpg",
              "html_url":"\/gf\/user\/tbibbs\/",
              "details_url":"\/api\/user\/tbibbs\/details",
              "isSiteAdmin":true,
              "api_url":"\/api\/user\/tbibbs"
           }
        ],
        "members":[
           {
              "id":5945,
              "unixName":"mtutty",
              "password":null,
              "firstname":"Michael",
              "lastname":"Tutty",
              "email":"MTUTTY@gforgegroup.com",
              "timezone":"America\/Chicago",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/custom_avatars\/5945.jpg",
              "html_url":"\/gf\/user\/mtutty\/",
              "details_url":"\/api\/user\/mtutty\/details",
              "isSiteAdmin":true,
              "api_url":"\/api\/user\/mtutty",
              "roles":[
                 {
                    "id":9173,
                    "name":"GForge Customer"
                 }
              ]
           },
           {
              "id":25868,
              "unixName":"tbibbs",
              "password":null,
              "firstname":"Tony",
              "lastname":"Bibbs",
              "email":"tbibbs@gforgegroup.com",
              "timezone":"US\/Central",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/custom_avatars\/25868.jpg",
              "html_url":"\/gf\/user\/tbibbs\/",
              "details_url":"\/api\/user\/tbibbs\/details",
              "isSiteAdmin":true,
              "api_url":"\/api\/user\/tbibbs",
              "roles":[
                 {
                    "id":9173,
                    "name":"GForge Customer"
                 }
              ]
           },
           {
              "id":33229,
              "unixName":"kbibbs",
              "password":null,
              "firstname":"Kate",
              "lastname":"Bibbs",
              "email":"kate@gforgegroup.com",
              "timezone":"US\/Central",
              "status":1,
              "externalId":null,
              "isGroup":"N",
              "ccode":"US",
              "language":"en",
              "theme":1,
              "img_url":"\/images\/stock_avatars\/default.png",
              "html_url":"\/gf\/user\/kbibbs\/",
              "details_url":"\/api\/user\/kbibbs\/details",
              "isSiteAdmin":false,
              "api_url":"\/api\/user\/kbibbs",
              "roles":[
                 {
                    "id":9173,
                    "name":"GForge Customer"
                 }
              ]
           }
        ],
        "chat":{
           "id":8595,
           "section":"project",
           "refId":138,
           "forumName":"GForge AS",
           "isPublic":false,
           "threadCount":1,
           "messageCount":89745,
           "mostRecentDate":"2014-12-02 20:08:08 -0600",
           "moderationLevel":0,
           "forumThreads":[
              {
                 "id":5367,
                 "threadName":"Discussion",
                 "messageCount":89745,
                 "mostRecentDate":"2014-12-02 17:16:32 -0600",
                 "isLocked":"N"
              }
           ]
        },
         "activity_stats":[
           {
              "statDate":"2014-11-04",
              "title":"Activity",
              "measure":0,
              "section":"project",
              "refId":"gforge5",
              "url":""
           },
           {
              "statDate":"2014-11-05",
              "title":"Activity",
              "measure":0,
              "section":"project",
              "refId":"gforge5",
              "url":""
           },
           ...         {
              "statDate":"2014-11-18",
              "title":"Activity",
              "measure":0,
              "section":"project",
              "refId":"gforge5",
              "url":""
           },
           {
              "statDate":"2014-11-19",
              "title":"Activity",
              "measure":0,
              "section":"project",
              "refId":"gforge5",
              "url":""
           }
        ],
        "activity_log":[
           {
              "id":388241,
              "date":"2014-11-18 10:37:52 -0600",
              "section":"project",
              "refId":138,
              "description":"joined chat",
              "activityType":"join",
              "url":null,
              "userApiUrl":"\/api\/user\/25868",
              "projectApiUrl":"\/api\/project\/138",
              "userId":25868,
              "projectId":138,
              "user":{
                 "id":25868,
                 "unixName":"tbibbs",
                 "password":null,
                 "firstname":"Tony",
                 "lastname":"Bibbs",
                 "email":"tbibbs@gforgegroup.com",
                 "timezone":"US\/Central",
                 "status":1,
                 "externalId":null,
                 "isGroup":"N",
                 "ccode":"US",
                 "language":"en",
                 "theme":1,
                 "img_url":"\/images\/custom_avatars\/25868.jpg",
                 "html_url":"\/gf\/user\/tbibbs\/",
                 "details_url":"\/api\/user\/tbibbs\/details",
                 "isSiteAdmin":true,
                 "api_url":"\/api\/user\/tbibbs"
              },
              "subItems":[
                 {
                    "id":388236,
                    "date":"2014-11-18 10:11:15 -0600",
                    "section":"project",
                    "refId":138,
                    "description":"joined chat",
                    "activityType":"join",
                    "url":null,
                    "userApiUrl":"\/api\/user\/33887",
                    "projectApiUrl":"\/api\/project\/138",
                    "userId":33887,
                    "projectId":138,
                    "user":{
                       "id":33887,
                       "unixName":"cvizcaya",
                       "password":null,
                       "firstname":"Celina",
                       "lastname":"Vizcaya",
                       "email":"cvizcaya@gforgegroup.com",
                       "timezone":"America\/Buenos_Aires",
                       "status":1,
                       "externalId":null,
                       "isGroup":"N",
                       "ccode":"AR",
                       "language":"en",
                       "theme":1,
                       "img_url":"\/images\/custom_avatars\/33887.jpg",
                       "html_url":"\/gf\/user\/cvizcaya\/",
                       "details_url":"\/api\/user\/cvizcaya\/details",
                       "isSiteAdmin":false,
                       "api_url":"\/api\/user\/cvizcaya"
                    }
                 },
                 ...               {
                    "id":388186,
                    "date":"2014-11-18 05:59:42 -0600",
                    "section":"project",
                    "refId":138,
                    "description":"joined chat",
                    "activityType":"join",
                    "url":null,
                    "userApiUrl":"\/api\/user\/14030",
                    "projectApiUrl":"\/api\/project\/138",
                    "userId":14030,
                    "projectId":138,
                    "user":{
                       "id":14030,
                       "unixName":"adriandelatabla",
                       "password":null,
                       "firstname":"Javier Adri\u00e1n",
                       "lastname":"Ortiz de la Tabla",
                       "email":"atabla@gforgegroup.com",
                       "timezone":"America\/Buenos_Aires",
                       "status":1,
                       "externalId":null,
                       "isGroup":"N",
                       "ccode":"AR",
                       "language":"en",
                       "theme":1,
                       "img_url":"\/images\/custom_avatars\/14030.jpg",
                       "html_url":"\/gf\/user\/adriandelatabla\/",
                       "details_url":"\/api\/user\/adriandelatabla\/details",
                       "isSiteAdmin":true,
                       "api_url":"\/api\/user\/adriandelatabla"
                    }
                 }
              ]
           }
        ],
        "trackers":[
           {
              "tracker_id":10109,
              "tracker_name":"Licenses",
              "is_public":false,
              "restrict_browse":false,
              "total_count":244,
              "open_count":172,
              "closed_count":72,
              "assigned_to_me":0,
              "access_level":10
           },
           {
              "tracker_id":355,
              "tracker_name":"GForge",
              "is_public":false,
              "restrict_browse":false,
              "total_count":5249,
              "open_count":656,
              "closed_count":4593,
              "assigned_to_me":3,
              "access_level":0
           },
           {
              "tracker_id":10237,
              "tracker_name":"GForge Support",
              "is_public":false,
              "restrict_browse":false,
              "total_count":3435,
              "open_count":39,
              "closed_count":3396,
              "assigned_to_me":1,
              "access_level":10
           },
           {
              "tracker_id":10345,
              "tracker_name":"Free Support",
              "is_public":true,
              "restrict_browse":false,
              "total_count":6,
              "open_count":6,
              "closed_count":0,
              "assigned_to_me":1,
              "access_level":10
           },
           {
              "tracker_id":10311,
              "tracker_name":"Managed Servers",
              "is_public":false,
              "restrict_browse":false,
              "total_count":13,
              "open_count":12,
              "closed_count":1,
              "assigned_to_me":0,
              "access_level":10
           },
           {
              "tracker_id":10292,
              "tracker_name":"User Stories",
              "is_public":false,
              "restrict_browse":false,
              "total_count":69,
              "open_count":28,
              "closed_count":41,
              "assigned_to_me":0,
              "access_level":10
           },
           {
              "tracker_id":9662,
              "tracker_name":"Build Failures",
              "is_public":false,
              "restrict_browse":false,
              "total_count":0,
              "open_count":0,
              "closed_count":0,
              "assigned_to_me":0,
              "access_level":10
           },
           {
              "tracker_id":10661,
              "tracker_name":"Business Development",
              "is_public":false,
              "restrict_browse":false,
              "total_count":3589,
              "open_count":3523,
              "closed_count":66,
              "assigned_to_me":0,
              "access_level":99
           }
        ],
        "disk":[
           {
              "checkDate":{
                 "date":"2018-04-08 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":3394
           },
           {
              "checkDate":{
                 "date":"2018-04-07 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":3394
           },
           {
              "checkDate":{
                 "date":"2009-05-17 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           },
           {
              "checkDate":{
                 "date":"2009-01-12 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           },
           {
              "checkDate":{
                 "date":"2008-12-19 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           },
           {
              "checkDate":{
                 "date":"2008-10-24 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           },
           {
              "checkDate":{
                 "date":"2008-09-24 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           },
           {
              "checkDate":{
                 "date":"2008-09-23 00:00:00.000000",
                 "timezone_type":3,
                 "timezone":"UTC"
              },
              "bytes":68593
           }
        ]
     }
  }

getForums

Get the forums that belong to the project.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID.

Return: \gforge\plugins\forum\models\api\ForumBasic[]

Zero or more forums that are part of this project.

Name Type Description
id int Unique database identifier for the forum
section string section the forum belongs to
refId int ID of the referenced object
forumName string Name of the forum
description string Description of the forum
isPublic bool Determines if the forum is for public access or private
sendAllPostsTo string The comma separated list of emails to send posts to
threadCount int The number of child threads in this forum (read-only)
messageCount int The total number of messages in this forum, across all threads (read-only)
mostRecentDate \DateTime The date of the last message posting in this forum, across all threads (read-only)
moderationLevel int The level of moderation for this forum, across all threads. (read-only) 0 = no postings are held for moderation, 1 = postings from non-project members are moderated, 3 = postings from non-forum-admins are moderated.
forumThreads \gforge\plugins\forum\models\api\ForumThreadBasic Zero or more threads that belong to this forum (optional data)

getGroup

Get a single group associated with the project.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The group unix name or database ID (in the URL path; mapped to the userId route slot).

Return: \gforge\core\models\api\GroupApi

Name Type Description
id int
unixName string
status int
name string
userText1 string Flex field for customer use
userText2 string Flex field for customer use
userText3 string Flex field for customer use
userText4 string Flex field for customer use
userText5 string Flex field for customer use
userText6 string Flex field for customer use
users \UserBasic[]
projects \ProjectBasic[]

getGroups

Get the groups associated with the project.

Parameters (7)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
sort_field string Optional. Field to sort by. Default: id.
sort_dir string Optional. Sort direction: "asc" or "desc". Default: asc.
page_num int Optional. Zero-based page number. Default: 0.
page_size int Optional. Number of results per page. Default: 20.
name string Optional. Filter by group display name.
groupUnixName string Optional. Filter by group unix name.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\GroupApi[]

Name Type Description
id int
unixName string
status int
name string
userText1 string Flex field for customer use
userText2 string Flex field for customer use
userText3 string Flex field for customer use
userText4 string Flex field for customer use
userText5 string Flex field for customer use
userText6 string Flex field for customer use
users \UserBasic[]
projects \ProjectBasic[]

getInvite

Searches for users matching criteria who have been invited to the project, or retrieves all of them.

Parameters (8)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
page_size int Optional. Number of results per page. Default: 20.
page_num int Optional. Zero-based page number. Default: 0.
search string Optional. If set, performs a fuzzy match against firstname, unixName, lastname, and email.
firstname string Optional. Filter by first name (exact match). Ignored if $search is provided.
unixName string Optional. Filter by unix name (exact match). Ignored if $search is provided.
lastname string Optional. Filter by last name (exact match). Ignored if $search is provided.
email string Optional. Filter by email address (exact match). Ignored if $search is provided.

Return: array

Zero or more items with limited data (userEmail, roleId), paged by the $start and $max parameters, sorted by unix name

Example 1

Get the users who requested to join the project.
  GET http://api.mygforge.tld/project/gforge5/invites?page_size=2&page_num=1
  or
  GET http://api.mygforge.tld/project/138/invites?page_size=2&page_num=1

{
"paging": {
        "page_size": 2,
        "page_num": 1,
        "sort_field": "id",
        "sort_dir": "asc"
},
"items": [{
       "userEmail": "cvizcaya2@rbmwebsolutions.com",
       "roleId": "9661"
   },
   {
       "userEmail": "cvizcaya@rbmwebsolutions.com",
       "roleId": "167"
   }],
   "links": []
}

Example 2

Get the users invited with firstname 'Celina'.
  GET http://api.mygforge.tld/project/gforge5/invites?firstname=Celina

{
"paging": {
        "page_size": 20,
        "page_num": 1,
        "sort_field": "id",
        "sort_dir": "asc"
},
"items": [{
       "userEmail": "cvizcaya2@rbmwebsolutions.com",
       "roleId": "9661"
   }],
   "links": []
}

Example 3

Get the users invited that matched with 'Celina'.
  GET http://api.mygforge.tld/project/gforge5/invites?search=Celina

{
"paging": {
        "page_size": 20,
        "page_num": 1,
        "sort_field": "id",
        "sort_dir": "asc"
},
"items": [{
       "userEmail": "cvizcaya2@rbmwebsolutions.com",
       "roleId": "9661"
   },
{
       "userEmail": "celina.vizcaya@gmail.com",
       "roleId": "9752"
   }],
   "links": []
}

getJoinRequests

Get the users who requested to join the project.

Parameters (8)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
page_size int Optional. Number of results per page. Default: 20.
page_num int Optional. Zero-based page number. Default: 0.
search string Optional. If set, performs a fuzzy match across firstname, unixName, lastname, and email.
firstname string Optional. Filter by first name (exact match). Ignored if $search is provided.
unixName string Optional. Filter by unix name (exact match). Ignored if $search is provided.
lastname string Optional. Filter by last name (exact match). Ignored if $search is provided.
email string Optional. Filter by email address (exact match). Ignored if $search is provided.

Return: \gforge\core\models\api\ProjectJoinRequest[]

Zero or more join-request records, paged by the $start and $max parameters, sorted by unix name

Example 1

Get the users who requested to join the project.
  GET http://api.mygforge.tld/project/gforge5/joinRequests?page_size=2&page_num=1
  or
  GET http://api.mygforge.tld/project/138/joinRequests?page_size=2&page_num=1

{
"paging": {
        "page_size": 2,
        "page_num": 1,
        "sort_field": "id",
        "sort_dir": "asc"
},
"items": [{
        "id": 33296,
        "unixName": "clsfrance",
        "password": null,
        "firstname": "CLS - Pirotta Group",
        "lastname": "   ",
        "email": "aef94baf84110a548528e6a00570c656@gforge.com",
        "timezone": "US\/Central",
        "status": 1,
        "externalId": null,
        "isGroup": "Y",
        "ccode": "US",
        "language": "en   ",
        "theme": 1,
        "img_url": "\/images\/stock_avatars\/default.png",
        "html_url": "\/gf\/user\/clsfrance\/",
        "details_url": "\/api\/user\/clsfrance\/details",
        "isSiteAdmin": false,
        "api_url":"\/api\/user\/clsfrance"
},
{
        "id": 34056,
                "unixName": "lolta45",
        "password": null,
                "firstname": "lolta",
        "lastname": "lolta",
                "email": "mcvmendoza@hotmail.com",
        "timezone": "UTC",
        "status": 1,
        "externalId": null,
        "isGroup": "N",
        "ccode": "US",
        "language": "en   ",
        "theme": 1,
        "img_url": "\/images\/stock_avatars\/default.png",
        "html_url": "\/gf\/user\/lolta\/",
        "details_url": "\/api\/user\/lolta\/details",
        "isSiteAdmin": false,
        "api_url": "\/api\/user\/lolita"
}],
"links": []
}

Example 2

Get the users who requested to join the project and matched with Michael.
  GET http://api.mygforge.tld/project/gforge5/joinRequests?search=Michael

{
   "paging": {
       "page_size": 20,
       "page_num": 1,
       "sort_field": "id",
       "sort_dir": "asc"
   },
   "items": [{
       "id": 5945,
       "unixName": "mtutty",
       "password": null,
       "firstname": "Michael",
       "lastname": "Tutty",
       "email": "MTUTTY@gforgegroup.com",
       "timezone": "America\/Chicago",
       "status": 1,
       "externalId": null,
       "isGroup": "N",
       "ccode": "US",
       "language": "en   ",
       "theme": 1,
       "img_url": "\/api\/user\/mtutty\/avatar",
       "html_url": "\/#\/user\/mtutty\/",
       "details_url": "\/api\/user\/mtutty\/details",
       "isSiteAdmin": true,
       "api_url": "\/api\/user\/mtutty"
   }],
   "links": []
}

getMembers

Get the members that belong to the project.

Parameters (5)

Name Type Description
project string|int (in URL) The project within which to find members. This can be a database ID or unixName
group bool If true, include users who are are members via a group membership. Default is false (only direct members)
groups bool If true, include groups in the result. By default, only users are included.
role int Database ID for a role on which to filter. If specified, only users in this role are included.
type string The type of member search: 'standup' shows members with Assignee or higher privilege in any Tracker on the project. 'history' shows any user that has previous activity on the project. Default is to show users strictly based on current role assignments.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Related Entities (2)

Return: \gforge\core\models\api\UserBasic[]

The list of members for the specified project/group

Name Type Description
id int Unique database identifier for the user
unixName string Short, unix-friendly identifier for the user. This is usually also the user's shell logon.
password string Shared secret for authenticating the user. This value is only set for requests, not for responses.
firstname string First name for the user
lastname string Last name for the user
email string Email address for the user
timezone string Name of the user's time zone (from PHP std list)
status int Account status, 0 = Pending, 1 = Active, 2 = Deleted
externalId string Custom external identifier for use in sync to other systems
isGroup string Y if the specified record is a group, N if it is a single user
ccode string
language string
theme mixed
img_url string Relative path to the user's icon, if any
html_url string Relative path to the user's details page (display)
details_url string Relative path to the user's detail data (API)
isSiteAdmin bool
authMethod string|null
api_url string Relative path to the user's basic data (API)

Example 1

Get the members for the project.
  GET http://api.mygforge.tld/project/gforge5/members?page_size=2&page_num=1
  or
  GET http://api.mygforge.tld/project/138/members?page_size=2&page_num=1

{
   "paging": {
       "page_size": 2,
       "page_num": 1,
       "sort_field": "id",
       "sort_dir": "asc"
   },
   "items": [{
       "id": 33229,
       "unixName": "kbibbs",
       "password": null,
       "firstname": "Kate",
       "lastname": "Bibbs",
       "email": "kate@gforgegroup.com",
       "timezone": "US\/Central",
       "status": 1,
       "externalId": null,
       "isGroup": "N",
       "ccode": "US",
       "language": "en   ",
       "theme": 1,
       "img_url": "\/images\/stock_avatars\/default.png",
       "html_url": "\/gf\/user\/kbibbs\/",
       "details_url": "\/api\/user\/kbibbs\/details",
       "isSiteAdmin": false,
       "api_url": "\/api\/user\/kbibbs"
   },
   {
       "id": 5945,
       "unixName": "mtutty",
       "password": null,
       "firstname": "Michael",
       "lastname": "Tutty",
       "email": "MTUTTY@gforgegroup.com",
       "timezone": "America\/Chicago",
       "status": 1,
       "externalId": null,
       "isGroup": "N",
       "ccode": "US",
       "language": "en   ",
       "theme": 1,
       "img_url": "\/images\/custom_avatars\/5945.jpg",
       "html_url": "\/gf\/user\/mtutty\/",
       "details_url": "\/api\/user\/mtutty\/details",
       "isSiteAdmin": true,
       "api_url": "\/api\/user\/mtutty"
   }],
   "links": []
}

Example 2

Get the members for the project with firstname Michael. Include role and group memberships in the results
  GET http://api.mygforge.tld/project/gforge5/members?firstname=Michael&rel=groups,roles

{
   "paging": {
       "page_size": 20,
       "page_num": 1,
       "sort_field": "id",
       "sort_dir": "asc"
   },
   "items": [{
       "id": 5945,
       "unixName": "mtutty",
       "password": null,
       "firstname": "Michael",
       "lastname": "Tutty",
       "email": "MTUTTY@gforgegroup.com",
       "timezone": "America\/Chicago",
       "status": 1,
       "externalId": null,
       "isGroup": "N",
       "ccode": "US",
       "language": "en   ",
       "theme": 1,
       "img_url": "\/api\/user\/mtutty\/avatar",
       "html_url": "\/#\/user\/mtutty\/",
       "details_url": "\/api\/user\/mtutty\/details",
       "isSiteAdmin": true,
       "api_url": "\/api\/user\/mtutty",
       "rel" {
           "roles": [{
               "id": 9173,
               "name": "GForge Customer"
           }],
           "groups": [{
               "id": 9192,
               "unixName": "group1",
               "password": null,
               "firstname": "Group",
               "lastname": "One",
               "email": "",
               "timezone": "America\/Chicago",
               "status": 1,
               "isGroup": "Y"
           }]
       }
   }],
   "links": []
}

getMembershipAudit

Returns paginated membership audit trail for an org and its child projects.

Parameters (10)

Name Type Description
id string|int Required. The org project unix name or database ID (in the URL path).
user string Optional. Filter by user unix name or display name.
dateStart string Optional. Return only audit entries on or after this date.
dateEnd string Optional. Return only audit entries on or before this date.
action string Optional. Filter by audit action type (e.g. "added", "removed").
sort_field string Optional. Field to sort by. Default: change_date.
sort_dir string Optional. Sort direction: "asc" or "desc". Default: desc.
page_num int Optional. Zero-based page number. Default: 0.
page_size int Optional. Results per page, between 1 and 500. Default: 20.
download string Optional. If non-empty, returns a CSV file download instead of a paged JSON response.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\PagedResponse|true

Paged audit trail records, or true on CSV download.

getModules

Get the list of modules that are enabled for the specified project.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).

Return: string[]

A list of the shortnames that are active for the project.

getOrgMemberProjects

Returns project/role/membership details for a single user within an org.

Parameters (2)

Name Type Description
id string|int Required. The org project unix name or database ID (in the URL path).
userId int Required. The database ID of the user whose project memberships to retrieve (in the URL path).

Return: array

Array of project entries, each with project_id, project_name, project_unix_name, roles, membership_type, group_name, and last_access.

getOrgMembers

Returns paginated flat list of org members

Parameters (6)

Name Type Description
id string|int Required. The org project unix name or database ID (in the URL path).
download string Optional. If non-empty, returns a CSV file download instead of a paged JSON response.
sort_field string Optional. Field to sort by. Default: as determined by extractOrgMembersParams.
sort_dir string Optional. Sort direction: "asc" or "desc". Default: as determined by extractOrgMembersParams.
page_num int Optional. Zero-based page number. Default: 0.
page_size int Optional. Number of results per page. Default: 20.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\PagedResponse|true

Paged response of org member records, or true on CSV download.

getOrgProjectsAndRoles

Returns distinct projects and roles within an org tree for populating filter dropdowns.

Parameters (1)

Name Type Description
id string|int Required. The org project unix name or database ID (in the URL path).

Return: array

Array of distinct project/role combinations in the org tree.

getParents

Gets a list of all parent projects, including the specified project.

Parameters (2)

Name Type Description
id string|int Required. The child project unix name or database ID (in the URL path).
rel string Optional. Comma-separated list of relations to include. Supported: "childCount".

Return: \gforge\core\models\api\ProjectBasic[]

Name Type Description
id int Unique database identifier for the project
name string Name of the project
unixName string Short, unix-friendly identifier for the project. This is usually also the project's shell logon.
description string Public description for the project
homepageUrl string GFAS url for the project
createDate \DateTime Date of project creation
isPublic string Returns "Y" if the project is public, "N" otherwise
status string Returns the status code for the project
isTemplate string Returns "Y" if the project is a template
templateProjectId int Returns the project used as template for this project
parentProjectId string Returns the parent project id for this project --- used as output, not allowed for input
averageRating int Returns the average rate for the project

getProject

Searches for projects matching criteria, or retrieves a specific project by unixname or database ID.

Parameters (16)

Name Type Description
id string|int Required. The project unix name or database ID to retrieve a specific project, or omit for a search.
rel string Optional. Comma-separated list of related entities to include (e.g. "modules", "childCount").
sort_field string Optional. Field to sort search results by. Allowed: id, unixName, projectName, status, description, activity30, isTemplate. Default: unixName.
sort_dir string Optional. Sort direction: "asc" or "desc". Default: asc.
page_num int Optional. Zero-based page number for paged results. Default: 0.
page_size int Optional. Number of records per page. Default: 20.
text string Optional. Full-text search filter across project name and description.
unixName string Optional. Filter by project unix name (partial match).
projectName string Optional. Filter by project display name (partial match).
status int Optional. Filter by project status code.
isTemplate string Optional. Filter by template flag ("Y" or "N").
isPublic string Optional. Filter by public flag ("Y" or "N").
parentProjectId int Optional. Filter by parent project ID.
orphaned bool Optional. If true, only return projects with no parent.
isOrg bool Optional. If true, only return organisation-level projects.
isAdmin bool Optional. If true, only return projects where the authenticated user is an admin.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Related Entities (1)

Return: \ProjectBasic[]

Zero or more ProjectBasic records for a search. Zero or one Project record for an id retrieval.

Example 1

Find a project by matching the unix name. The unix name or ID parameters can be included in the path, instead of using a query string parameter.
  GET http://mygforge.tld/api/project?unixName=gforge5
  or
  GET http://mygforge.tld/api/project?id=138
  or
  GET http://mygforge.tld/api/project/gforge5
  or
  GET http://mygforge.tld/api/project/138
{"id":138,"name":"GForge AS","unixName":"gforge5",
"description":"We Believe in Great Software.  For over two decades GForge has helped software organizations
 deliver their ideas to market faster using their own process.  The project is the core GForge project and it has
 two active efforts.  The first is maintenance on the existing GForge product and the second is delivering the
 next generation of GForge.  ",
"homepageUrl":"\/gf\/project\/gforge5\/","createDate":"2005-10-10 01:37:46 -0500",
"isPublic":"Y","status":1,"isTemplate":"N","templateProjectId":0}

getReport

Get a list of report results associated with the specified project.

Parameters (5)

Name Type Description
report_id int Unique identifier for a single rpeort result. If this parameter is non-empty and > 0, then other parameters are ignored.
type string Filter by the specified report type
since string Only include reports created *after* this date
before string Only include reports created *before* this date
range string If specified, this value replaces $since, and $before is cleared.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\ReportResultBasic[]

Zero or more matching report results

Name Type Description
id int Id
createDate string Date when the ReportResult was created
section string Section the ReportResult belongs to
refId int Id of object the ReportResult is bound to
type string type of ReportResult
name string User-friendly title for ReportResult
value string Summary or simple value for report output

getRole

Get information about a specific Role.

Parameters (2)

Name Type Description
id int|string The project ID or unix name, included in the route.
roleId int (optional) A specific role ID, included in the route.

Return: \gforge\core\models\api\RoleBasic

The requested role, optionally with a rel.role_settings field containing the role settings.

Name Type Description
id int Unique database identifier for the role
roleName string name of the role

getRoleSettings

Get the default role settings for the specified project.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID.

Related Entities (1)

Return: \gforge\core\models\api\RoleSettingBasic[]

Zero or more objects with default role settings for the project.

Name Type Description
section string
refId int
label string
value int
relatedId int

getRoles

Get the roles that belong to the project.

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID.
rel string Optional. Comma-separated list of relations to include: "user_count", "role_settings".
sections string Optional. Comma-separated list of section names to filter role_settings by. Only relevant when rel=role_settings is included.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Related Entities (2)

Return: \gforge\core\models\api\RoleBasic[]

Zero or more roles that exist for this project.

Name Type Description
id int Unique database identifier for the role
roleName string name of the role

Example 1

Get the roles defined for the project.
  GET http://api.mygforge.tld/project/gforge5/roles
  or
  GET http://api.mygforge.tld/project/138/roles
{
  "paging":{"page_size":20,"page_num":1,"sort_field":"id","sort_dir":"asc"},
  "items":[
    {"id":166,"roleName":"Admin"},
    {"id":167,"roleName":"Senior Developer"},
    {"id":224,"roleName":"SCM only"},
    {"id":9554,"roleName":"Marketing\/Communications"},
    {"id":9028,"roleName":"Hosting"},
    {"id":9134,"roleName":"Technical Writer"},
    {"id":9228,"roleName":"GForge Contractor"},
    {"id":9173,"roleName":"GForge Customer"},
    {"id":9704,"roleName":"License Requestor"}],
  "links":[]
}

getRolesFromRequest

Extract and return the comma-separated list of role IDs from the request.

Parameters (2)

Name Type Description
request \RequestParameters The current request; reads the "roles" parameter.
requireRoles bool If true (default), throws InvalidParameterException when no roles are provided.

Return: int[]

Array of role ID strings parsed from the "roles" parameter.

getScmActivity

A wrapper for the \gforge\plugins\scm\services\ScmService getSummary endpoint

Get a summary of activity data for the specified project's SCM, over the specified (or default) date range

NOTE: The date range will be filled in by day, even if no data is found for that day, so that the array is continuous across the specified range.

Parameters (5)

Name Type Description
id string|int Required. The int ID or unix name for the desired project, by default from the request path (i.e., /api/scm/unixname/summary).
start string The start date/time for activity data to be returned. If empty or false, defaults to two weeks ago.
end string The end date/time for activity data. If empty or false, defaults to tomorrow.
by_user string If set to any value (e.g., 1, true, Y, whatever you've got), then return a record for each user for each day.
chart string If set to any value (e.g., 1, true, Y, whatever you've got), then return activity data, formatted for chart presentation.

Related Entities (1)

Return: \gforge\plugins\scm\models\api\ScmSummary

The summary data, including a stats array with date, checkouts, commits and adds. Not all values are valid for all SCM types, may be empty or zero.

Name Type Description
stats \gforge\core\models\api\StatsBasic[] Commit stats for the repository. NOTE: If the summary was requested with the chart parameter, then this will be an array of StdClass objects, with data optimized for chart display.
totalCommits int
startDate string The date, in Y-m-d format
endDate string The date, in Y-m-d format
unixName string
scmType string
defaultBranchName string
hostName string
options \stdClass for settings on the scm repo Fields:
  • useSsh: If true, then ssh access is enabled for this repository.
  • anonymousRead: If true, then anonymous users can read the repository.
  • requireTrackerItem: If true, then all commits must reference a Tracker Item ID.
  • validateEmail: If true, then all committer emails must belong to an authorized GForge user.
  • mailCommits: If true, then project members will receive email notifications about commits.
  • requireConventionalCommit: If true, then all commits must follow the Conventional Commits specification.
  • accessText: Optional custom text to be shown in the SCM access UI section.
  • browseText: Optional custom text to be shown in the SCM browse UI section.

getSprints

Get the sprints related to the project.

Parameters (12)

Name Type Description
id string|int Required. The project unix name or database ID.
sort_field string Optional. Field to sort by. Allowed: sprint_id, sprint_status, sprint_progression, sprint_name, sprint_start, sprint_end. Default: sprint_id.
sort_dir string Optional. Sort direction: "asc" or "desc". Default: desc.
page_num int Optional. Zero-based page number. Default: 0.
page_size int Optional. Number of results per page. Default: 20.
sprint_id int Optional. Filter by sprint ID.
sprint_status string Optional. Filter by sprint status.
sprint_progression string Optional. Filter by sprint progression.
sprint_name string Optional. Filter by sprint name.
sprint_start string Optional. Filter by sprint start date (ISO 8601 date string).
sprint_end string Optional. Filter by sprint end date (ISO 8601 date string).
text string Optional. Full-text search filter on sprint name or description.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\plugins\tracker\models\api\TrackerSprintBasic[]

Zero or more trackerSprint records

Name Type Description
id int Unique database field for the trackerSprint
sprintStatus int status for the trackerSprint
sprintProgression string progression for the trackerSprint
sprintName string name for the trackerSprint
sprintStart \datetimetz start date for the trackerSprint
sprintEnd \datetimetz end date for the trackerSprint
project \models\Project

getTrackers

Get basic information about the Trackers associated with a specified project

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID.

Return: \StdClass

An array of summary information about each Tracker for the project that the authenticated user can view, inclusing permissions on each Tracker.

Example 1

Basic request
  GET http://api.mygforge.tld/project/gforge5/trackers
  or
  GET http://api.mygforge.tld/project/138/trackers

    {
     "trackers":[
        {
           "tracker_id":10109,
           "tracker_name":"Licenses",
           "is_public":false,
           "restrict_browse":false,
           "total_count":244,
           "open_count":172,
           "closed_count":72,
           "assigned_to_me":0,
           "access_level":10
        },
        {
           "tracker_id":355,
           "tracker_name":"GForge",
           "is_public":false,
           "restrict_browse":false,
           "total_count":5249,
           "open_count":656,
           "closed_count":4593,
           "assigned_to_me":3,
           "access_level":0
        },
        {
           "tracker_id":10237,
           "tracker_name":"GForge Support",
           "is_public":false,
           "restrict_browse":false,
           "total_count":3435,
           "open_count":39,
           "closed_count":3396,
           "assigned_to_me":1,
           "access_level":10
        },
        {
           "tracker_id":10345,
           "tracker_name":"Free Support",
           "is_public":true,
           "restrict_browse":false,
           "total_count":6,
           "open_count":6,
           "closed_count":0,
           "assigned_to_me":1,
           "access_level":10
        },
        {
           "tracker_id":10311,
           "tracker_name":"Managed Servers",
           "is_public":false,
           "restrict_browse":false,
           "total_count":13,
           "open_count":12,
           "closed_count":1,
           "assigned_to_me":0,
           "access_level":10
        },
        {
           "tracker_id":10292,
           "tracker_name":"User Stories",
           "is_public":false,
           "restrict_browse":false,
           "total_count":69,
           "open_count":28,
           "closed_count":41,
           "assigned_to_me":0,
           "access_level":10
        },
        {
           "tracker_id":9662,
           "tracker_name":"Build Failures",
           "is_public":false,
           "restrict_browse":false,
           "total_count":0,
           "open_count":0,
           "closed_count":0,
           "assigned_to_me":0,
           "access_level":10
        },
        {
           "tracker_id":10661,
           "tracker_name":"Business Development",
           "is_public":false,
           "restrict_browse":false,
           "total_count":3589,
           "open_count":3523,
           "closed_count":66,
           "assigned_to_me":0,
           "access_level":99
        }
     ]
  }

getTrove

Gets all trove categories a project is tagged with. It's required that Request contains the following parameters: id.

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID.

Return: \gforge\core\models\api\TroveCategoryBasic[]

Trove category roots, each containing a categories array of matching leaf entries.

Name Type Description
id int Unique database identifier for the Trove Category
categoryName string Trove Category name
description string Trove Category description
alias string Trove Category alias
showInSearch string Trove Category showInSearch
rootCategoryId int Trove Category rootCategoryId
parentCategoryId int Trove Category parentCategoryId
accessLevel int Trove Category accessLevel

POST

postChildren

Adds all projects from the parameter "children" as child projects for project specified.

Parameters (2)

Name Type Description
id string|int Required. The parent project unix name or database ID (in the URL path).
children string Required. Comma-separated list of child project unix names or database IDs to add as children.

Return: (none)

postGroup

Create or update a group associated with the project.

Parameters (6)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
id int Optional. The group database ID. If 0 or omitted, a new group is created.
unixName string Required for new groups. The short unix name for the group (project prefix will be added automatically).
firstname string Optional. The group's display first name.
lastname string Optional. The group's display last name.
users array Optional. Array of user objects to add to the group.

Return: \gforge\core\models\api\GroupApi

Name Type Description
id int
unixName string
status int
name string
userText1 string Flex field for customer use
userText2 string Flex field for customer use
userText3 string Flex field for customer use
userText4 string Flex field for customer use
userText5 string Flex field for customer use
userText6 string Flex field for customer use
users \UserBasic[]
projects \ProjectBasic[]

postInvite

Sends invite emails to a project

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
email string Required. One or more email addresses, separated by semicolons, commas, or spaces.
role int Required. The database ID of the role to assign to each invited user. Must be > 0.

Return: array

A result StdClass for each email submitted, each with a boolean success var and an optional user object (if an existing user was found for an email).

postJoinRequest

Request to join a project

Parameters (1)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).

Return: bool

True if the join request was created successfully.

postMember

Add a user to the project

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The user unix name or database ID (in the URL path).
roles string Required. Comma-separated list of role IDs to assign to the user.

Return: bool

True if one or more roles were added successfully.

postParent

Set a project as the child of another project. The id of the parent project should be in the id parameter within the url for the post. The child project id should be sent in the post data as "parentId"

Parameters (2)

Name Type Description
id string|int Required. The child project unix name or database ID (in the URL path).
parentId string|int Required. The unix name or database ID of the new parent project. Pass an empty string to clear the parent.

Return: (none)

postProject

Create a new or update an existing Project. All fields of the ProjectBasic structure (except the URL fields) may be set using this method.

Parameters (10)

Name Type Description
id string|int Optional. The project unix name or database ID for an update. Omit to create a new project.
unixName string Required for new projects. The short unix name for the project (e.g. "myproject").
projectName string Required for new projects. The human-readable display name.
description string Optional. A description of the project.
status int Optional. The project status code (e.g. active, pending, holding).
isPublic string Optional. Whether the project is publicly visible: "Y" or "N".
isTemplate string Optional. Whether the project is a template: "Y" or "N".
parentProjectId int Optional. Database ID of the parent/org project.
modules string Optional. For NEW projects only. Comma-separated list of module/plugin names to enable.
invites string Optional. For NEW projects only. Comma-separated list of email addresses to invite.

Return: \gforge\core\models\api\ProjectBasic

A ProjectBasic structure if one was created. If the request is not valid, a list of the validation errors.

Name Type Description
id int Unique database identifier for the project
name string Name of the project
unixName string Short, unix-friendly identifier for the project. This is usually also the project's shell logon.
description string Public description for the project
homepageUrl string GFAS url for the project
createDate \DateTime Date of project creation
isPublic string Returns "Y" if the project is public, "N" otherwise
status string Returns the status code for the project
isTemplate string Returns "Y" if the project is a template
templateProjectId int Returns the project used as template for this project
parentProjectId string Returns the parent project id for this project --- used as output, not allowed for input
averageRating int Returns the average rate for the project

postRole

Create or update a role and all of its settings.

Parameters (4)

Name Type Description
id string|int Required. The project unix name or database ID.
roleId int Optional. The database ID of an existing role to update. If 0 or omitted, a new role is created.
roleName string Required. The display name for the role.
rel array Optional. Nested object containing role_settings array to replace all current role settings.

Return: \gforge\core\models\api\RoleBasic

The created or updated role, including role settings.

Name Type Description
id int Unique database identifier for the role
roleName string name of the role

postTrove

Sets the trove categories a project is tagged with, replacing any existing entries.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID.
categories string Required. Comma-separated list of trove category IDs to associate with the project.

Return: void

PUT

putGroup

Create or fully replace a group associated with the project (replaces all group members).

Parameters (6)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Optional. The group unix name or database ID to update. If omitted, a new group is created.
unixName string Required for new groups. The short unix name (project prefix will be added automatically).
firstname string Optional. The group's display first name.
lastname string Optional. The group's display last name.
users array Optional. Array of user objects that completely replace the group's membership.

Return: \gforge\core\models\api\GroupApi

Name Type Description
id int
unixName string
status int
name string
userText1 string Flex field for customer use
userText2 string Flex field for customer use
userText3 string Flex field for customer use
userText4 string Flex field for customer use
userText5 string Flex field for customer use
userText6 string Flex field for customer use
users \UserBasic[]
projects \ProjectBasic[]

putMember

Update roles for a project's member

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The user unix name or database ID (in the URL path).
roles string Required. Comma-separated list of role IDs to assign. Replaces all existing roles.

Return: bool

True if roles were updated successfully.

putModules

Set the list of modules that are enabled for the specified project.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
modules string Required. Comma-separated list of module shortnames to enable. Pass "core" as the only value to disable all modules.

Return: array

DELETE

deleteGroup

Delete a group from the project. If the group belongs to multiple projects, only the project association is removed. If the group is unique to this project, the group record itself is deleted.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The group unix name or database ID to delete (in the URL path; mapped to the userId route slot).

Return: (none)

deleteJoinRequest

Deletes a user's request to join a project. It's required that Request contains the following parameters: id, userId.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The user unix name or database ID (in the URL path).

Return: int

1 on success

deleteMember

Deletes a user from a project. The requesting user must be a project admin.

Parameters (3)

Name Type Description
id string|int Required. The project unix name or database ID (in the URL path).
userId string|int Required. The user unix name or database ID (in the URL path).
org string Optional. If non-empty, also removes the user from all child projects and groups within the organisation tree.

Return: int

1 on success

deleteProject

Deletes a project.

Parameters (1)

Name Type Description
id string|int Required. The unix name or database ID of the project to be deleted.

Return: int

1 on success

deleteRole

Delete a role and all of its settings.

Parameters (2)

Name Type Description
id string|int Required. The project unix name or database ID.
roleId int Required. The database ID of the role to delete, included in the route.

Return: bool