UpdateFavorites

Use this resource to update a list of favorite process apps for the user.

Method summary

HTTP Method Path Description
POST /scr/api/UpdateFavorites Updates a list of favorite process apps for the user.

POST /scr/api/UpdateFavorites

Description
Use this method to update a list of favorite process apps for the user. The list is saved in the order provided by the caller. The list can be retrieved as part of the AppList call.
Important: First, run AppList to provide the IDs you can use for UpdateFavorites.
Resource information
Requirements Description
Response format JSON
Requires authentication Yes
Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Authoring Category
Rate limited Not yet
Parameters
Name Location Description Required Type
X-On-Behalf-Of Header The user context. The value must be a username in the account. The user must have permission to perform the action in the account and in the specified parent space, if any. Required if Service ID OAuth credentials are used. Not required when using User Service ID OAuth credential. String
favorites Query The list of item IDs for the user's favorite process apps. Only process app IDs are allowed for version 20110917.
Important: Be sure to use the "id" values from the AppList output, rather than the "processId" values.
Yes JSON array of numbers
version Query The version of the requested API. The only allowed value is 20110917. Yes String
The favorites parameter
Example
{
    "favorites":[
        {
            "id":"2c0007"
        },
        {
            "id":"905be"
        }
    ]
}
favorites
The list of favorite IDs.
favorites.id
The ID of an item that is a part of the favorites list.
Response
Example input
Update a list of favorite process apps:
  • Using User Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" -H "Content-Type:application/json"
        -X POST "https://your_server_url/scr/api/UpdateFavorites?version=20110917&favorites={\"favorites\":[{\"id\":\"5f500e1092496\"},{\"id\":\"5f500e10924ec\"}]}"
  • Using Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" -H "X-On-Behalf-Of: user_name@domain.com" -H "Content-Type:application/json"
        -X POST "https://your_server_url/scr/api/UpdateFavorites?version=20110917&favorites={\"favorites\":[{\"id\":\"5f500e1092496\"},{\"id\":\"5f500e10924ec\"}]}"
Example output
{  
   "favorites":[  
      {  
         "id":"5f500e1092496"
      },
      {  
         "id":"5f500e10924ec"
      }
   ],
   "version":"20110917"
}
Response properties
version
The version of the API used to create a response.
favorites
The list of favorite IDs.
favorites.id
The ID of an item that is a part of the favorites list.
Response messages
HTTP code Reason
200

The request was completed successfully.

400

There was an error processing the request. Required parameters were missing or contained invalid values.

401

The user isn't authorized to make the request.