Documentation

API /user/{userId}/canview/{contentId}

ThoughtFarmer REST API Method: /user/{userId}/canview/{contentId}

Returns true or false depending if the user specified by {userId} can view the page specified by {contentId}.

URL:
http://yourserver.com/api/user/{userId}/canview/{contentId}

http://yourserver.com/api/2.0/user/{userId}/canview/{contentId}


Response Formats:
xml,json

HTTP Method(s):
GET

Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description
userId int Required. The user id to check the page permissions for.
contentId int Required. The content id of the page to check permissions for.
token string Required. A valid token authentication parameter
Response Status Codes:
200 - Success
401 - Token parameter is invalid
403 - Requesting user does not have permissions for the page or user requested.
404 - User not found, or content not found

Example request
GET http://yourserver.com/api/user/{userId}/canview/{contentId}
[
true
]

NOTE: Only rely on the return value if you have retrieved a 200 success status code. False will be returned by the call if it was unsuccessful due to another reason.