Handling Errors in the REST API

If a request results in an error, the server returns an HTTP status code that indicates the general nature of the error. These can include 400 (Bad Request) if Tableau Server cannot parse or interpret the message in the request, 403 (Forbidden) if the request was not authorized, 404 (Not Found) if a resource could not be located, and 405 (Method Not Allowed) if the wrong verb was used for an operation (for example, making a GET request instead of a POST request).

For error conditions, the response body also includes an XML block that provides details about the error. For example, if the HTTP response was 404, the response body provides details about what resource in particular was not found. Imagine that you send the following PUT request in order to update information for a user:

http://your-server/api/3.9/sites/9a8b7c6d5-e4f3-a2b1-c0d9-e8f7a6b5c4d/users/9f9e9d9c8-b8a8-f8e7-d7c7-b7a6f6d6e6d

An HTTP status code of 404 for the response tells you that the operation was not successful because a resource could not be found. In that case, the response body might look like the following example:

<?xml version="1.0" encoding="UTF-8"?>
<tsResponse version-and-namespace-settings >
  <error code="404002">
    <summary>Resource Not Found</summary>
    <detail>User '9f9e9d9c8-b8a8-f8e7-d7c7-b7a6f6d6e6d' could not be found.</detail>
  </error>
</tsResponse>

Notice that the code in the <error> element provides both general information and specifics. In the example, the error code is 404002. The "404" part of the code indicates a "not found" error, which matches the HTTP status code. The "002" part indicates that it was the specified user that was not found. The <detail> element within the error provides a text description of the error.

If error messages have been translated, they are returned in the language that's set in the Accept-Language header of the request. For example, if the headers include Accept-Language: de-de, error messages are returned in German.

Note: You should not rely on specific text appearing in the <detail> element of an error response. Instead, test the value of the error code attribute to determine why an operation failed.

Common Errors

The following errors can occur in any API call.

HTTP Status Code Error Details
400 Resource unavailable in API version. The API version specified in the URI is valid, but the specified resource is not available in that version of the API.
400 Malformed XML in request body The request body contains malformed XML.
400 Invalid request body The XML in the request body is well-formed XML, but it does not meet the format defined in the XML schema.
401 Not authenticated The client attempted to access an API method without authentication credentials.
403 Non-admin access forbidden The client attempted to access an API method while signed in as a non-administrator user.
403 Cross-site access forbidden The client attempted to access or modify a resource on one site using an authentication token that was created for another site.
404 Invalid API version The API version in the URI is not valid.

Table of Error Codes

The following table lists all the codes that can appear as code attribute of an <error> element if an error has occurred.

