Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

NCMP CMhandle registration endpoint receives multiple operations to create, update or delete cm-handles in a single request. As there are multiple operations, the endpoint response structure should be able to provide the status of all operations separately with consistent error-code to allow users to retrigger failed operations programmatically if possible.

Response Structure

HttpStatus

ScenarioStatus CodeResponseBody
All operations were successful204Empty
All or few operations failed500With error from each operation

Response Body

The response body should give enough information in case of errors for user to retry programatically

The response can be sent as a collection or grouped by operation type or cm-handles. If we group the response by operation type it will be simpler for the end-point user to form a new request and sent it again if the error can be resolved with a retry or a few changes. 

Each operation Response
{
    "cmHandle": "cmHandle-1"
    "operation": "CREATE" // This field can be used for grouping response if required
	"status": "FAILURE" // Can use the same structure to show success later on.
    "error-code": "01" // Only sent in the case of error
	"error-text" : "cmhandle already exist" // Only sent in the case of error 
}


Grouped Response Structure
{
    "createdCmHandles": [ 
		{
 			"cmHandle": "cmHandle-1"
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "01" // Only sent in the case of error
			"error-text" : "cmhandle already exist" // Only sent in the case of error
		}
	],
	"updatedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-2"
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "02" // Only sent in the case of error
			"error-text" : "cmhandle does not exist" // Only sent in the case of error
		}
	],
 	"deletedCmHandles": [ 
		{
 			"cmHandle": "cmHandle-3"
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "02" // Only sent in the case of error
			"error-text" : "cmhandle does not exist" // Only sent in the case of error
		}
	]
}


Response without grouping
{
    "operationResponse": [ 
		{
 			"cmHandle": "cmHandle-1",
		 	"operation": "CREATE",
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "01" // Only sent in the case of error
			"error-text" : "cmhandle already exist" // Only sent in the case of error
		},
		{
 			"cmHandle": "cmHandle-2"
		 	"operation": "UPDATE", 
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "02" // Only sent in the case of error
			"error-text" : "cmhandle does not exist" // Only sent in the case of error
		},
		{
 			"cmHandle": "cmHandle-3"
		 	"operation": "DELETE", 
    		"status": "FAILURE" // Can use the same structure to show success later on.
    		"error-code": "02" // Only sent in the case of error
			"error-text" : "cmhandle does not exist" // Only sent in the case of error
		}
	]
}


Expected Error per operations

Input Issues

  1. Multiple operations for a single cm-handle: 
  2. Input is not in the correct format: For example, if the user has not defined the "cm-handle"
Create CMHanldes
  1. cm-handle already exist
  2. unknown-error
Update CMHandles
  1. cm-handle does not exist
  2. unknown-error
Update CMHandles
  1. cm-handle does not exist: No error 
  2. unknown-error


  • No labels