List Risk Projects

Returns a paginated list of the risk projects registered in the system.

 

URL

{RMUrl}/api/risk/projects[?[[&]$filter=<FilterCriteria>][[&]page=<PageNumber>][[&]page_size=<PageSize>][[&]$orderby=<field1[desc],field2[desc]…fieldN[desc]>]]

 

REQUEST METHOD

GET

 

URL PARAMETERS

page: Number of the page to be displayed. Valid values: 1 to the maximum number of pages. If omitted, the value 1 is used. If the value is greater than the maximum number of pages, a blank list will be returned.

page_size: Number of items displayed per page. Valid values: 1 to 1,000. If omitted, the default value of 10 is used

filter: Query based on the OData protocol syntax for configuring filters. The fields supported are listed below. See the examples to view the operations allowed.

orderby: Orders the projects listed on the page by field. To order by more than one field, use a comma between the field names. For descending order, add the word "desc" to each field. The supported fields are listed below.

 

FIELDS SUPPORTED BY FILTER

string Code;

string Name;

string Description;

string AdditionalInformation;

int StatusCode;

datetime CreatedOn;

datetime UpdatedOn;

datetime ClosedOn;

datetime AnalysisStart;

datetime AnalysisEnd;

guid LeaderId;

string LeaderName;

string LeaderPhone;

string LeaderEmail;

string SubstituteLeaderId;

string SubstituteLeaderName;

string SubstituteLeaderEmail;

guid AuthorId;

string AuthorName;

string AuthorPhone;

string AuthorEmail;

datetime StartDate;

datetime EndDate;

datetime ExpectedStartDate;

datetime ExpectedEndDate;

 

The StatusCode field indicates the status of the project, and may contain the following values: 0 for "Open", 1 for "Closed", or 2 for "Cancelled".

For detailed information on filters as supported operators, which filters apply to which data types, and more examples, see Appendix 3: Filters.

 

REQUEST EXAMPLES

The first ten projects (by default, ten projects are listed at a time):

{RMUrl}/api/risk/projects

 

Projects 11 through 20 (second page)

{RMUrl}/api/risk/projects?page=2

 

Filter by "Risk" in the "Name" field:

{RMUrl}/api/risk/projects?$filter=substringof('risk',Name)

 

SUCCESS RESPONSE

List of objects with information on the projects according to the filter and page size specified.

RiskProject[].

 

The RiskProject object is in the following format:

RiskProject

{

string Code;

string Name;

string Description;

string AdditionalInformation;

string Status;

int StatusCode;

datetime CreatedOn;

datetime UpdatedOn;

datetime ClosedOn;

datetime AnalysisStart;

datetime AnalysisEnd;

object Author;

object Leader;

object SubstituteLeader;

datetime StartDate;

datetime EndDate;

datetime ExpectedStartDate;

datetime ExpectedEndDate;

}

 

SUCCESS RESPONSE EXAMPLES

[{

"Name":"Risk in Assets 2012",

"Leader":{

"Id":"212bbac0-08e3-11e2-bcfd-22ddd55f8100",

"Name":"John Smith",

"Phone":"+1 (646) 555-0000",

"Email":"jsmith@example.com"

},

"Author":{

"Id":"fe1f4bb6-1f90-11e1-a18c-001ec920c21f",

"Name":"Administrator",

"Phone":"+1 (646) 555-0000",

"Email":"admin@example.com"

},

"SubstituteLeader":{

"Id":"1841653f-08e3-11e2-bcfd-22ddd55f8100",

"Name":"Alice Brown",

"Type":"Person"

},

"Description":"This project was created to evaluate risks in the organization's assets throughout the year of 2012.",

"AdditionalInformation":"Project started by Carl Rone.",

"ExpectedStartDate":"\/Date(1486346400000-0200)\/",

"ExpectedEndDate":"\/Date(1486432800000-0200)\/",

"StartDate":"\/Date(1486346400000-0200)\/",

"EndDate":"\/Date(1486432800000-0200)\/"},

"Status":"Open",

"StatusCode":0,

"Code":"PRJR12002",

"UpdatedOn":"\/Date(1348778430937-0300)\/",

"CreatedOn":"\/Date(1348778430917-0300)\/",

"AnalysisStart":"\/Date(-62135589600000-0200)\/",

"AnalysisEnd":"\/Date(-62135589600000-0200)\/"

},

{

"Name":"Risk in Assets 2011",

"Leader":{

"Id":"fe1f4bb6-1f90-11e1-a18c-001ec920c21f",

"Name":"Administrator",

"Phone":"+1 (646) 555-0000",

"Email":"admin@example.com"

},

"Author":{

"Id":"fe1f4bb6-1f90-11e1-a18c-001ec920c21f",

"Name":"Administrator",

"Phone":"+1 (646) 555-0000",

"Email":"admin@example.com"

},

"Description":"This project was used to analyze risks in the organization's assets in 2011.",

"AdditionalInformation":"This project was cancelled with the manager's authorization.",

"ExpectedStartDate":"\/Date(1486346400000-0200)\/",

"ExpectedEndDate":"\/Date(1486432800000-0200)\/",

"StartDate":"\/Date(1486346400000-0200)\/",

"EndDate":"\/Date(1486432800000-0200)\/"},

"Status":"Canceled",

"StatusCode":2,

"Code":"PRJR12008",

"UpdatedOn":"\/Date(1349185548033-0300)\/",

"CreatedOn":"\/Date(1349185539577-0300)\/",

"ClosedOn":"\/Date(1349185548030-0300)\/",

"AnalysisStart":"\/Date(-62135589600000-0200)\/",

"AnalysisEnd":"\/Date(-62135589600000-0200)\/"

}]