We reserve the right to log and verify your API calls and to contact you if we detect abuse on your part. For example:
- the requests takes too long to return
- the requests return too much data at a time
- The requests are too frequent
We strongly suggest using the date filter parameters to return only the data that is relevant.
https://api.aceproject.com/?fct=savetask&guid=9acaca7f-c717-4ba6-b968-c1662be964d7&projectid=NULL&taskid=NULL&tasknumber=NULL&summary=NULL&details=NULL&statusid=NULL&percentdone=NULL&groupid=NULL&typeid=NULL&priorityid=NULL&weekendallowed=NULL&estimatedstartdate=NULL&estimatedduedate=NULL&estimatedhours=NULL&estimatedexpenses=NULL&manageactualdates=NULL&actualstartdate=NULL&actualduedate=NULL&addcomments=NULL÷hours=NULL¬ify=NULL&isdetailsplaintext=NULL&iscommentsplaintext=NULL&gettaskinreturn=NULL&marklevel=NULL&fileinfo=NULL&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 |
Integer |
True |
|
|
NULL |
True |
False |
|
Auto-generated unique identifier of a project. |
TaskId |
Integer |
True |
|
|
NULL |
False |
True |
|
Auto-generated unique identifier of a task. |
TaskNumber |
Decimal |
True |
|
Greater or equal to 0 |
NULL |
True |
False |
|
Unique number given to a task. The number must be unique within the project. |
Summary |
String |
True |
100 |
|
NULL |
True |
False |
|
Task summary. |
Details |
String |
True |
|
|
NULL |
|
|
False |
Task details. Used with IsDetailsPlainText. When IsDetailsPlainText is true, any HTML formatting provided for the details field will be encoded. |
StatusId |
Integer |
True |
|
|
NULL |
True |
False |
|
Auto-generated unique identifier of a task status. |
PercentDone |
Integer |
True |
|
0 to 10 |
NULL |
True |
False |
|
Percentage done value of the task. Must be 0 when task status type is waiting or 10 when task status type is completed. |
GroupId |
Integer |
True |
|
|
NULL |
True |
False |
|
Auto-generated unique identifier of a task group. |
TypeId |
Integer |
True |
|
|
NULL |
True |
False |
|
Auto-generated unique identifier of a task type. |
PriorityId |
Integer |
True |
|
|
NULL |
True |
False |
|
Auto-generated unique identifier of a task priority. |
WeekendAllowed |
Boolean |
True |
|
True or False |
NULL |
True |
False |
|
For projects that do not include weekends, this parameter indicates whether the task includes weekends as working days. |
EstimatedStartDate |
DateTime |
True |
|
|
NULL |
|
|
False |
Estimated start date. |
EstimatedDueDate |
DateTime |
True |
|
|
NULL |
|
|
False |
Estimated end date. |
EstimatedHours |
Decimal |
True |
|
Greater or equal to 0 |
NULL |
True |
False |
|
Estimated hours. |
EstimatedExpenses |
Decimal |
True |
|
Greater or equal to 0 |
NULL |
True |
False |
|
Estimated expenses. This parameter is ignored if cost tracking is disabled for the account. |
ManageActualDates |
Boolean |
True |
|
True or False |
NULL |
|
|
True |
|
ActualStartDate |
Date |
True |
|
|
NULL |
|
|
False |
Actual start date. |
ActualDueDate |
Date |
True |
|
|
NULL |
|
|
False |
Actual end date. |
AddComments |
String |
True |
|
|
NULL |
|
|
False |
Text of a comment to add to a task. When IsCommentsPlainText is true, any HTML formatting provided for the comments field will be encoded. |
DivideHours |
Boolean |
True |
|
True or False |
NULL |
True |
False |
|
Indicates whether to divide hours amongst users assigned to the task. |
Notify |
Boolean |
True |
|
True or False |
NULL |
|
|
True |
Indicates whether to send email notifications. |
IsDetailsPlainText |
Boolean |
True |
|
True or False |
NULL |
|
|
True |
When true, any HTML formatting provided for the details field will be encoded. |
IsCommentsPlainText |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
When true, any HTML formatting provided for the addcomments field will be encoded. |
GetTaskInReturn |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether to return the task information to the caller (avoids calling GetTask after saving or updating a task). |
MarkLevel |
Boolean |
True |
|
True or False |
NULL |
|
|
False |
Indicates whether to mark the task for the caller. |
FileInfo |
String |
True |
|
|
NULL |
|
|
True |
|
Format |
String |
False |
|
RS: RecordSet DS: DataSet JSON: JSON |
DS |
|
|
True |
Return Format |
Public Class Sample
Public Sub CodeSample_savetask()
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=savetask")
sb.Append(String.Format("&guid={0}", "5fff7d57-2fa9-43c5-bcdd-b249d844f786"))
sb.Append(String.Format("&projectid={0}", "NULL"))
sb.Append(String.Format("&taskid={0}", "NULL"))
sb.Append(String.Format("&tasknumber={0}", "NULL"))
sb.Append(String.Format("&summary={0}", "NULL"))
sb.Append(String.Format("&details={0}", "NULL"))
sb.Append(String.Format("&statusid={0}", "NULL"))
sb.Append(String.Format("&percentdone={0}", "NULL"))
sb.Append(String.Format("&groupid={0}", "NULL"))
sb.Append(String.Format("&typeid={0}", "NULL"))
sb.Append(String.Format("&priorityid={0}", "NULL"))
sb.Append(String.Format("&weekendallowed={0}", "NULL"))
sb.Append(String.Format("&estimatedstartdate={0}", "NULL"))
sb.Append(String.Format("&estimatedduedate={0}", "NULL"))
sb.Append(String.Format("&estimatedhours={0}", "NULL"))
sb.Append(String.Format("&estimatedexpenses={0}", "NULL"))
sb.Append(String.Format("&manageactualdates={0}", "NULL"))
sb.Append(String.Format("&actualstartdate={0}", "NULL"))
sb.Append(String.Format("&actualduedate={0}", "NULL"))
sb.Append(String.Format("&addcomments={0}", "NULL"))
sb.Append(String.Format("&dividehours={0}", "NULL"))
sb.Append(String.Format("&notify={0}", "NULL"))
sb.Append(String.Format("&isdetailsplaintext={0}", "NULL"))
sb.Append(String.Format("&iscommentsplaintext={0}", "NULL"))
sb.Append(String.Format("&gettaskinreturn={0}", "NULL"))
sb.Append(String.Format("&marklevel={0}", "NULL"))
sb.Append(String.Format("&fileinfo={0}", "NULL"))
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