Code Error Type
400000 BAD_REQUEST
400001 NONADMIN_ASSET_TARGET
400002 EMPTY_ASSET_TARGET
400003 USER_VALIDATION_ERROR
400004 INVALID_SITE_UPDATE_VALUE
400005 INVALID_FAVORITE_LABEL
400006 INVALID_PAGE_NUMBER
400007 INVALID_PAGE_SIZE
400008 INVALID_PARAMETER_VALUE
400009 INVALID_CAPABILITY_FOR_RESOURCE
400010 INVALID_DATASOURCE_ATTACHMENT
400011 GENERIC_PUBLISHING_ERROR
400012 GENERIC_UPDATE_USER_ERROR
400013 INVALID_SITE_ROLE
400014 GENERIC_CREATE_GROUP_ERROR
400015 GENERIC_CREATE_FILE_UPLOAD_ERROR
400016 FILE_SIZE_LIMIT_EXCEEDED
400017 GENERIC_APPEND_FILE_UPLOAD_ERROR
400018 INVALID_USER_FULL_NAME
400019 MALFORMED_IMPORT_ELEMENT
400020 INVALID_WORKBOOK_ATTACHMENT
400021 GENERIC_QUERY_GROUP_USERS_ERRROR
400022 GENERIC_ADD_USER_TO_GROUP_ERROR
400023 GENERIC_QUERY_WORKBOOKS_ERROR
400024 INVALID_SYNC_MODE
400025 GENERIC_QUERY_SITE_USERS_ERROR
400026 GENERIC_DOWNLOAD_WORKBOOK_ERROR
400027 GENERIC_QUERY_WORKBOOK_DATA_CONNECTIONS_ERROR
400028 GENERIC_QUERY_GROUPS_ERROR
400029 GENERIC_DELETE_WORKBOOK_ERROR
400030 GENERIC_DELETE_DATASOURCE_ERROR
400031 GENERIC_QUERY_JOB_ERROR
400032 GENERIC_UPDATE_GROUP_ERROR
400033 GENERIC_UPDATE_DATASOURCE_CONNECTIONS_ERROR
400034 INVALID_RESOURCE_QUALIFIER
400035 INVALID_WORKBOOK_NAME
400036 GENERIC_UPDATE_WORKBOOK_ERROR
400037 GENERIC_DOWNLOAD_DATASOURCE_ERROR
400038 GENERIC_QUERY_SITE_USER_ERROR
400039 GENERIC_UPDATE_WORKBOOK_CONNECTION_ERROR
400040 GENERIC_UPDATE_DATASOURCE_ERROR
400041 ATTRIBUTE_VALUE_EXCEEDS_LIMIT
400042 REQUEST_PERMISSIONS_PAYLOAD_CONTAINS_UNEXPECTED_ELEMENT
400043 INVALID_USER_EMAIL
400044 GENERIC_DELETE_SITE_ERROR
400045 GENERIC_DELETE_GROUP_ERROR
400046 GENERIC_REMOVE_USER_FROM_SITE_ERROR
400047 GENERIC_QUERY_EXTRACT_REFRESHES_ERROR
400048 GENERIC_QUERY_VIEW_IMAGE_PREVIEW_ERROR
400049 GENERIC_ADD_TAGS_TO_WORKBOOK_ERROR
400050 GENERIC_QUERY_WORKBOOK_ERROR
400051 GENERIC_DELETE_TAG_FROM_WORKBOOK_ERROR
400052 GENERIC_QUERY_WORKBOOK_IMAGE_PREVIEW_ERROR
400053 GENERIC_QUERY_VIEWS_ERROR
400054 INVALID_APPEND_TO_DATASOURCE_FILE_TYPE
400055 CANNOT_OVERWRITE_AND_APPEND_DATASOURCE
400056 GENERIC_DELETE_REVISION_ERROR
400057 GENERIC_DOWNLOAD_REVISION_ERROR
400058 GENERIC_QUERY_REVISION_ERROR
400059 GENERIC_DELETE_SCHEDULE_ERROR
400060 GENERIC_QUERY_SUBSCRIPTIONS_ERROR
400061 GENERIC_UPDATE_SITE_ERROR
400062 GENERIC_DELETE_SUBSCRIPTION_ERROR
400063 GENERIC_CREATE_SUBSCRIPTION_ERROR
400064 GENERIC_CREATE_SCHEDULE_ERROR
400065 GENERIC_FILTER_QUERY_ERROR
400066 GENERIC_SORT_ORDER_ERROR
400067 INVALID_SUBSCRIPTION_SUBJECT
400068 INVALID_SUBSCRIPTION_TARGET
400069 INVALID_SUBSCRIPTION_SCHEDULE_TYPE
400070 GENERIC_UPDATE_SCHEDULE_ERROR
400071 GENERIC_QUERY_SCHEDULE_ERROR
400072 GENERIC_CREATE_PROJECT_ERROR
400073 GENERIC_UPDATE_PROJECT_ERROR
400074 GENERIC_QUERY_VIEW_IMAGE_ERROR
400075 GENERIC_ADD_TAGS_TO_DATASOURCE_ERROR
400076 GENERIC_ADD_TAGS_TO_VIEW_ERROR
400077 GENERIC_DELETE_TAG_FROM_DATASOURCE_ERROR
400078 GENERIC_DELETE_TAG_FROM_VIEW_ERROR
400080 BAD_REQUEST
400103 GENERIC_QUERY_DATA_QUALITY_WARNING_ERROR
400104 GENERIC_QUERY_DATA_QUALITY_WARNINGS_ERROR
400105 GENERIC_DELETE_DATA_QUALITY_WARNING_ERROR
400106 GENERIC_DELETE_DATA_QUALITY_WARNINGS_ERROR
400109 MISSING_DATA_QUALITY_WARNING_PAYLOAD
400120 NO_EXPLICIT_PERMISSIONS_FOR_EMBEDDED
401000 NO_AUTH_CREDENTIALS
401001 LOGIN_ERROR
401002 INVALID_AUTH_CREDENTIALS
403000 MUST_BE_ADMIN_USER
403001 MISSING_AUTH_TOKEN
403002 CANNOT_DELETE_DEFAULT_SITE
403003 CANNOT_DELETE_DEFAULT_PROJECT
403004 OPERATION_ON_RESOURCE_UNAUTHORIZED
403005 CANNOT_RENAME_DEFAULT_PROJECT
403006 SERVER_ADMIN_NOT_CONFIGURED
403007 PUBLISHING_UNAUTHORIZED
403008 INSUFFICIENT_SITE_STORAGE_REMAINING
403009 UPDATE_USER_FORBIDDEN
403010 AUTHENTICATED_SITE_MISMATCHED
403011 AD_NOT_CONFIGURED
403012 QUERY_GROUP_USERS_FORBIDDEN
403013 ADD_USER_TO_GROUP_FORBIDDEN
403014 PAGE_SIZE_LIMIT_EXCEEDED
403015 CREATE_FILE_UPLOAD_FORBIDDEN
403016 APPEND_FILE_UPLOAD_FORBIDDEN
403017 REMOVE_USER_FROM_GROUP_FORBIDDEN
403018 QUERY_WORKBOOKS_FORBIDDEN
403019 DOWNLOAD_WORKBOOK_FORBIDDEN
403020 CANNOT_MODIFY_AD_GROUP_NAME
403021 QUERY_WORKBOOK_DATA_CONNECTIONS_FORBIDDEN
403022 CANNOT_CHANGE_NON_LOCAL_USER_PASSWORD
403023 UPDATE_DATASOURCE_CONNECTIONS_FORBIDDEN
403024 UPDATE_WORKBOOK_NAME_FORBIDDEN
403025 MOVE_WORKBOOK_PROJECT_PERMISSIONS_FORBIDDEN
403026 MOVE_WORKBOOK_WORKBOOK_PERMISSIONS_FORBIDDEN
403027 UPDATE_WORKBOOK_OWNER_FORBIDDEN
403028 DOWNLOAD_DATASOURCE_FORBIDDEN
403029 UPDATE_WORKBOOK_CONNECTION_FORBIDDEN
403030 MOVE_DATASOURCE_PROJECT_PERMISSIONS_FORBIDDEN
403031 MOVE_DATASOURCE_DATASOURCE_PERMISSIONS_FORBIDDEN
403032 UPDATE_DATASOURCE_OWNER_FORBIDDEN
403033 UPDATE_WORKBOOK_SHOW_TABS_FORBIDDEN
403034 ADD_USER_TO_SITE_FORBIDDEN
403035 QUERY_PERMISSION_TEMPLATES_FOR_DATASOURCE_FORBIDDEN
403036 QUERY_PERMISSION_TEMPLATES_FOR_WORKBOOK_FORBIDDEN
403037 API_VERSION_DEPRECATED
403038 DELETE_PERMISSION_TEMPLATES_FOR_DATASOURCE_FORBIDDEN
403039 OPERATION_FORBIDDEN_PROJECT_LOCKED
403040 GROUP_MEMBERSHIP_UPDATE_FORBIDDEN
403041 UPDATE_PROJECT_FORBIDDEN
403042 ADD_PERMISSION_TEMPLATES_FOR_DATASOURCE_FORBIDDEN
403043 ADD_PERMISSION_TEMPLATES_FOR_WORKBOOK_FORBIDDEN
403044 DELETE_PERMISSION_TEMPLATES_FOR_WORKBOOK_FORBIDDEN
403045 CREATE_PROJECT_FORBIDDEN
403046 DELETE_PROJECT_FORBIDDEN
403047 REMOVE_USER_FROM_SITE_FORBIDDEN
403048 DELETE_ALL_USERS_GROUP_FORBIDDEN
403049 NEW_CONTENT_OWNER_MUST_BE_ADMIN
403050 CHANGE_DATASOURCE_OWNER_DISABLED
403051 QUERY_EXTRACT_REFRESHES_FORBIDDEN
403052 UPDATE_WORKBOOK_FORBIDDEN
403053 CONTENT_REVISIONS_DISABLED
403054 QUERY_DATASOURCE_REVISIONS_FORBIDDEN
403055 CANNOT_DELETE_HEAD_REVISION
403056 QUERY_WORKBOOK_REVISIONS_FORBIDDEN
403057 DELETE_SCHEDULE_FORBIDDEN
403058 QUERY_SUBSCRIPTIONS_FORBIDDEN
403059 DELETE_SUBSCRIPTION_FORBIDDEN
403060 CREATE_SUBSCRIPTION_FORBIDDEN
403061 CREATE_SCHEDULE_FORBIDDEN
403062 UPDATE_DATASOURCE_MULTIPLE_CONNECTIONS_FORBIDDEN
403063 CREATE_SUBSCRIPTION_FORBIDDEN_SUBRIPTION_USER_HAS_NO_PERMISSIONS_TO_CONTENT
403064 CREATE_SUBSCRIPTION_FORBIDDEN_USER_EMAIL_MISSING
403065 UPDATE_SUBSCRIPTION_FORBIDDEN
403066 UPDATE_SCHEDULE_FORBIDDEN
403067 CREATE_SUBSCRIPTION_FORBIDDEN_USER_UNLICENSED
403068 QUERY_VIEW_IMAGE_DISABLED
403091 CANCEL_BACKGROUND_JOBS_ALREADY_COMPLETE
403114 ADD_PERMISSION_TEMPLATES_FOR_TABLE_FORBIDDEN
403115 QUERY_PERMISSION_TEMPLATES_FOR_TABLE_FORBIDDEN
403116 DELETE_PERMISSION_TEMPLATES_FOR_TABLE_FORBIDDEN
403117 OPERATION_FORBIDDEN_DATABASE_LOCKED
404000 SITE_NOT_FOUND
404001 VERSION_NOT_FOUND
404002 USER_NOT_FOUND
404003 UNKNOWN_RESOURCE
404004 DATASOURCE_NOT_FOUND
404005 PROJECT_NOT_FOUND
404006 WORKBOOK_NOT_FOUND
404007 TAG_NOT_FOUND
404008 OPERATION_NOT_SUPPORTED
404009 MISMATCHED_LUID
404010 FAVORITE_NOT_FOUND
404011 VIEW_NOT_FOUND
404012 GROUP_NOT_FOUND
404013 CAPABILITY_NOT_FOUND
404014 PERMISSION_NOT_FOUND
404015 FILE_UPLOAD_NOT_FOUND
404016 AD_DOMAIN_NOT_FOUND
404017 AD_GROUP_NOT_FOUND
404018 JOB_NOT_FOUND
404019 MISMATCH_AD_GROUP_DOMAIN_NAME_ON_SYNC
404020 DATA_CONNECTION_NOT_FOUND
404021 CAPABILITY_NOT_ASSIGNED
404022 USER_NOT_FOUND_IN_GROUP
404023 SCHEDULE_NOT_FOUND
404024 REVISION_NOT_FOUND
404025 SUBSCRIPTION_NOT_FOUND
404029 CONTENT_NOT_FOUND
404030 DATA_QUALITY_WARNING_NOT_FOUND
404031 DATABASE_NOT_FOUND
404032 TABLE_NOT_FOUND
405000 METHOD_NOT_ALLOWED
409000 USER_ALREADY_ON_SITE
409001 SITE_NAME_EXISTS
409002 SITE_URL_EXISTS
409003 USER_ASSET_CONFLICT
409004 INVALID_PARAMETER
409005 CANNOT_ADD_USER_WITH_GUEST_ROLE
409006 PROJECT_NAME_EXISTS
409007 FAVORITE_LABEL_EXISTS
409008 CONFLICTING_PERMISSION
409009 GROUP_NAME_EXISTS
409010 EMAIL_EXISTS
409011 USER_ALREADY_IN_GROUP
409012 WORKBOOK_NAME_ALREADY_EXISTS
409013 WORKBOOK_ALREADY_EXISTS_IN_DESTINATION
409014 INSUFFICIENT_USER_LICENSES
409015 DATASOURCE_ALREADY_EXISTS
409016 IMPLICITLY_ADDED_SYSTEM_ADMIN
409017 USER_ALREADY_MEMBER_OF_SITE
409018 UPDATE_USER_SITE_USER_QUOTA_REACHED
409019 SITE_ID_EXISTS
409020 INVALID_SITE_ID
409021 SCHEDULE_NAME_EXISTS
409022 GUEST_ACCESS_CANNOT_BE_SET
409023 RESOURCE_NOT_FOUND
409028 ADD_RECIPIENT_TO_DATAALERTS_FORBIDDEN
409029 DELETE_DATAALERT_RECIPIENT_FORBIDDEN
409030 UPDATE_DATAALERT_FORBIDDEN
409045 GENERIC_DATABASE_ERROR
409046 GENERIC_QUERY_DATABASE_ERROR
409047 GENERIC_DELETE_DATABASE_ERROR
409048 GENERIC_ADD_TAGS_TO_DATABASE_ERROR
409050 GENERIC_UPDATE_DATABASE_ERROR
409051 UPDATE_DATABASE_FORBIDDEN
409052 GENERIC_TABLE_ERROR
409053 GENERIC_QUERY_TABLE_ERROR
409054 GENERIC_DELETE_TABLE_ERRROR
409055 GENERIC_ADD_TAGS_TO_TABLE_ERROR
409057 GENERIC_UPDATE_TABLE_ERROR
409058 UPDATE_TABLE_FORBIDDEN
409059 GENERIC_COLUMN_ERROR
409060 GENERIC_QUERY_COLUMN_ERROR
409061 GENERIC_DELETE_COLUMN_ERROR
409062 GENERIC_ADD_TAGS_TO_COLUMN_ERROR
409064 UPDATE_COLUMN_FORBIDDEN_ERROR
409065 GENERIC_UPDATE_COLUMN_ERROR
409066 COLUMN_NOT_FOUND_ERROR
409092 BATCH_CREATE_TAGS_ERROR
429000 UNKNOWN_ERROR
500000 INTERNAL_SERVER_ERROR

 


Thanks for your feedback! There was an error submitting your feedback. Please try again.