1 # SONATA dummy gatekeeper API:
3 ## Upload a package (*.son) file:
5 To upload the file `simplest-example.son` do:
7 * `curl -i -X POST -F file=@simplest-example.son http://127.0.0.1:8000/api/packages/uploads`
9 To list all uploaded packages do:
11 * `curl http://127.0.0.1:8000/api/packages/uploads`
13 To instantiate (start) a service do:
15 * `curl -X POST http://127.0.0.1:8000/api/instantiations -d "{\"service_uuid\":\"59446b64-f941-40a8-b511-effb0512c21b\"}"`
17 To list all running services do:
19 * `curl http://127.0.0.1:8000/api/instantiations`
24 This page describes the dummy gatekeeper API. This gatekeeper fakes the original platform gatekeeper during development SDK tools like son-push.
26 It is also able to deploy our example service package (not any arbitrary service package!) in the emulator for the Y1 demo.
28 _Note: This API should converge to the API of the original GK as much as possible!_
40 <td>/api/packages/uploads</td>
43 <td>{file-content} as enctype=multipart/form-data</td>
44 <td>{"service_uuid": "c880aaab-f3b9-43ac-ac6b-3d27b46146b7", size=456, sha1=49ee6468dfa4ecbad440d669b249d523a38651be, error: null}</td>
47 <td>/api/packages/uploads</td>
51 <td>{service_uuid_list: ["c880aaab-f3b9-43ac-ac6b-3d27b46146b7", "c880aaab-f3b9-43ac-ac6b-3d27b46146b8", "c880aaab-f3b9-43ac-ac6b-3d27b46146b9"]}</td>
54 <td>/api/instantiations</td>
57 <td>{service_uuid: "c880aaab-f3b9-43ac-ac6b-3d27b46146b7"}</td>
58 <td>{service_instance_uuid: "de4567-f3b9-43ac-ac6b-3d27b461123"}</td>
61 <td>/api/instantiations</td>
65 <td>{service_instance_uuid_list: ["de4567-f3b9-43ac-ac6b-3d27b461123", "de4567-f3b9-43ac-ac6b-3d27b461124", "de4567-f3b9-43ac-ac6b-3d27b461125"]}</td>
69 ## Run REST API as part of the emulator:
71 * `sudo python src/emuvim/examples/sonata_y1_demo_topology_1.py`
73 ## Run REST API in standalone mode (without emulator):
75 * `sudo python src/emuvim/api/sonata/dummygatekeeper.py`