https://api.aceproject.com/?fct=gettasks&guid=3b8ed7e8-c3c6-4169-9a53-c3d825275558&projectid=NULL&portfolioid=NULL&taskid=NULL&assignedprojectsonly=False&includeinactivetemplates=True&projectstatictemplate=NULL&filtertaskgroupid=NULL&filtertaskstatusid=NULL&isgroupingtaskstatus=NULL&filterhasdocuments=NULL&filtertaskcompleted=NULL&filtertasktypeid=NULL&filtertaskpriorityid=NULL&filtercreatoruserid=NULL&filterassigneduserid=NULL&filterassignedusergroupid=NULL&filterrevieweruserid=NULL&filteronuseridmustmeetall=True&filterprojecttypeid=NULL&filterclientid=NULL&filterfirstdate=NULL&filterfirstdateoperator=NULL&filterfirstdatevalue=NULL&filterseconddate=NULL&filterseconddateoperator=NULL&filterseconddatevalue=NULL&filtertaskassigned=NULL&filtertaskreviewers=NULL&filtermarkedonly=False&filtersoontodoonly=False&filtersoondueonly=False&filteroverdueonly=False&filteroverduerecent=False&filterrecurrencynumber=NULL&filtertasksreadytostartonly=False&filtertaskswithoutdates=False&texttosearch=NULL&getplaintextvalues=False&sortorder=NULL&useshowhide=False&forcombo=False&pagenumber=NULL&rowsperpage=NULL&asynccall=False&asynccallid=NULL&exportdomainevaleur=NULL&exporttype=NULL&exportdelimiter=NULL&exportdecimalsymbol=NULL&exportlcid=0&exportonscreencolumnsonly=True&exportview=0&exportviewother=NULL&exportfieldstodisplay=NULL&exportremovehtmlonly=True&exportenablefilterxls=False&format=DS
Guid |
String |
False |
|
|
|
|
|
True |
Unique identifier for the authenticated user. The GUID has an expiry date and time which is managed automatically by the API. |
ProjectID |
String |
True |
|
|
NULL |
|
|
False |
Auto-generated unique identifier of a project. |
PortfolioID |
String |
True |
|
|
NULL |
|
|
True |
|
TaskID |
String |
True |
|
|
NULL |
|
|
False |
Auto-generated unique identifier of a task. |
AssignedProjectsOnly |
Boolean |
False |
|
True or False |
False |
|
|
True |
Indicates whether to filter the list based on assigned project's only. This parameter is ignored if the calling user is not an administrator. Only assigned projects are returned for non administrators. |
IncludeInactiveTemplates |
Boolean |
False |
|
True or False |
True |
|
|
True |
DEPRECATE - Use ProjectStaticTemplate parameter. |
ProjectStaticTemplate |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether we take only or not at all the tasks of the static projects. Omitting the parameter returns all tasks, static or not. |
FilterTaskGroupId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of task groups to filter on. |
FilterTaskStatusId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of task statuses to filter on. |
IsGroupingTaskStatus |
Boolean |
True |
|
True or False |
NULL |
|
|
True |
|
FilterHasDocuments |
Boolean |
True |
|
True or False |
NULL |
|
|
True |
|
FilterTaskCompleted |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether to filter tasks on the status. NULL values means to not filter on the task status. |
FilterTaskTypeId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of task types to filter on. |
FilterTaskPriorityId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of task priorities to filter on. |
FilterCreatorUserId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of users to filter on creators. |
FilterAssignedUserId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of users to filter on assignees. |
FilterAssignedUserGroupId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of user groups to filter on assignees. |
FilterReviewerUserId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of users to filter on reviewers. |
FilterOnUserIdMustMeetAll |
Boolean |
False |
|
True or False |
True |
|
|
False |
Indicates if the tasks must meet all user identifier filters or only one of the filters. |
FilterProjectTypeId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of project types to filter on. |
FilterClientId |
String |
True |
|
|
NULL |
|
|
False |
List of comma separated unique identifiers of clients to filter on. |
FilterFirstDate |
String |
True |
|
DATE_EXPECTED_START_TASK: Estimated Start Date DATE_EXPECTED_END_TASK: Estimated Due Date DATE_TASK_CREATED: Created Date DATE_TASK_MODIFIED: Last Update ACTUAL_START_DATE: Actual Start Date ACTUAL_END_DATE: Actual End Date |
NULL |
|
|
False |
Type of date filter for tasks (first). Used with FilterFirstDateOperator and FilterFirstDateValue. |
FilterFirstDateOperator |
Integer |
True |
|
0: Is Earlier Than 1: Is Earlier Than Or On 2: Is On 3: Is Later Than Or On 4: Is Later Than |
NULL |
|
|
False |
Operator for date filter of tasks (first). Used with FilterFirstDate and FilterFirstDateValue. |
FilterFirstDateValue |
DateTime |
True |
|
|
NULL |
|
|
False |
Value for date filter of tasks (first). Used with FilterFirstDate and FilterFirstDateOperator. |
FilterSecondDate |
String |
True |
|
DATE_EXPECTED_START_TASK: Estimated Start Date DATE_EXPECTED_END_TASK: Estimated Due Date DATE_TASK_CREATED: Created Date DATE_TASK_MODIFIED: Last Update ACTUAL_START_DATE: Actual Start Date ACTUAL_END_DATE: Actual End Date |
NULL |
|
|
False |
Type of date filter for tasks (second). Used with FilterSecondDateOperator and FilterSecondDateValue. |
FilterSecondDateOperator |
Integer |
True |
|
0: Is Earlier Than 1: Is Earlier Than Or On 2: Is On 3: Is Later Than Or On 4: Is Later Than |
NULL |
|
|
False |
Operator for date filter of tasks (second). Used with FilterSecondDate and FilterSecondDateValue. |
FilterSecondDateValue |
DateTime |
True |
|
|
NULL |
|
|
False |
Value for date filter of tasks (second). Used with FilterSecondDate and FilterSecondDateOperator. |
FilterTaskAssigned |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether to filter tasks based on assignees. |
FilterTaskReviewers |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether to filter tasks based on reviewers. |
FilterMarkedOnly |
String |
False |
|
|
False |
|
|
False |
|
FilterSoonTodoOnly |
String |
False |
|
|
False |
|
|
False |
Returns only soon to do (based on estimated start date) tasks if true. |
FilterSoondueOnly |
String |
False |
|
|
False |
|
|
False |
Returns only soon due (based on estimated end date) tasks if true. See Account information for details about number of days used to consider tasks as soon due. |
FilterOverdueOnly |
String |
False |
|
|
False |
|
|
False |
Returns only over due (based on estimated end date) tasks if true. Used with FilterOverdueRecent. See Account information for details about number of days used to consider tasks as overdue. |
FilterOverdueRecent |
String |
False |
|
|
False |
|
|
False |
Returns only recently over due tasks if true. The parameter is ignored if FilterOverdueOnly is false. See Account information for details about number of days used to consider tasks as overdue. |
FilterRecurrencyNumber |
String |
True |
|
|
NULL |
|
|
True |
|
FilterTasksReadyToStartOnly |
Boolean |
False |
|
True or False |
False |
|
|
True |
|
FilterTasksWithoutDates |
Boolean |
False |
|
True or False |
False |
|
|
True |
|
TextToSearch |
String |
True |
300 |
|
NULL |
|
|
False |
Search list based on specified text |
GetPlainTextValues |
Boolean |
False |
|
True or False |
False |
|
|
False |
Returns plain text values (without HTML formatting) for task details field when this field is returned to the caller. |
SortOrder |
String |
True |
|
|
NULL |
|
|
False |
Comma separated fields used for ordering a list. |
UseShowHide |
Boolean |
False |
|
True or False |
False |
|
|
False |
|
ForCombo |
Boolean |
False |
|
True or False |
False |
|
|
False |
Indicates whether returns a simplified list to display drop-down list. |
PageNumber |
Integer |
True |
|
NULL or greater than 0 |
NULL |
|
|
False |
When the page number is not NULL, the API returns only the entries of the specified page within the list. A default rows per page is used within the API to determine pages if RowsPerPage parameter is not specified. |
RowsPerPage |
Integer |
True |
|
NULL or greater than 0 |
NULL |
|
|
False |
When the number of rows per page is NULL, the API uses the default value in the system. This parameter is used only when PageNumber has a value. |
Asynccall |
Boolean |
False |
|
True or False |
False |
|
|
True |
|
Asynccallid |
Integer |
True |
|
|
NULL |
|
|
True |
|
ExportDomaineValeur |
String |
True |
|
|
NULL |
|
|
True |
|
ExportType |
String |
True |
|
|
NULL |
|
|
True |
|
ExportDelimiter |
String |
True |
|
|
NULL |
|
|
True |
|
ExportDecimalSymbol |
String |
True |
|
|
NULL |
|
|
True |
|
ExportLCID |
Integer |
True |
|
|
0 |
|
|
True |
|
ExportOnScreenColumnsOnly |
Boolean |
True |
|
True or False |
True |
|
|
True |
|
ExportView |
Integer |
True |
|
|
0 |
|
|
True |
|
ExportViewOther |
Integer |
True |
|
|
NULL |
|
|
True |
|
ExportFieldsToDisplay |
String |
True |
|
|
NULL |
|
|
True |
|
ExportRemoveHTMLOnly |
Boolean |
True |
|
True or False |
True |
|
|
True |
|
ExportEnableFilterXLS |
Boolean |
True |
|
True or False |
False |
|
|
True |
|
Format |
String |
False |
|
RS: RecordSet DS: DataSet JSON: JSON |
DS |
|
|
True |
Return Format |
Public Class Sample
Public Sub CodeSample_gettasks()
Dim strXML As String = String.Empty
Dim dsOutput As DataSet = Nothing
Dim guid As String = String.Empty
Dim sb As New System.Text.StringBuilder
Try
sb = New System.Text.StringBuilder
sb.Append("fct=gettasks")
sb.Append(String.Format("&guid={0}", "d7894cc8-6499-4a29-8274-a625f14c530a"))
sb.Append(String.Format("&projectid={0}", "NULL"))
sb.Append(String.Format("&portfolioid={0}", "NULL"))
sb.Append(String.Format("&taskid={0}", "NULL"))
sb.Append(String.Format("&assignedprojectsonly={0}", False))
sb.Append(String.Format("&includeinactivetemplates={0}", True))
sb.Append(String.Format("&projectstatictemplate={0}", "NULL"))
sb.Append(String.Format("&filtertaskgroupid={0}", "NULL"))
sb.Append(String.Format("&filtertaskstatusid={0}", "NULL"))
sb.Append(String.Format("&isgroupingtaskstatus={0}", "NULL"))
sb.Append(String.Format("&filterhasdocuments={0}", "NULL"))
sb.Append(String.Format("&filtertaskcompleted={0}", "NULL"))
sb.Append(String.Format("&filtertasktypeid={0}", "NULL"))
sb.Append(String.Format("&filtertaskpriorityid={0}", "NULL"))
sb.Append(String.Format("&filtercreatoruserid={0}", "NULL"))
sb.Append(String.Format("&filterassigneduserid={0}", "NULL"))
sb.Append(String.Format("&filterassignedusergroupid={0}", "NULL"))
sb.Append(String.Format("&filterrevieweruserid={0}", "NULL"))
sb.Append(String.Format("&filteronuseridmustmeetall={0}", True))
sb.Append(String.Format("&filterprojecttypeid={0}", "NULL"))
sb.Append(String.Format("&filterclientid={0}", "NULL"))
sb.Append(String.Format("&filterfirstdate={0}", "NULL"))
sb.Append(String.Format("&filterfirstdateoperator={0}", "NULL"))
sb.Append(String.Format("&filterfirstdatevalue={0}", "NULL"))
sb.Append(String.Format("&filterseconddate={0}", "NULL"))
sb.Append(String.Format("&filterseconddateoperator={0}", "NULL"))
sb.Append(String.Format("&filterseconddatevalue={0}", "NULL"))
sb.Append(String.Format("&filtertaskassigned={0}", "NULL"))
sb.Append(String.Format("&filtertaskreviewers={0}", "NULL"))
sb.Append(String.Format("&filtermarkedonly={0}", "False"))
sb.Append(String.Format("&filtersoontodoonly={0}", "False"))
sb.Append(String.Format("&filtersoondueonly={0}", "False"))
sb.Append(String.Format("&filteroverdueonly={0}", "False"))
sb.Append(String.Format("&filteroverduerecent={0}", "False"))
sb.Append(String.Format("&filterrecurrencynumber={0}", "NULL"))
sb.Append(String.Format("&filtertasksreadytostartonly={0}", False))
sb.Append(String.Format("&filtertaskswithoutdates={0}", False))
sb.Append(String.Format("&texttosearch={0}", "NULL"))
sb.Append(String.Format("&getplaintextvalues={0}", False))
sb.Append(String.Format("&sortorder={0}", "NULL"))
sb.Append(String.Format("&useshowhide={0}", False))
sb.Append(String.Format("&forcombo={0}", False))
sb.Append(String.Format("&pagenumber={0}", "NULL"))
sb.Append(String.Format("&rowsperpage={0}", "NULL"))
sb.Append(String.Format("&asynccall={0}", False))
sb.Append(String.Format("&asynccallid={0}", "NULL"))
sb.Append(String.Format("&exportdomainevaleur={0}", "NULL"))
sb.Append(String.Format("&exporttype={0}", "NULL"))
sb.Append(String.Format("&exportdelimiter={0}", "NULL"))
sb.Append(String.Format("&exportdecimalsymbol={0}", "NULL"))
sb.Append(String.Format("&exportlcid={0}", 0))
sb.Append(String.Format("&exportonscreencolumnsonly={0}", True))
sb.Append(String.Format("&exportview={0}", 0))
sb.Append(String.Format("&exportviewother={0}", "NULL"))
sb.Append(String.Format("&exportfieldstodisplay={0}", "NULL"))
sb.Append(String.Format("&exportremovehtmlonly={0}", True))
sb.Append(String.Format("&exportenablefilterxls={0}", False))
sb.Append(String.Format("&format={0}", "DS"))
strXML = CallHttp("https://api.aceproject.com/", sb.ToString)
dsOutput = Deserialize(Of DataSet)(strXML)
If dsOutput IsNot Nothing AndAlso dsOutput.Tables.Count > 0 Then
If dsOutput.Tables.Contains("dtAPIErrors") Then
Throw New Exception(String.Format("{0}: {1}", _
dsOutput.Tables(0).Rows(0).Item("ErrorNumber").ToString, _
dsOutput.Tables(0).Rows(0).Item("ErrorDescription").ToString))
End If
End If
Catch ex As Exception
Throw
Finally
If sb IsNot Nothing Then sb = Nothing
If dsOutput IsNot Nothing Then
dsOutput.Dispose()
dsOutput = Nothing
End If
End Try
End Sub
Private Shared Function CallHttp( ByVal url As String, _
ByVal params As String) As String
Dim loHttp As System.Net.HttpWebRequest
loHttp = CType(System.Net.WebRequest.Create(url), System.Net.HttpWebRequest)
loHttp.Method = "POST"
Dim requestWriter As System.IO.StreamWriter = New System.IO.StreamWriter(loHttp.GetRequestStream())
If Not String.IsNullOrEmpty(params) Then
requestWriter.Write(params)
End If
requestWriter.Close()
loHttp.ContentType = "application/x-www-form-urlencoded"
loHttp.Headers.Set("Pragma", "no-cache")
loHttp.AllowAutoRedirect = True
loHttp.KeepAlive = True
loHttp.Timeout = 30 * 1000
Dim loWebResponse As System.Net.HttpWebResponse = CType(loHttp.GetResponse(), System.Net.HttpWebResponse)
Dim enc As Encoding = System.Text.Encoding.UTF8
Dim loResponseStream As System.IO.StreamReader = New System.IO.StreamReader(loWebResponse.GetResponseStream(), enc)
Dim lcHtml As String = loResponseStream.ReadToEnd()
loWebResponse.Close()
loResponseStream.Close()
Return lcHtml
End Function
Private Shared Function Deserialize(Of T)( ByVal strXML As String) As T
Dim objet As T = Nothing
Dim objType As Type = GetType(T)
Try
If Not String.IsNullOrEmpty(strXML) Then
Dim objSerializer As New System.Xml.Serialization.XmlSerializer(objType)
Dim objText As New System.Text.StringBuilder()
Dim objXmlReader As New System.IO.StringReader(strXML)
objet = DirectCast(objSerializer.Deserialize(objXmlReader), T)
objXmlReader.Close()
End If
Return objet
Catch ex As Exception
Throw
Finally
If objet IsNot Nothing Then objet = Nothing
End Try
End Function
End Class