Project and view
This topic describes the usage of the StarTeam REST API for project and view.
GET - project list
The following section illustrates the usage of the GET method to retrieve a list of the projects.
Usage: GET: /project
Description: Gets a list of available projects.
Sample URL: http://localhost:49206/serverapi/project/
Response example:
[{"ID":0,"Name":"test"}]
GET - project properties
The following section illustrates the usage of the GET method to retrieve the project properties.
Usage: GET: /project/{id}
Description: Gets the project properties for project {id}.
Sample URL: http://localhost:49206/serverapi/project/0
(using cookie)
Response example
{"project.ID":0,"project.Name":"test","properties":{"AltCREditorPath":"","AltFileEditorPath":"","AltReqEditorPath":"","AltTaskEditorPath":"","AltTopicEditorPath":"","CheckinCPLastUpdate":{"raw":43614.690776863499,"text":"2019-05-29T16:34:43Z"},"Compaction":0,"ConfigSource1":"","ConfigSource2":"","CreatedTime":{"raw":43614.690776863499,"text":"2019-05-29T16:34:43Z"},"CreatedUserID":0,"DefaultTypes":[34],"DefaultViewID":0,"DeletedTime":{"raw":0,"text":""},"DeletedUserID":-1,"Description":"","DisplayAltCREditor":0,"DisplayAltFileEditor":0,"DisplayAltReqEditor":0,"DisplayAltTaskEditor":0,"DisplayAltTopicEditor":0,"Encryption":0,"ForceCheckinReason":0,"GUID":"e39e5266-a5c4-448d-8ec3-efd3f23eff0e","GlobalID":0,"ID":0,"KWFileExt":"","Mail":0,"MarkUnlockedFilesReadOnly":0,"MergeHistoryDuringVCMSession":0,"Methodology":0,"Name":"test","ProcessLinks":1,"ProcessRequired":0,"ProcessSelectCR":0,"ProcessSelectRequirement":0,"ProcessSelectTask":0,"ProcessShowCRInProgress":0,"ProcessShowCROpen":0,"ProcessShowReqApproved":0,"ProcessShowTaskInProgress":0,"ProcessShowTaskReady":0,"ProjectType":0,"RequireLockForCheckin":0,"State":0,"TenantID":0,"UseCheckinCP":-1,"UseKeywords":0}}
GET - view list
The following section illustrates the usage of the GET method to retrieve the views in a project.
Usage: GET: /project/{id}/view
Description: Gets a list of available views in a project {id}
.
Sample URL: http://localhost:49206/serverapi/project/0/view
(using cookie)
Response example
[{"ID":0,"Name":"test"},{"ID":1,"Name":"dev"}]
GET - view
The following section illustrates the usage of the GET method to retrieve the properties of view.
Usage: GET: /project/{id}/view/{viewid}
or GET: /view/{viewid}
Description: Gets the properties of view {viewid}
in project {id}
, where project
is optional.
Sample URL: http://localhost:49206/serverapi/project/0/view/0
(using cookie)
Response example
{"BaseConfigData":{"raw":43696.840520833299,"text":"2019-08-19T20:10:21Z"},"BaseConfigType":2,"CreatedTime":{"raw":43696.840734293997,"text":"2019-08-19T20:10:39Z"},"CreatedUserID":0,"DeleteComplete":0,"DeletedTime":{"raw":0,"text":""},"DeletedUserID":-1,"Description":"","EndDate":{"raw":0,"text":""},"Flags":65540,"GlobalID":1,"ID":1,"IsViewPurged":0,"Name":"dev","ParentViewID":1,"ProjectID":0,"PromotionID":-1,"ResolvedViewID":0,"RootMemberID":1024,"ShareFlags":1,"StartDate":{"raw":0,"text":""},"TenantID":0,"Type":0,"VCMCodeReviewRequired":0,"VCMCommitAutomatic":0,"VCMCommitEnforce":0,"VCMCommitExcludedGroups":[],"VCMCommitExcludedUsers":[],"WorkingFolder":"D:\\BLS","WorkspaceModifiedTime":{"raw":0,"text":""}}
POST - project
The following section illustrates the usage of the POST method to create a new project and root view:
Usage: POST: /project/
Description: Creates a new project and root view with the same name.
Sample URL: http://localhost:49206/serverapi/project/
(using cookie)
Body example
{"properties": {
"Name": "RESTProject_Wed",
"Description": "created from REST"}
Response example
{"project.ID":1,"project.Name":"RESTProject_Wed","view.ID":2}
See also: