Back to top

The Knox Mobile Enrollment Customer API uses the conventional HTTP response code to indicate the success or failure of a request. A 2XX response code indicates success, a 4XX response code indicates a client-side error due to the request inputs, and a 5XX response code indicates a server-side error. It also includes custom error codes that are specific to Knox Mobile Enrollment.

In addition, errors will contain a JSON response body with more information about the error:

HTTP/1.1 200 OK

Content-Type: application/json

    {
        "totalCount": "Integer",
        "processingCount": "Integer",
        "deviceList": []
    }

Async result: GET /kcs/v1/kme/profiles/status

HTTP/1.1 200 OK

Content-Type: application/json

    {
       "profiles":{
          "totalCount":"Integer",
          "totalPage":"Integer",
          "pageNum":"Integer",
          "transactions":[
             {
                "tenantId":"string",
                "transactionId":"string",
                "type":"Put",
                "state":"Complete",
                "profileId":"string",
                "profileName":"string"
             }
          ]
       }
    }

HTTP/1.1 400: Bad Request

Content-Type: application/json

    {
       "errorId":"string",
       "code":4000000,
       "message":"RESOURCE_INVALID_PARAM",
       "data":"Device ID list cannot be empty"
    }

HTTP/1.1 401 Unauthorized

Content-Type: application/json

    { 
       "code":4012250,
       "message":"ACCESS_TOKEN_BAD_REQUEST",
       "data":"ACCESS_TOKEN_BAD_REQUEST"
    }

HTTP/1.1 403 Forbidden

Content-Type: application/json

    { 
       "errorId":"string",
       "code":40300000,
       "message":"AUTHORIZATION_FAIL",
       "data":"The current user is unauthorized to use this service."
    }

HTTP/1.1 404 Not Found

Content-Type: application/json

    { 
       "errorId":"string",
       "code":4040300,
       "message":"DEVICE_NOT_FOUND",
       "data":"Some/All devices don't exist"
    }

HTTP/1.1 500 Internal Server Error

Content-Type: application/json

    { 
       "errorId":"string",
       "code":5000000,
       "message":"INTERNAL_SERVER_ERROR",
       "data":"I/O error on GET request. Connection refused (Connection refused)"
    }

Error object

The error objects contain the following attributes:

Property Type Required Description
errorId String Yes A unique error identifier.
code String Yes The error code number. If it is unique to Knox Mobile Enrollment, it is a more specific indicator of the error than the HTTP response code.
message String Yes The name of the error code.
data String No A description of the error, intended to help developers to debug the error response.

Standard HTTP error codes

The following table lists the most common HTTP error responses:

Code Name Description
200 Success The request was successfully received.
400 Bad Request The client has issued an invalid request. Verify your request (ex. check validation errors in your request payload).
401 Unauthorized Authorization for the API is required, but the request has not been authenticated.
403 Forbidden The request has been authenticated but does not have the appropriate permissions, or the requested resource cannot be found.
404 Not Found The requested path or the specified user does not exist.
409 Conflict The request could not be completed due to a conflict with the current state of the target resource.
500 Server Error An error has occurred on the server. Please try again later.

Knox Mobile Enrollment error codes

Knox Mobile Enrollment specifies several custom error codes which provide more information than the standard HTTP error response codes. The following table lists the standard Knox Mobile Enrollment error codes and their descriptions:

Code Message Description
4000000 RESOURCE_INVALID_PARAM The specified request parameters are not valid.
4000019 TOO_MANY_DEVICES The specified list of devices exceeded the maximum count.
4000904 TENANT_MISMATCH The provided customer ID does not correspond to the current tenant.
4001600 SEG_PROFILE_INVALID The profile request is invalid.
4001700 BULK_ENROLL_PROFILE_INVALID The profile request is invalid.
4001701 CUSTOMER_ID_INVALID The provided customer ID is invalid.
4001701 BULK_ENROLL_REQUEST_INVALID The request is invalid.
4001703 BULK_ENROLL_DEVICE_INVALID The requested device is invalid.
4010000 AUTHORIZATION_FAIL Authorization for the API is required, but the request has not been authenticated.
4010050 ACCESS_TOKEN_BAD_REQUEST The request for an access token is invalid. Please check the fields in your request.
4002251 BAD_REQUEST_CLIENTIDENTIFIER_CLAIM_NOT_POPULATED The customer provides a null or empty string as the client identifier when signing clientIdentifier and then calls the Generate AccessToken API.
4012251 BAD_REQUEST_ACCESS_TOKEN_CLAIM_NOT_POPULATED The customer provides a null or empty string as the token when signing the access token and the calls any open API.
40300000 AUTHORIZATION_FAIL The request has been authenticated but does not have the appropriate permissions, or the requested resource cannot be found.
4030003 TENANT_BLOCKED The current tenant is blocked from using this service.
4030004 RESELLER_BLOCKED The reseller is blocked from using this service. By default Reseller accounts cannot access any Knox Mobile Enrollment APIs.
4030005 TENANT_INACTIVE The current tenant is inactive.
4030100 USER_AUTHENTICATION_FAIL The current user is not registered in this service.
4040000 RESOURCE_NOT_FOUND The specified resource does not exist.
4040100 USER_NOT_FOUND The specified user does not exist.
4040300 DEVICE_NOT_FOUND The requested device does not exist.
4040400 PROFILE_NOT_FOUND The requested profile does not exist.
4040900 TENANT_NOT_FOUND The specified tenant does not exist.
4041600 SEG_PROFILE_NOT_FOUND The requested profile does not exist.
4041700 BULK_ENROLL_PROFILE_NOT_FOUND The requested profile does not exist.
4041701 BULK_ENROLL_CONFIGURATION_DEVICE_NOT_FOUND The devices to be configured does not exist.
4042100 RESELLER_NOT_FOUND The specified resellers does not exist.
4042251 API_KEY_RESTRICTION_INVALID The IP address or http referer format is incorrect or empty.
4091600 SEG_PROFILE_ALREADY_EXISTS The profile already exists.
4091700 BULK_ENROLL_PROFILE_NAME_CONFLICT A profile with the same profile name already exists.
4092103 RESELLER_ASSOCIATION_ALREADY_EXISTS The specified reseller is already associated to the current tenant.
5000000 INTERNAL_SERVER_ERROR An unknown internal server error has occurred. Check the exception message for additional details.
5000006 RSA_DECRYPTION_FAIL Encountered an issue in decrypting text.

Troubleshooting

If your request returns a 400 level error

Check the specific error code and refer to the error codes section of this reference. To further debug, check the response payload and the Activity Log on the Reseller Portal.

If your request returns a 500 level error

Please try the request again at a later time.

Is this page helpful?