When troubleshooting failed REST API calls, error codes can be helpful in diagnosing the cause for the failure. There are many cases where a missing role permission on a host, folder, or content type, may cause an intentional restriction error. Here is a list of the types of codes returned after a REST API calls to help determine if the call was successful and, if not, what type of permission failure exists:
401 Error Code: (Unauthorized)
A user has not logged in and attempts to access a restricted REST service
403 Error Code (Forbidden)
When the user has logged in, and attempts to access a restricted REST service over which the user has no permission
200 Code (OK)
When the user has logged in and attempts to access a restricted REST service, over which the user does have permission, and the call executes successfully
500 Error Code (Internal Service Error)
When the user has logged in, and attempts to access a restricted REST service over which the user does have permission, but there is an error processing the request