POST   https://api.d-tools.com/SI/Publish/Task

Publish a new task to SI.

Request Information

URI Parameters

None.

Body Parameters

The Task.

NewTask
NameDescriptionTypeAdditional information
IntegrationId

Id for the task (Optional). The Id must be a valid Guid and can be used to retrieve task.

string

None.

ProjectId

Id of the Project (Required and ProjectId must exist in SI)

string

None.

Name

Name (Required)

string

None.

Start

Start date required (Required)

date

None.

End

End date required (Required)

date

None.

Description

Description of the task

string

None.

Contact

Contact information

ContactInfo

None.

SiteAddress

Site address information

Address

None.

Resources

Resources in a task

Collection of TaskResource

None.

Request Formats

application/json, text/json

Sample:
{
  "IntegrationId": "sample string 1",
  "ProjectId": "sample string 2",
  "Name": "sample string 3",
  "Start": "2025-03-06T03:35:32.6426687+00:00",
  "StartTicks": 5,
  "End": "2025-03-06T03:35:32.6426687+00:00",
  "EndTicks": 7,
  "Description": "sample string 8",
  "Contact": {
    "Name": "sample string 1",
    "Title": "sample string 2",
    "Email": "sample string 3",
    "Phone": "sample string 4",
    "Mobile": "sample string 5"
  },
  "SiteAddress": {
    "Street1": "sample string 1",
    "Street2": "sample string 2",
    "City": "sample string 3",
    "State": "sample string 4",
    "PostalCode": "sample string 5",
    "Country": "sample string 6",
    "Phone": "sample string 7",
    "Fax": "sample string 8"
  },
  "Resources": [
    {
      "Name": "sample string 1",
      "Email": "sample string 2",
      "EstimatedHours": 1.0,
      "ActualHours": 1.0,
      "Cost": 1.0
    },
    {
      "Name": "sample string 1",
      "Email": "sample string 2",
      "EstimatedHours": 1.0,
      "ActualHours": 1.0,
      "Cost": 1.0
    }
  ]
}

application/xml, text/xml

Sample:
<NewTask xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DTools.SICloudAPI.DataObjects">
  <Contact>
    <Email>sample string 3</Email>
    <Mobile>sample string 5</Mobile>
    <Name>sample string 1</Name>
    <Phone>sample string 4</Phone>
    <Title>sample string 2</Title>
  </Contact>
  <Description>sample string 8</Description>
  <End>2025-03-06T03:35:32.6426687+00:00</End>
  <EndTicks>7</EndTicks>
  <IntegrationId>sample string 1</IntegrationId>
  <Name>sample string 3</Name>
  <ProjectId>sample string 2</ProjectId>
  <Resources>
    <TaskResource>
      <ActualHours>1</ActualHours>
      <Cost>1</Cost>
      <Email>sample string 2</Email>
      <EstimatedHours>1</EstimatedHours>
      <Name>sample string 1</Name>
    </TaskResource>
    <TaskResource>
      <ActualHours>1</ActualHours>
      <Cost>1</Cost>
      <Email>sample string 2</Email>
      <EstimatedHours>1</EstimatedHours>
      <Name>sample string 1</Name>
    </TaskResource>
  </Resources>
  <SiteAddress>
    <City>sample string 3</City>
    <Country>sample string 6</Country>
    <Fax>sample string 8</Fax>
    <Phone>sample string 7</Phone>
    <PostalCode>sample string 5</PostalCode>
    <State>sample string 4</State>
    <Street1>sample string 1</Street1>
    <Street2>sample string 2</Street2>
  </SiteAddress>
  <Start>2025-03-06T03:35:32.6426687+00:00</Start>
  <StartTicks>5</StartTicks>
</NewTask>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'NewTask'.

Response Information

Resource Description

PublishResponse
NameDescriptionTypeAdditional information
MessageId

Check the status of the transaction using this Message Id

globally unique identifier

None.

Message

Success Message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "MessageId": "405cca7b-31e4-4e17-bbde-4df8cc23bb4e",
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<PublishResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DTools.SICloudAPI.DataObjects">
  <Message>sample string 2</Message>
  <MessageId>405cca7b-31e4-4e17-bbde-4df8cc23bb4e</MessageId>
</PublishResponse>