Responses

Parameters

Name Type Description

status

object

mandatory even in success case and it is a global status code

int

please see Codes

string

please see Codes

messages

object array

mandatory with at least one message even for success. It can have multiple messages including error/info/success etc

string

object

int

please see Codes

string

please see Codes

data

object

return datas

int

only invoked and comes if count end point is used for request to call the service

string

optional and mandatory for success read case

int

total number of records in the database table according to the given filters criteria

object array

list of 30 (at max) objects where 30 is the page size given in request

exception

object

exception information

string

optional

object array

technical exception stack trace and not to display to user just for dev/admin

version

string

API version

threadName

string

thread name

requestTime

string

API request time

responseTime

string

API response time

Codes

HTTP Code statusCode description

200

0

INFO

200

1

SUCCESS

200

2

PARTIAL_SUCCESS

500

-1

WARNING

500

-2

ERROR

500

-3

FATAL

500

-4

SESSION_TIMEOUT

Example 1. 200 OK Response:
{
  "status": {
    "statusCode": 1,
    "statusLabel": "Success"
  },
  "messages": [],
  "exception": {},
  "data": {
    "well": {
      "totalRecords": 20,
      "list": [
        ...
      ]
    }
  },
  "version": "0.0.0.0A",
  "threadName": "**unknown_98969",
  "requestTime": "2020-06-05 08:20:54.511 +05:00",
  "responseTime": "2020-06-05 08:20:54.530 +05:00"
}
Example 2. 500 Internal Server Error Response sample
{
  "status": {
    "statusCode": -2,
    "statusLabel": "Error"
  },
  "messages": [
    {
      "message": "Business Object 'hello' is unknown.",
      "status": {
        "statusCode": -2,
        "statusLabel": "Error"
      }
    }
  ],
  "exception": {
    "message": "Business Object 'hello' is unknown.",
    "stackTrace": "com.lgc.dspdm.core.common.exception.DSPDMException: Business Object 'hello' is unknown..."
  },
  "data": {},
  "version": "0.0.0.0A",
  "threadName": "**unknown_44362",
  "requestTime": "2020-06-05 10:03:21.302 +05:00",
  "responseTime": "2020-06-05 10:03:21.304 +05:00"
}

400 Bad Request

When request is not forwarded to API, server will thrown this code, and it will throw a specific exception.