123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- @remote_url = http://localhost:9000
- @api_url = http://192.168.0.11:4000/store
- @exec_url = http://192.168.0.11:4000/execute
- @auth_url = http://192.168.0.11:4000/auth
- ### LIST
- GET {{api_url}}/boxId/ HTTP/1.1
- x-spc-host: {{remote_url}}
- ### CREATE FOO
- # @name createElem
- POST {{api_url}}/boxId/ HTTP/1.1
- content-type: application/json
- {
- "name": "foo"
- }
- ### CREATE BAR
- POST {{api_url}}/boxId/ HTTP/1.1
- content-type: application/json
- {
- "name": "bar"
- }
- ### LIST with limit, skip and sort
- GET {{api_url}}/boxId/?limit=2&sort=-name&skip=1&fields=name,_id HTTP/1.1
- ### GET
- @elemId = {{createElem.response.body.$._id}}
- GET {{api_url}}/boxId/{{elemId}} HTTP/1.1
- ### UPDATE
- @elemId = {{createElem.response.body.$._id}}
- PUT {{api_url}}/boxId/{{elemId}} HTTP/1.1
- content-type: application/json
- {
- "other": "baz"
- }
- ### DELETE
- @elemId = {{createElem.response.body.$._id}}
- DELETE {{api_url}}/boxId/{{elemId}} HTTP/1.1
- # With authentication ########################
- ### CREATE TIP
- # @name createElemKey
- POST {{api_url}}/boxId/?key=testkey HTTP/1.1
- content-type: application/json
- {
- "name": "tip"
- }
- ### UPDATE with good key
- @elemIdWithKey = {{createElemKey.response.body.$._id}}
- PUT {{api_url}}/boxId/{{elemIdWithKey}}?key=testkey HTTP/1.1
- content-type: application/json
- {
- "other": "baz"
- }
- ### UPDATE with bad key
- @elemIdWithKey = {{createElemKey.response.body.$._id}}
- PUT {{api_url}}/boxId/{{elemIdWithKey}}?key=badkey HTTP/1.1
- content-type: application/json
- {
- "other": "baz"
- }
- ### DELETE with bad key
- @elemIdWithKey = {{createElemKey.response.body.$._id}}
- DELETE {{api_url}}/boxId/{{elemIdWithKey}}?key=badkey HTTP/1.1
- ### DELETE with good key
- @elemIdWithKey = {{createElemKey.response.body.$._id}}
- DELETE {{api_url}}/boxId/{{elemIdWithKey}}?key=testkey HTTP/1.1
- # Execution module
- ### just get test
- GET {{exec_url}}/test/?param1=toto HTTP/1.1
- x-spc-host: http://localhost:9000
- # Auth module
- ### Get token
- POST {{auth_url}}/ HTTP/1.1
- {
- "userId": "test@yopmail.com"
- }
- ### LIST GAME
- GET {{api_url}}/game/ HTTP/1.1
- x-spc-host: {{remote_url}}
- ### just get test
- GET {{exec_url}}/test/?param1=toto HTTP/1.1
- x-spc-host: http://localhost:9000/
|