entries/list

Returns the last 20 entries on the stream of the logged user. You can filter the results by a lot of different parameters, as described below.

URL

http://api.staction.com/entries/list.format

HTTP Method:

GET

Optional Parameters

All parameters on this call are optional. If no parameters are set, this call will return entries from the main stream.

  • lastEntryTime: RFC 2822 format (Thu, 21 Dec 2000 16:01:07 +0000) of the last entry fetched; use this to get only new entries from the stream since the last time you fetched information from the server
  • threadId: the ID of a thread. In Staction, every entry is a thread by default. Both replies and entries posted inside the Thread View are saved under the main thread. Each entry can only pertain to one thread.
  • id: the ID of the specific entry you’re looking for. Will only return the specific entry (whereas the threadId parameter will return all the entries related to the ID you specify)
  • projectId: returns all entries that were tagged under the project with the specified ID. This will only work if the logged user has access to the project in question.
  • senderId: returns all entries that were sent by the user with the specified ID.
  • recipientId: returns all entries that were sent to the user with the specified ID.
  • viewId: returns all entries that are withing the Saved View with the specified ID.
  • type: filters results by the type of the entry. Can accepted todo, completeTodo, incompleteTodo, time, message (message is an entry that isn’t either a Todo or a Time Entry).
  • hasAttachment: filters results to entries that that have files attached. Can only be set to true, won’t work with false.
  • dateBefore: filters results by time range, returning only entries that were created before a given date. Format is mm/dd/yyyy.
  • dateAfter: filters results by time range, returning only entries that were created after a given date. Format is mm/dd/yyyy.
  • searchTerms: returns only results that contain the given search term (either on the contents or the tags).
  • count: the number of entries to fetch. It defaults to 20, and has a maximum of 200.
  • page: for pagination purposes, respecting the count parameter (either the default 20, or anything else you set on your call).

Examples

You can use as many parameters as you want on this call, and the Staction API won’t complain (as long as they’re properly formatted and not logically mutually exclusive). This means you can make the simple call of just asking for the 20 more recent entries on the user’s stream, but can get fancy with details.

  • http://api.staction.com/entries/list.json
  • http://api.staction.com/entries/list.json?projectId=1&senderId=2
  • http://api.staction.com/entries/list.json?projectId=1&senderId=2&type=todo
  • http://api.staction.com/entries/list.json?projectId=1&senderId=2&type=todo&hasAttachement=true
  • http://api.staction.com/entries/list.json?projectId=1&senderId=2&type=todo&hasAttachement=true&dateBefore=01/01/2009&dateAfter=12/10/2008
  • http://api.staction.com/entries/list.json?projectId=1&senderId=2&type=todo&hasAttachement=true&dateBefore=01/01/2009&dateAfter=12/10/2008&searchTerms=design mockup&count=100&page=3

Expected Responses

If the call fails to be executed properly, the API will return an error in the default error format, with a status field set to false, and a reason field explaining why it failed to run (respecting the format requested). If the call runs properly, it will return all your entries, also respecting the format you requested.

As an example, here’s a parsed JSON response, transferred into a multidimensional array for the sake of clarity.

Array
(
    [0] => Array
        (
            [id] => 1080050
            [user_id] => 2
            [project_id] => 
            [is_to_everyone] => true
            [content] => This is a reply.
            [thread_id] => 
            [in_reply_to_entry_id] => 1080042
            [file_mime_type] => 
            [file_filesize] => 
            [file_access_hash] => 
            [file_original_filename] => 
            [time_time_spent] => 
            [todo_is_done] => 
            [todo_sort] => 
            [todo_finished_by_user_id] => 
            [created_on] => Mon, 29 Jun 2009 18:52:43 +0000
            [last_updated] => 
            [avatar_img] => http://pasteinteractive.staction.com/upload/avatars/dd3ffdd567879aa97af43235515ddf51.jpg
            [user_name] => Jason
            [type] => message
            [in_reply_to_entry] => Array
                 (
                     [id] => 1080042
                     [user_id] => 1
                     [project_id] => 
                     [is_to_everyone] => true
                     [content] => Work on that secret project
                     [thread_id] => 
                     [in_reply_to_entry_id] => 
                     [file_mime_type] => 
                     [file_filesize] => 
                     [file_access_hash] => 
                     [file_original_filename] => 
                     [time_time_spent] => 
                     [todo_is_done] => false
                     [todo_sort] => 99
                     [todo_finished_by_user_id] => 
                     [created_on] => Mon, 29 Jun 2009 18:51:32 +0000
                     [last_updated] => 
                     [user_name] => Brian
                     [avatar_img] => http://pasteinteractive.staction.com/upload/avatars/dd3ffdd567879aa97af43235515ddf51.jpg
                     [type] => todo
                 )
        )

    [1] => Array
        (
            [id] => 1080049
            [user_id] => 1
            [project_id] => 1234
            [project_name] => Project Title 123
            [is_to_everyone] => true
            [content] => An entry, with a file attachment.
            [thread_id] => 
            [in_reply_to_entry_id] => 
            [file_mime_type] => image/png
            [file_filesize] => 103211
            [file_access_hash] => 29b9cf3306e0e8f67402c3b477175ca7e3adc326
            [file_original_filename] => picture1.png
            [time_time_spent] => 
            [todo_is_done] => 
            [todo_sort] => 
            [todo_finished_by_user_id] => 
            [created_on] => Mon, 29 Jun 2009 15:10:44 +0000
            [last_updated] => 
            [avatar_img] => http://pasteinteractive.staction.com/upload/avatars/c905123b74c4fb87ae86d30cb8962f72.jpg
            [user_name] => Brian
            [type] => message
        )
)