5.6.  Erase Deleted Favorites

GET and POST EraseDeletedFavorites

Description:   Permanently remove a previously deleted dataset entry from the user ‘favorites’ list.

API Usage:   This endpoint uses zero API calls. Please refer to section 8.2 for more details on API rate limits.

GET Sample Request:

GET https://[server]/EraseDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN&Series[]=ECBFX/EURGBP&Series[]=ECBFX/EURUSD

POST Sample Request:

POST https://[server]/EraseDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN
	
						{
							"SessionToken=YOUR_SESSION_TOKEN",
							"Series":[
								{ "Datasource":"ECBFX", "Symbol":"EURGBP" }, 
								{ "Datasource":"ECBFX", "Symbol":"EURUSD" }
							],

						}
						  
						

Request Parameters

Parameter Type Description
SessionToken String Session token from the GetSessionToken endpoint.
Series [Object] A list of Datasource (, Datacategory) and Symbol parameters to request.
See the example above.
The Series Datacategory parameter is only required if the datasource is a CategoryDS datasource e.g:
{ “Datasource”:”AAAA”, “Datacategory”:”BB”, “Symbol”:”CCCCC” }

Tips:

  • You can use the GetUserFavoritesMetadata endpoint to return the list of subscriber favorites.
  • Use the AddUserFavorites endpoint to add data symbols to the subscriber favorites.


Response Parameters

Parameter Type Mandatory Description
1 ServerDateTime String Yes The server UTC date and time as an ISO 8601 string.
2 TimeStamp Float Yes Server date and time as a Julian date.
3 ExecutionTime Float Yes The number of milliseconds taken to process the request.
4 Result [Object] No* If the request is a success, a Result object is returned.
See the ‘Result‘ table below for details.
5 Errors [Object] No* If the request fails, an 'Errors' object is returned.
See the ‘Errors Object‘ table below for details.
Note

A successful API response will return a 'Result' object with the requested payload or an 'Errors' object detailing the issue that caused the error.

Result Object

Parameter Type Mandatory Description
1 Removed Integer Yes Datasets removed from the favorites list.
2 Ignored Integer Yes Datasets that were ignored (not in the favorites list).

Errors Object

Parameter Type Mandatory Description
1 Status Integer Yes HTTP status code.
2 Detail String Yes Description of the status code above.

Possible Status codes in the 'Errors' object

Code Description
400 The API Function name is invalid.
401 Invalid session token
429 The session token has expired
Note

This is not an exhaustive list and additional error codes may be returned. The Errors object Detail field will return request specific error information.

Possible HTTP response codes

This endpoint returns 200 for success, 204 if deleted is zero and 202 if if ignored is greater than zero.
You can get HTTP client network errors or server errors from any API request. You should check with your network or IT colleagues in case the issue is a local one.
All server generated errors will return an 'Errors' object that will give specific details about the error.
A full list of HTTP codes and their meanings is available here,


Success and fail examples

Sample Request:

GET https://[server]/EraseDeletedFavorites?SessionToken=YOUR_SESSION_TOKEN&Series[]=ECBFX/EURGP&Series[]=ECBFX/EURUSD
						

Response body on success:

Response body on fail:

Last updated on April 20, 2024