Follow

Get Tasks (Task Search)

Using the STaskSearch API

The STaskSearch API allows you to search for multiple Tasks at a time

To search for and retrieve multiple Tasks at once, use a GET with the search API found at:

https://secure.formsonfire.com/api/v1/stask/search?format=xml/json

NOTE: This API end point implements pagination, and as such you must cater for this when you connect to our platform.
You can learn more about pagination in our API overview.

GET Request

The GET verb allows you to retrieve many Tasks, according to the filtering parameters you specify.
The required and optional parameters for a GET call to the Tasks API are outlined below.

Parameter Name

Data Type

Required

Description

Format

String

Yes

Specifies the desired format of the response.
Must either JSON or XML.

ProviderId

Integer

Yes

Your unique Provider Id found on the Organization Setup page of the secure website (under My Account)

Integrationkey

String

Yes

Your unique Integration Key found on the Organization Setup page of the secure website (under My Account)

UserEmail

String

No

Specify if you want to search for Tasks assigned to a specific App User by email

UserExternalId

String

No

Specify if you want to search for Tasks assigned to a specific App User by their External Id

Status

String

No

Specify a specific Task Status to search for.
Defaults to Completed if not specified.
Status options are:

Draft – Task created but not yet sent
Sent – Task sent to the App User
In Progress – Task started by App User
Completed – Task completed by App User

FromDate

DateTime
(YYYY-MM-DDTHH:MI:SS)

No

Only return Tasks  last updated after or on the given Date and optional Time

ToDate

DateTime
(YYYY-MM-DDTHH:MI:SS)

No

Only return Tasks last updated on or before the given Date and optional Time


PageNo

Integer

No

 

The page number of the result set that you wish to receive back.
Defaults to 0, which is the first page of the result set.

 


PageSize

Integer

No

The number of items returned per page.

Maximum value of 100.
Defaults to 100.

 

 

GET Response

The data returned from a STaskSearch GET is provided as follows:

STask Response (<STaskSearchResponse>)

Field Name

Data Type

Description

STasks

Collection

Collection of STask objects

ResponseStatus

ResponseStatus

Details of any errors that may have occurred

TotalRows Integer The total number of rows found for the requested parameters.

Using the PageSize that you passed into your request, you can calculate how many pages of data are available.
i.e. PageSize / TotalRows = Total number of pages

 

API Usage Example

Given that the API is REST based, you can access the API directly via your web browser to test it.  Obviously for actual integration works, you will need to make a web request to the given REST URL and then parse the response.

Below is a simple GET example which searches for Tasks, using both the XML response types.

GET Request

https://secure.formsonfire.com/api/v1/stask/search?integrationkey=xxxxxxxxxxxx&providerid=1&format=xml

 

XML Response

<?xml version="1.0" encoding="UTF-8"?>
   <STasks>
      <STask>
         <ActualCompleteLat>0</ActualCompleteLat>
         <ActualCompleteLon>0</ActualCompleteLon>
         <AdditionalInfo>String</AdditionalInfo>
         <CompleteAtLat>0</CompleteAtLat>
         <CompleteAtLon>0</CompleteAtLon>
         <CompleteAtText>String</CompleteAtText>
         <CompleteBy>0001-01-01T00:00:00</CompleteBy>
         <CompleteTime>0001-01-01T00:00:00</CompleteTime>
         <ExternalId>String</ExternalId>
         <Id>00000000-0000-0000-0000-000000000000</Id>
         <IntegrationKey>String</IntegrationKey>
         <Name>String</Name>
         <PerformWithin>0</PerformWithin>
         <ProviderId>0</ProviderId>
         <STaskActivities>
            <STaskActivity>
               <CompleteTime>0001-01-01T00:00:00</CompleteTime>
               <DocCode>String</DocCode>
               <FormCode>String</FormCode>
               <Instruction>String</Instruction>
               <OutcomeId>00000000-0000-0000-0000-000000000000</OutcomeId>
            </STaskActivity>
         </STaskActivities>
         <StartTime>0001-01-01T00:00:00</StartTime>
         <Status>String</Status>
         <UserEmail>String</UserEmail>
         <UserExternalId>String</UserExternalId>
      </STask>
   </STasks>
   <ResponseStatus>
      <ErrorCode>String</ErrorCode>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
      <Errors />
   </ResponseStatus>
</STaskSearchResponse>
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk