company logo

PUT Query

The PUT query is an elementary way for creating new instances and usually not able to execute related requirements. When, however, a method has been implemented for creating a new person, which automatically creates a new person identifier, one could also call the implemented method:

In contrast to PUT request, an QUERY PUT request allows creating a single instance, only.

Create

In order to create a new instance, the following PUT request (query) could be defined (the field mapping is similar to an OSI request, but the query type differs):

Class/type

Query/variable

Source

Comment

Person/PUT

Create

Persons

Person collection

    name

name

Family name for person to be created

    firstname1

first_name(0)

First first names

    firstname2

first_name(1)

Second first name

    birth

birth_date

Person's birth date

    married

married

Marital status

    id

pid

Person's identifier

In order to assign values to the field names mapped, parameters with the same name have to be passed with the query HTTP GET request: The POST request generated from this mapping contains variable names preceded with '?'.

Test: http://localhost:2000/query/PUT/Person/Create?

      id=P1115&name=Hover&firstname1=Paul&firstname2=John&

      birth="1.1.1999"&married=true

PUT

user

pwd

/Persons

{

  name : ?name,

  first_name(0) : ?firstname1,

  first_name(1) : ?firstname2,

  birth_date : ?birth,

  married : ?married,

  pid : ?id }

Result

In case of success, the request returns an internal code 3 and a message:

{ code=3, message="Instance(s) created" }