Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jan 09, 2019 18:16

Solving issues you may encounter when using the API


Issue:

Error messages returned in the response of an API operation are self-explanatory and should be sufficient to resolve issues, as can be seen from the following examples:

# Cause: The specified execution id could not be found
# Resolution: Verify that the executionId is correct
{"errorMessage":"Failed to get execution status - Execution executionId wasn't found"}
# Cause: The specified user does not have sufficient permission to perform the requested operation
# Resolution: If you want to use this operation, you can either use a user with the correct permissions or request the correct permission for this user {"errorMessage":"Failed to get execution list - User username is not authorized to get all script executions"} # Cause: The specified parameter is not valid for the abort operation # Resolution: If the parameter is valid for this operation then report the issue, otherwise remove the parameter and try again {"errorMessage":"Failed to abort script - Request contains unknown parameters: [time.offset]"} 


The following table provides guidance for resolving some of the common HTTP codes that you may encounter.

ResponseCauseResolution
400 Bad Request One or more of the specified parameters is not valid. Fix incorrect parameters in the URL 
401 Unauthorized Authentication is required and has failed. Fix incorrect user/password parameters in the URL 

For other HTTP codes, you should follow your usual HTTP troubleshooting procedure.

Common Errors for Invalid HTTP API URLs

# Cause: Invoking the HTTP API without using HTTPS
# Resolution: Use HTTPS
{"errorMessage":"The operation requires secured channel"}
# Cause: Invoking the HTTP API with an unknown resource
# Resolution: Verify that the resource name is correct
{"errorMessage":"Could not find resource '[unknown resource name]'"}
# Cause: Invoking the HTTP API with an unknown operation
# Resolution: Verify that the operation name is correct
{"errorMessage":"Could not find operation '[unknown operation name]' for resource '[resource name]'"}
The following table provides guidance for resolving some of the common HTTP codes that you may encounter.

Side Note:

If you are using parenthesis in your API call, such as getting the device list of a cloud, please follow this article here about parenthesis and REST API calls.