company logo

Request result (response)

Each request returns a JSON string with the syntax of values as response (syntax of values is described below in Values, formats and encoding). Most requests (except GET and OSI) simply return a string_value. In case of error, always a string_value is returned.

When terminating successfully, GET and OSI respond with an JSON object (see Values, formats and encoding) like:

{ name: values }

name - is the name of the source property (source) for the request defined in body (OSI) or location (other HTTP requests) .

values - Depending on the referenced property and type of request, the structure of values differs. Restrictions for values are described for each request type separately.

// get number of employees for first company

http://127.0.0.1:8888/Company/0/employees/count ==> JSON result:

{ count: "485" }

// Get person's children

http://127.0.0.1:1234/Persons/ID123/children ==> JSON result:

{ children: [

    { pid: "ID123" name: "Miller", first_name_0: "Paul",

      first_name: [ "Henry", "" ], birth_date: "1966-11-11", sex: "male",

      married: false, income: 2500.00, age: 52, children_income: 3807.22,

      notes: "this might be a very long text in C-string format\n",

      address: [ { url: LOID/12346127 } ],

      children: [

        { url: LOID/12346000 },

        { url: LOID/12346002 } ],

      parents: [ { url: LOID/12346001 } ],

      employee: [ ]

    },

    { ... next child instance .... }, ...

] }