User home
Contents
Structure of user home and favourites can be found at UserHome document model.
List User’s Recent Projects
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
This endpoint returns a list of last 10
projects that current user recently visited. This is a similar list that is returned from /api/v2/projects/
, with an exception that it is filtered to return the only projects that are listed in the cache.
Example:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/projects/recent/
Example response:
User’s Favourites
Users car mark particular documents as favourites, and then access the favourites list, see UserHome document model | User-favourites for more details.
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
URL parameters:
filter_type
– is type of objects to return, one of the following:projects
– see Favourite Projects;tasks
– see Favourite Tasks;files
– see Favourite Files;contacts
– see Favourite Contacts.
This endpoint returns the items, denoted by the filter_type
, currently stored in the logged in user's Favourites list.
If an invalid filter type is requested, the endpoint will return a 400
status code with json object:
{"Error": "No such filter type: <filter_type>"}
Where:
filter_type
– is the requested filter type.
List Favourite Projects
Endpoint [1]:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Example [1]:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/favorite/
Endpoint [2]:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Example [2]:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/projects/favorite/
Each of the two endpoint above return the projects that have been added to the user’s favourite list. Here is an example response:
See related endpoints:
List Favourite Tasks
There is actually no way in CoreData for marking a contact as a favourite.
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Returns the tasks that have been added to the user’s favourite list.
Example:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/tasks/favorite/
See related endpoints:
List Favourite Files
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Returns the files that have been added to the user’s favourite list.
Example:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/files/favorite/
Example response:
See related endpoints:
List Favourite Contacts
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Returns the contacts that have been added to the user’s favourite list.
Example:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/user/contacts/favorite/
Example response:
See related endpoints: