POST SUT Reservation Create Method

This method returns the newly created reservation.

Syntax:

POST /api/sut_reservation/create

Curl

$> curl 'http://localhost:8080/api/sut_reservation/create' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 'Content-Type: application/json' --data-binary '{"user_id":"590780914445534540190000","sut_id":"58c38f5d444553252cce0000","start_time":"2017-05-02T06:00:00+00:00","end_time":"2017-05-02T06:14:59+00:00"}'

OR

$> curl 'http://localhost:8080/api/sut_reservation/create' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 'Content-Type: application/json' --data-binary '{"user_id":"590780914445534540190000","sut_id":"58c38f5d444553252cce0000","start_in":0,"duration":600}'

Raw Request

POST /api/sut_reservation/create HTTP/1.1

Host: localhost:8080

Authorization: Basic YWRtaW46YWRtaW4=

Content-Type: application/json

Content-Length: 154

 

{"user_id":"590780914445534540190000","sut_id":"58c38f5d444553252cce0000","start_time":"2017-05-02T06:00:00+00:00","end_time":"2017-05-02T06:14:59+00:00"}

OR

POST /api/sut_reservation/create HTTP/1.1

Host: localhost:8080

Authorization: Basic YWRtaW46YWRtaW4=

Content-Type: application/json

Content-Length: 102

 

{"user_id":"590780914445534540190000","sut_id":"58c38f5d444553252cce0000","start_in":0,"duration":600}

Write Keys

Parameter Type
start_time DateTime
end_time DateTime
user_id Id
sut_id Id
start_in
duration

Response Body

{

"_id": "59081ff34445534540450000",

"created_at": "2017-05-02T05:58:11.425Z",

"updated_at": "2017-05-02T05:58:11.425Z",

"start_time": "2017-05-02T06:00:00+00:00",

"end_time": "2017-05-02T06:15:00+00:00",

"user_id": "590780914445534540190000",

"sut_id": "58c38f5d444553252cce0000",

"listen_port": 5903

}

OR

{

"_id": "5908210b44455345404f0000",

"created_at": "2017-05-02T06:02:51.400Z",

"updated_at": "2017-05-02T06:02:51.400Z",

"start_time": "2017-05-02T06:00:00+00:00",

"end_time": "2017-05-02T06:15:00+00:00",

"user_id": "590780914445534540190000",

"sut_id": "58c38f5d444553252cce0000",

"listen_port": 5903

}

 

This topic was last updated on June 21, 2019, at 02:49:49 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant