Status Codes

When you call any of the Oracle Communications UIM REST resources, the response header returns one of these standard HTTP status codes:

HTTP Status Code Description
200 OK

The request was successfully completed.

For GET requests, the requested information was found and returned in the response.

The updates were successfully completed for Merge patch and JSON patch.

201 Created The POST request was successfully completed and the newly-created resource is returned in the response.
204 Deleted The DELETE request was successfully completed and the resource was deleted.
206 Partial Content

The request was successfully completed and response contains partial data.

For GET requests, the requested information was found and returned only paginated data.

400 Bad Request The request couldn't be processed because it includes missing or invalid information, such as an invalid parameter or a missing required value.
401 Unauthorized You aren't authorized to make the request. Your authentication credentials are missing or invalid.
403 Forbidden You aren't authorized to make a request. Check if the user is assigned to the uim-users group in WebLogic Server.
404 Not Found

A requested resource doesn't exist.

This code usually appears for GET requests, but it can also appear for DELETE requests (when the specified contract or payment profile doesn't exist).

500 Internal Server Error An internal server occurred. Problem in processing the request in API Layer.
501 Not Implemented The Endpoint is not yet implemented and planned for future release. For example: GET Party request

In addition to the standard HTTP codes, the UIM REST API returns detailed error messages for error scenarios.

Error Messages

When a REST request fails, you get an HTTP error response. The response includes a 400-level HTTP status code, an application error code, and an error message that describes the problem.

Each error message includes an application error code and a reason for the error, and may contain the resolution where the error occurred.

For example, you submit a GET request to retrieve a logical device with an ID filter that has an incorrect BusinessIdentifier of the resource. Because the parameter is incorrect, the request isn't valid and the logical device retrieval fails.

In response, you receive an HTTP 400 status error with the following error message, which includes a reason for the failure and more error details.

{    
   "code": "9000202",    
   "reason": "[INV-9000202] LogicalDevice not found with ID-4-54353",    
   "message": [        
      "Invalid BusinessIdentifier for given resource type LogicalDevice. It has to be 1"    
   ]
}

In another example, you submit a POST request to create a logical device with a mapping relationship to an already mapped physical device. The logical device creation fails with a generic error message.

In response, you get an HTTP 500 status error with the following error message, which includes a reason for the failure and more error details.

{    
   "code": "9000003",    
   "reason": "[INV-9000003] Internal Server processing failed",    
   "message": [        
      "Physical device 1575114 - PDD is already associated to logical device 750008 - LDD."    
   ]
}

All requests to the UIM REST API are treated as atomic transactions. This means that if any action taken as part of a request fails, the whole request fails, any changes already made are rolled back, and an error message is returned in the response body in JSON format.

For example, you create a telephone number associated with a SIM. The POST request for creating the telephone number with an involvement relationship to a logical device is a single transaction. If the telephone number is successfully created but the involvement relationship fails, the telephone number creation is rolled back and you get an error message in response.

Resolving Common Errors

The most common types of error are:

Type of Error Description Resolution
Validation errors A required parameter is missing, a value isn't supported, a value is in an invalid format, or an unexpected parameter was provided.

Fix the invalid data and resubmit the request.

The method descriptions in this document or the Swagger indicate which parameters are required for each method, and the error message guides you to the parameter where the error occurred.

Resource not found errors A resource ID you provided, such as a logic device ID, doesn't match anything in the database.

Confirm your resource IDs and resubmit the request.

For example, if you try to retrieve logicaldevice 1-123456, but accidentally enter 1-12356 (and no logical device with ID 12356 exists), you get a 404 error in the response stating that the logical device wasn't found.

Authentication errors Your user name or password is incorrect.

Confirm your authentication details and resubmit the request.

Authorization errors You aren't authorized to make a request.

Ask your user administrator to grant your client the missing permissions.

See "Authentication and Authorization" for more information about roles.

Internal Server Errors

After input request validation checks are performed in the REST adapter, the API layer processes the request. Errors occurring in the API layer are considered internal server errors.

"reason": "[INV-9000003] Internal Server processing failed"

Resubmit the request with the appropriate corrections.