Action
Action Service
Web service endpoints for interacting with action and notification in the ToDo queue. Actions are created by creating activities with recipients specified. See Sending Actions for how to create an action.
See Action for an example of the JSON representation.
Examples:
Example with curl of getting actions for the current user. Corresponds with the Actions tab in a user's Home screen.
curl -u someuser:password http://example.jiveon.com/api/core/v3/actions?count=5
Example with curl of creating an Action, i.e. an activity directed towards specific users.
curl -u jane.smith:password -H "Content-Type: application/json" --data '{ "title": "Sending you an action!", "content": "Click OK to acknowledge",
"openSocial": { "deliverTo": ["jive.mycompany.com/api/core/v3/people/1234"] } }' example.jiveon.com/api/core/v3/activities
Get Action
GET /actions/{actionID}
Return the specified inbox action for the requesting person.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
actionID | String | true | ID of the action to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input parameter is missing or invalid |
403 (Forbidden) | You are not allowed to access the requested action |
404 (Not Found) | The specified action is missing or not an action |
Get Actions
GET /actions
Return a paginated (by most recent event time) list of actions for the authenticated requesting person.
This service supports the following filters. Parameters, when used, should be wrapped in parentheses, and multiple values separated by commas. See examples for clarification.
Filter | Params | Example |
---|---|---|
entryState | One of the valid state values (default is awaiting_action ) |
?filter=entryState(hidden,ignored) |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
after | String | false | Date/time representing the minimum timestamp for a returned action (cannot specify both after and before) |
before | String | false | Date/time representing the maximum timestamp for a returned action (cannot specify both after and before) |
count | Integer | false | Maximum number of notifications to return in this request |
fields | String | false | Names of the fields to be returned |
filter | Object[] | false | Filter expressions to limit the returned actions |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input parameter is missing or invalid |
403 (Forbidden) | You are not allowed to access the requested actions |
Get Counts
GET /actions/counts
Return counting information about the actions of the person making the request.
Field | Description |
---|---|
tasks | Indicates number of tasks that are still pending. |
pending | Indicates number of actions that are still pending. |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
400 (Bad Request) | an error happened while building the JSON reply |
Since: 3.4
Perform Action
POST /actions/{actionID}/actions/{caption}
Programmatically perform the behavior corresponding to the specified caption. Typically this will cause a state change on Jive-generated actions, and may trigger a request to the specified target URI on app-generated actions. Then, return the updated information for this action.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
actionID | String | true | ID of the action on which to perform the requested behavior |
caption | String | true | Caption (from an openSocial.actionLinks entry of this action) of
the behavior to be taken |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Field names to be returned in the updated action |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input parameter is missing or invalid |
403 (Forbidden) | You are not allowed to access the requested actions |
404 (Not Found) | The specified action or caption cannot be found |