blob: fbd11f9810e6489016a0b043ecc32f666d58be3e [file] [log] [blame]
Teone620bafd2016-04-18 14:39:41 -07001FORMAT: 1A
2
3# XOS
4
5
Matteo Scandolod5f3d052016-05-02 15:29:37 -07006# Group Utility
7
8List of the XOS Utility API
Matteo Scandolob727cba2016-07-26 15:59:41 -07009
10
Matteo Scandolod5f3d052016-05-02 15:29:37 -070011## Login [/api/utility/login/]
12
13### Log a user in the system [POST]
14
15+ Request (application/json)
16
17 {
18 "username": "padmin@vicci.org",
19 "password": "letmein"
20 }
21
22+ Response 200 (application/json)
23
24 {
25 "xoscsrftoken":"xuvsRC1jkXAsnrdRlgJvcXpmtthTAqqf",
26 "xossessionid":"7ds5a3wzjlgbjqo4odkd25qsm0j2s6zg",
27 "user": "{\"policed\": null, \"site\": 3, \"is_appuser\": false, \"is_staff\": true, \"backend_status\": \"Provisioning in progress\", \"id\": 3, \"is_registering\": false, \"last_login\": \"2016-04-30T22:51:04.788675+00:00\", \"email\": \"padmin@vicci.org\", \"no_sync\": false, \"username\": \"padmin@vicci.org\", \"dashboards\": [11], \"login_page\": null, \"firstname\": \"XOS\", \"user_url\": null, \"deleted\": false, \"lastname\": \"admin\", \"is_active\": true, \"lazy_blocked\": false, \"phone\": null, \"is_admin\": true, \"enacted\": null, \"public_key\": null, \"is_readonly\": false, \"no_policy\": false, \"write_protect\": false}"
28 }
29
30## Logout [/api/utility/logout/]
31
32### Log a user out of the system [POST]
33
34+ Request (application/json)
Matteo Scandolod74b9c62016-07-07 14:56:48 -070035
36 {
37 "xossessionid": "sessionId"
38 }
Matteo Scandolod5f3d052016-05-02 15:29:37 -070039
40+ Response 200 (application/json)
41
Matteo Scandolod74b9c62016-07-07 14:56:48 -070042## Port Forwarding [/api/utility/portforwarding/]
43
44Contains the set of port forwarding mappings for each compute node.
45Used on OpenCloud to setup port forwarding for nat-net.
46
47### List port forwarding objects [GET]
48
49+ Response 200 (application/json)
50
51 [
52 {
53 "id": 79,
54 "ip": "172.16.0.36",
55 "ports": "tcp 2222, tcp 25566",
56 "hostname": "node1.opencloud.us"
57 },
58 {
59 "id": 131,
60 "ip": "172.16.0.16",
61 "ports": "udp 53, tcp 8017",
62 "hostname": "node2.opencloud.us"
63 }
64 ]
65
66## Slices Plus [/api/utility/slicesplus/]
67
68A list of slices with addictional information, it is used in the Tenant custom dashboard.
69
70### List Slices objects [GET]
71
72+ Response 200 (application/json)
73
74 [
75 {
76 "humanReadableName": "mysite_management",
77 "id": 2,
78 "created": "2016-06-29T18:43:50.730912Z",
79 "updated": "2016-06-29T18:43:50.730789Z",
80 "enacted": null,
81 "name": "mysite_management",
82 "enabled": true,
83 "omf_friendly": false,
84 "description": "",
85 "slice_url": "",
86 "site": 2,
87 "max_instances": 10,
88 "service": null,
89 "network": "noauto",
90 "mount_data_sets": "GenBank",
91 "default_image": null,
92 "default_flavor": null,
93 "serviceClass": null,
94 "creator": 2,
95 "networks": [],
96 "network_ports": "",
97 "backendIcon": "/static/admin/img/icon_clock.gif",
98 "backendHtml": "<span title=\"Pending sync, last_status = 0 - Provisioning in progress\"><img src=\"/static/admin/img/icon_clock.gif\"></span>",
99 "current_user_roles": [],
100 "instance_distribution": {},
101 "instance_distribution_ready": {},
102 "instance_total": 0,
103 "instance_total_ready": 0,
104 "instance_status": {},
105 "users": [],
106 "user_names": [],
107 "current_user_can_see": true
108 }
109 ]
110
111## Synchronizer [/api/utility/synchronizer/]
112
113Lists the Diag objects for synchronizers. From here you can get the synchronizer status.
114
115### List Diag objects [GET]
116
117+ Response 200 (application/json)
118
119 [
120 {
121 "id": 3,
122 "name": "onboarding",
123 "backend_status": "1 - Bottom Of Loop",
124 "backend_register": "{\"last_duration\": 0.18996095657348633, \"last_run\": 1467923907.908469}"
125 }
126 ]
127
128## Onboarding [/api/utility/onboarding/{service}/ready]
129
130Used to get the status of onboarding, to determine if services have been to successfully onboarded and if the XOS UI container has been built.
131
132### Get service status [GET]
133
134+ Parameters
135 + service: services/vsg (string) - Name of the service to wait for
136
137
138+ Response 200 (text/plain)
139
140 true
141
142## Tosca [/api/utility/tosca/run/]
143
144### Load a Tosca recipe [POST]
145
146+ Request (application/json)
147
148 {
149 "recipe": "tosca_definitions_version: tosca_simple_yaml_1_0\n\ndescription: Onboard the exampleservice\n\nimports:\n - custom_types/xos.yaml\n\ntopology_template:\n node_templates:\n test_site:\n type: tosca.nodes.Site\n properties:\n display_name: Test Site\n site_url: https://www.onlab.us/"
150 }
151
152+ Response 200 (application/json)
153
154 {
155 "log_msgs":[
156 "ordered_names: ['test_site']",
157 "Created Site 'Test Site'"
158 ]
159 }
160
161## Ssh Keys [/api/utility/sshkeys/]
162
163Returns the set of ssh keys for instances. Used on OpenCloud to configure ssh-proxy to instances.
164
165### List ssh keys by instance [GET]
166
167+ Response 200 (application/json)
168
169 [
170 {
171 "id": "instance-00000001",
172 "public_keys": [
173 "ssh-rsa xxyyzz\r\n"
174 ],
175 "node_name": "node1.opencloud.us"
176 },
177 {
178 "id": "instance-00000001",
179 "public_keys": [
180 "ssh-rsa xxyyzz\r\n"
181 ],
182 "node_name": "node2.opencloud.us"
183 }
184 ]
Matteo Scandolod5f3d052016-05-02 15:29:37 -0700185
186
Matteo Scandolob727cba2016-07-26 15:59:41 -0700187# Group Tenant
188
189
190## Subscribers [/api/tenant/cord/subscriber/{subscriber_id}/]
Teone620bafd2016-04-18 14:39:41 -0700191
192Resource related to the CORD Subscribers.
193
Teone620bafd2016-04-18 14:39:41 -0700194### List All Subscribers [GET]
195
196+ Response 200 (application/json)
197
198 [
199 {
200 "humanReadableName": "cordSubscriber-1",
201 "id": 1,
202 "features": {
203 "cdn": false,
204 "uplink_speed": 1000000000,
205 "downlink_speed": 1000000000,
206 "uverse": false,
207 "status": "enabled"
208 },
209 "identity": {
210 "account_num": "123",
211 "name": "My House"
212 },
213 "related": {
214 "instance_name": "mysite_vcpe",
215 "vsg_id": 4,
216 "compute_node_name": "node2.opencloud.us",
217 "c_tag": "432",
218 "instance_id": 1,
219 "wan_container_ip": null,
220 "volt_id": 3,
221 "s_tag": "222"
222 }
223 }
224 ]
225
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700226
227### View a Subscriber Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700228
229+ Parameters
230 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
231
Teone620bafd2016-04-18 14:39:41 -0700232+ Response 200 (application/json)
233
234 {
235 "humanReadableName": "cordSubscriber-1",
236 "id": 1,
237 "features": {
238 "cdn": false,
239 "uplink_speed": 1000000000,
240 "downlink_speed": 1000000000,
241 "uverse": false,
242 "status": "enabled"
243 },
244 "identity": {
245 "account_num": "123",
246 "name": "My House"
247 },
248 "related": {
249 "instance_name": "mysite_vcpe",
250 "vsg_id": 4,
251 "compute_node_name": "node2.opencloud.us",
252 "c_tag": "432",
253 "instance_id": 1,
254 "wan_container_ip": null,
255 "volt_id": 3,
256 "s_tag": "222"
257 }
258 }
259
260### Delete a Subscriber [DELETE]
261
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700262+ Parameters
263 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
264
Teone620bafd2016-04-18 14:39:41 -0700265+ Response 204
266
267### Subscriber features [/api/tenant/cord/subscriber/{subscriber_id}/features/]
268
269+ Parameters
270 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
271
272### View a Subscriber Features Detail [GET]
273
274+ Response 200 (application/json)
275
276 {
277 "cdn": false,
278 "uplink_speed": 1000000000,
279 "downlink_speed": 1000000000,
280 "uverse": true,
281 "status": "enabled"
282 }
283
284#### Subscriber features uplink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/uplink_speed/]
285
286+ Parameters
287 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
288
289#### Read Subscriber uplink_speed [GET]
290
291+ Response 200 (application/json)
292
293 {
294 "uplink_speed": 1000000000
295 }
296
297#### Update Subscriber uplink_speed [PUT]
298
299+ Request 200 (application/json)
300
301 {
302 "uplink_speed": 1000000000
303 }
304
305+ Response 200 (application/json)
306
307 {
308 "uplink_speed": 1000000000
309 }
310
311#### Subscriber features downlink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/downlink_speed/]
312
313+ Parameters
314 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
315
316#### Read Subscriber downlink_speed [GET]
317
318+ Response 200 (application/json)
319
320 {
321 "downlink_speed": 1000000000
322 }
323
324#### Update Subscriber downlink_speed [PUT]
325
326+ Request 200 (application/json)
327
328 {
329 "downlink_speed": 1000000000
330 }
331
332+ Response 200 (application/json)
333
334 {
335 "downlink_speed": 1000000000
336 }
337
338#### Subscriber features cdn [/api/tenant/cord/subscriber/{subscriber_id}/features/cdn/]
339
340+ Parameters
341 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
342
343#### Read Subscriber cdn [GET]
344
345+ Response 200 (application/json)
346
347 {
348 "cdn": false
349 }
350
351#### Update Subscriber cdn [PUT]
352
353+ Request 200 (application/json)
354
355 {
356 "cdn": false
357 }
358
359+ Response 200 (application/json)
360
361 {
362 "cdn": false
363 }
364
365#### Subscriber features uverse [/api/tenant/cord/subscriber/{subscriber_id}/features/uverse/]
366
367+ Parameters
368 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
369
370#### Read Subscriber uverse [GET]
371
372+ Response 200 (application/json)
373
374 {
375 "uverse": false
376 }
377
378#### Update Subscriber uverse [PUT]
379
380+ Request 200 (application/json)
381
382 {
383 "uverse": false
384 }
385
386+ Response 200 (application/json)
387
388 {
389 "uverse": false
390 }
391
392#### Subscriber features status [/api/tenant/cord/subscriber/{subscriber_id}/features/status/]
393
394+ Parameters
395 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
396
397#### Read Subscriber status [GET]
398
399+ Response 200 (application/json)
400
401 {
402 "status": "enabled"
403 }
404
405#### Update Subscriber status [PUT]
406
407+ Request 200 (application/json)
408
409 {
410 "status": "enabled"
411 }
412
413+ Response 200 (application/json)
414
415 {
416 "status": "enabled"
417 }
418
419
Matteo Scandolob727cba2016-07-26 15:59:41 -0700420## Truckroll Collection [/api/tenant/truckroll/{truckroll_id}/]
Teone620bafd2016-04-18 14:39:41 -0700421
422Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
423
Teone620bafd2016-04-18 14:39:41 -0700424### List all Truckroll [GET]
425
426+ Response 200 (application/json)
427
428 [
429 {
430 "humanReadableName": "vTR-tenant-9",
431 "id": 9,
432 "provider_service": 6,
433 "target_id": 2,
434 "scope": "container",
435 "test": "ping",
436 "argument": "8.8.8.8",
437 "result": "",
438 "result_code": "",
439 "is_synced": false,
440 "backend_status": "2 - Exception('Unreachable results in ansible recipe',)"
441 }
442 ]
443
444### Create a Truckroll [POST]
445
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700446A virtual truckroll is complete once is_synced equal true
447
Teone620bafd2016-04-18 14:39:41 -0700448+ Request (application/json)
449
450 {
451 "target_id": 2,
452 "scope": "container",
453 "test": "ping",
454 "argument": "8.8.8.8"
455 }
456
457+ Response 201 (application/json)
458
459 {
460 "humanReadableName": "vTR-tenant-1",
461 "id": 1,
462 "provider_service": 6,
463 "target_id": 2,
464 "scope": "container",
465 "test": "ping",
466 "argument": "8.8.8.8",
467 "result": null,
468 "result_code": null,
469 "is_synced": false,
470 "backend_status": "0 - Provisioning in progress"
471 }
472
Teone620bafd2016-04-18 14:39:41 -0700473
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700474### View a Truckroll Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700475
476+ Parameters
477 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
478
Teone620bafd2016-04-18 14:39:41 -0700479+ Response 200 (application/json)
480
481 {
482 "humanReadableName": "vTR-tenant-10",
483 "id": 10,
484 "provider_service": 6,
485 "target_id": 2,
486 "scope": "container",
487 "test": "ping",
488 "argument": "8.8.8.8",
489 "result": null,
490 "result_code": null,
491 "is_synced": false,
492 "backend_status": "0 - Provisioning in progress"
493 }
494
495### Delete a Truckroll Detail [DELETE]
496
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700497+ Parameters
498 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
499
Teone620bafd2016-04-18 14:39:41 -0700500+ Response 204
501
502
503
Matteo Scandolob727cba2016-07-26 15:59:41 -0700504## vOLT Collection [/api/tenant/cord/volt/{volt_id}/]
Teone620bafd2016-04-18 14:39:41 -0700505
506OLT devices aggregate a set of subscriber connections
507
Teone620bafd2016-04-18 14:39:41 -0700508### List all vOLT [GET]
509
510+ Response 200 (application/json)
511
512 [
513 {
514 "humanReadableName": "vOLT-tenant-1",
515 "id": 1,
516 "service_specific_id": "123",
517 "s_tag": "222",
518 "c_tag": "432",
519 "subscriber": 1,
520 "related": {
521 "instance_id": 1,
522 "instance_name": "mysite_vcpe",
523 "vsg_id": 4,
524 "wan_container_ip": null,
525 "compute_node_name": "node2.opencloud.us"
526 }
527 }
528 ]
529
530### Create a vOLT [POST]
531
532+ Request (application/json)
533
534 {
535 "s_tag": "222",
536 "c_tag": "432",
537 "subscriber": 1
538 }
539
540+ Response 201 (application/json)
541
542 {
543 "humanReadableName": "vOLT-tenant-1",
544 "id": 1,
545 "service_specific_id": "123",
546 "s_tag": "222",
547 "c_tag": "432",
548 "subscriber": 1,
549 "related": {
550 "instance_id": 1,
551 "instance_name": "mysite_vcpe",
552 "vsg_id": 4,
553 "wan_container_ip": null,
554 "compute_node_name": "node2.opencloud.us"
555 }
556 }
557
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700558### View a vOLT Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700559
560+ Parameters
561 + volt_id: 1 (number) - ID of the vOLT in the form of an integer
562
Teone620bafd2016-04-18 14:39:41 -0700563+ Response 200 (application/json)
564
565 {
566 "humanReadableName": "vOLT-tenant-1",
567 "id": 1,
568 "service_specific_id": "123",
569 "s_tag": "222",
570 "c_tag": "432",
571 "subscriber": 1,
572 "related": {
573 "instance_id": 1,
574 "instance_name": "mysite_vcpe",
575 "vsg_id": 4,
576 "wan_container_ip": null,
577 "compute_node_name": "node2.opencloud.us"
578 }
579 }
580
581
582
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700583## ONOS App Collection [/api/tenant/onos/app/]
Teone620bafd2016-04-18 14:39:41 -0700584
585### List all apps [GET]
586
587+ Response 200 (application/json)
588
589 [
590 {
591 "humanReadableName": "onos-tenant-7",
592 "id": 7,
593 "name": "vBNG_ONOS_app",
594 "dependencies": "org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd"
595 }
Matteo Scandolob727cba2016-07-26 15:59:41 -0700596 ]
597
598
599# Group Service
600
601
602## Example Services Collection [/api/service/exampleservice/]
603
604### List all Example Services [GET]
605
606+ Response 200 (application/json)
607
608 [
609 {
610 "humanReadableName": "MyExample",
611 "id": 1,
612 "service_message": "This is the test message"
613 }
614 ]
615
616
617
618## ONOS Services Collection [/api/service/onos/]
619
620List of the active onos services
621
622### List all ONOS Services [GET]
623
624+ Response 200 (application/json)
625
626 [
627 {
628 "humanReadableName": "service_ONOS_vBNG",
629 "id": 5,
630 "rest_hostname": "",
631 "rest_port": "8181",
632 "no_container": false,
633 "node_key": ""
634 }
635 ]
636
637
638## vSG Collection [/api/service/vsg/]
639
640### List all vSGs [GET]
641
642+ Response 200 (application/json)
643
644 [
645 {
646 "humanReadableName": "service_vsg",
647 "id": 2,
648 "dns_servers": "8.8.8.8",
649 "url_filter_kind": null,
650 "node_label": null
651 }
652 ]
653
654
655# Group Core
656
657List of the XOS Core API
658
659
660## Deployments [/api/core/deployments/{id}/]
661
662List of the XOS deployments
663
664### List all deployments [GET]
665
666+ Response 200 (application/json)
667
668 [
669 {
670 "humanReadableName": "MyDeployment",
671 "id": 1,
672 "created": "2016-04-29T16:19:03.549901Z",
673 "updated": "2016-04-29T16:19:05.624151Z",
674 "enacted": null,
675 "policed": null,
676 "backend_register": "{}",
677 "backend_status": "0 - Provisioning in progress",
678 "deleted": false,
679 "write_protect": false,
680 "lazy_blocked": false,
681 "no_sync": true,
682 "name": "MyDeployment",
683 "accessControl": "allow all",
684 "images": [
685 "1"
686 ],
687 "sites": [
688 "1"
689 ],
690 "flavors": [
691 "1",
692 "2",
693 "3"
694 ],
695 "dashboardviews": [
696 "1"
697 ]
698 }
699 ]
700
701### Create a deployment [POST]
702
703+ Request (application/json)
704
705 {
706 "humanReadableName": "MyDeployment",
707 }
708
709+ Response 200 (application/json)
710
711 {
712 "humanReadableName": "MyDeployment",
713 "id": 1,
714 "created": "2016-04-29T16:19:03.549901Z",
715 "updated": "2016-04-29T16:19:05.624151Z",
716 "enacted": null,
717 "policed": null,
718 "backend_register": "{}",
719 "backend_status": "0 - Provisioning in progress",
720 "deleted": false,
721 "write_protect": false,
722 "lazy_blocked": false,
723 "no_sync": true,
724 "name": "MyDeployment",
725 "accessControl": "allow all",
726 "images": [
727 "1"
728 ],
729 "sites": [
730 "1"
731 ],
732 "flavors": [
733 "1",
734 "2",
735 "3"
736 ],
737 "dashboardviews": [
738 "1"
739 ]
740 }
741
742### View a Deployment Detail [GET]
743
744+ Parameters
745 + id: 1 (number) - ID of the Deployment in the form of an integer
746
747+ Response 200 (application/json)
748
749 {
750 "humanReadableName": "MyDeployment",
751 "id": 1,
752 "created": "2016-04-27T21:46:57.354544Z",
753 "updated": "2016-04-27T21:47:05.221720Z",
754 "enacted": null,
755 "policed": null,
756 "backend_register": "{}",
757 "backend_status": "0 - Provisioning in progress",
758 "deleted": false,
759 "write_protect": false,
760 "lazy_blocked": false,
761 "no_sync": true,
762 "name": "MyDeployment",
763 "accessControl": "allow all",
764 "images": [],
765 "sites": [
766 "1"
767 ],
768 "flavors": [
769 "3",
770 "2",
771 "1"
772 ],
773 "dashboardviews": [
774 "3"
775 ]
776 }
777
778### Delete a Deployment [DELETE]
779
780+ Parameters
781 + id: 1 (number) - ID of the Deployment in the form of an integer
782
783+ Response 204
784
785
786## Flavors [/api/core/flavors/{id}/]
787
788List of the XOS flavors
789
790### List all flavors [GET]
791
792+ Response 200 (application/json)
793
794 [
795 {
796 "humanReadableName": "m1.large",
797 "id": 1,
798 "created": "2016-04-29T16:19:01.979548Z",
799 "updated": "2016-04-29T16:19:03.568238Z",
800 "enacted": null,
801 "policed": null,
802 "backend_register": "{}",
803 "backend_status": "0 - Provisioning in progress",
804 "deleted": false,
805 "write_protect": false,
806 "lazy_blocked": false,
807 "no_sync": true,
808 "name": "m1.large",
809 "description": null,
810 "flavor": "m1.large",
811 "order": 0,
812 "default": false,
813 "deployments": [
814 "1"
815 ]
816 }
817 ]
818
819### Create a Flavor [POST]
820
821+ Request (application/json)
822
823 {
824 "humanReadableName": "mq.test",
825 }
826
827+ Response 200 (application/json)
828
829 {
830 "humanReadableName": "m1.large",
831 "id": 1,
832 "created": "2016-04-29T16:19:01.979548Z",
833 "updated": "2016-04-29T16:19:03.568238Z",
834 "enacted": null,
835 "policed": null,
836 "backend_register": "{}",
837 "backend_status": "0 - Provisioning in progress",
838 "deleted": false,
839 "write_protect": false,
840 "lazy_blocked": false,
841 "no_sync": true,
842 "name": "m1.large",
843 "description": null,
844 "flavor": "m1.large",
845 "order": 0,
846 "default": false,
847 "deployments": [
848 "1"
849 ]
850 }
851
852### View a Flavors Detail [GET]
853
854+ Parameters
855 + id: 1 (number) - ID of the Flavors in the form of an integer
856
857+ Response 200 (application/json)
858
859 {
860 "humanReadableName": "m1.large",
861 "id": 1,
862 "created": "2016-04-29T16:19:01.979548Z",
863 "updated": "2016-04-29T16:19:03.568238Z",
864 "enacted": null,
865 "policed": null,
866 "backend_register": "{}",
867 "backend_status": "0 - Provisioning in progress",
868 "deleted": false,
869 "write_protect": false,
870 "lazy_blocked": false,
871 "no_sync": true,
872 "name": "m1.large",
873 "description": null,
874 "flavor": "m1.large",
875 "order": 0,
876 "default": false,
877 "deployments": [
878 "1"
879 ]
880 }
881
882### Delete a Flavors Detail [DELETE]
883
884+ Parameters
885 + id: 1 (number) - ID of the Flavors in the form of an integer
886
887+ Response 204
888
889
890## Instances Collection [/api/core/instances/{?no_hyperlinks}]
891
892 + no_hyperlinks (number, optional) - Wheter to return relation with links or ids
893 + Default: `0`
894
895### List all Instances [GET]
896
897+ Response 200 (application/json)
898
899 [
900 {
901 "id": 1,
902 "humanReadableName": "uninstantiated-1",
903 "created": "2016-04-26T00:36:22.465259Z",
904 "updated": "2016-04-26T00:36:22.465288Z",
905 "enacted": null,
906 "policed": null,
907 "backend_register": "{}",
908 "backend_status": "0 - Provisioning in progress",
909 "deleted": false,
910 "write_protect": false,
911 "lazy_blocked": false,
912 "no_sync": false,
913 "instance_id": null,
914 "instance_uuid": null,
915 "name": "mysite_vcpe",
916 "instance_name": null,
917 "ip": null,
918 "image": "1",
919 "creator": "1",
920 "slice": "1",
921 "deployment": "1",
922 "node": "1",
923 "numberCores": 0,
924 "flavor": "1",
925 "userData": null,
926 "isolation": "vm",
927 "volumes": "/etc/dnsmasq.d,/etc/ufw",
928 "parent": null,
929 "networks": [
930 "1"
931 ]
932 }
933 ]
934
935### Create an Instance [POST]
936
937+ Parameters
938 + no_hyperlinks: 1
939
940+ Request (application/json)
941
942 {
943 "name": "test-instance",
944 "image": 1,
945 "slice": 1,
946 "deployment": 1,
947 "node": 1
948 }
949
950+ Response 200 (application/json)
951
952 {
953 "id": 1,
954 "humanReadableName": "uninstantiated-1",
955 "created": "2016-04-26T00:36:22.465259Z",
956 "updated": "2016-04-26T00:36:22.465288Z",
957 "enacted": null,
958 "policed": null,
959 "backend_register": "{}",
960 "backend_status": "0 - Provisioning in progress",
961 "deleted": false,
962 "write_protect": false,
963 "lazy_blocked": false,
964 "no_sync": false,
965 "instance_id": null,
966 "instance_uuid": null,
967 "name": "test-instance",
968 "instance_name": null,
969 "ip": null,
970 "image": "1",
971 "creator": "1",
972 "slice": "1",
973 "deployment": "1",
974 "node": "1",
975 "numberCores": 0,
976 "flavor": "1",
977 "userData": null,
978 "isolation": "vm",
979 "volumes": "/etc/dnsmasq.d,/etc/ufw",
980 "parent": null,
981 "networks": [
982 "1"
983 ]
984 }
985
986## Instances Detail [/api/core/instances/{id}/]
987
988### Get instance details [GET]
989
990+ Parameters
991 + id: 1 (number) - ID of the Instance in the form of an integer
992
993+ Response 200 (application/json)
994
995 {
996 "id": 1,
997 "humanReadableName": "uninstantiated-1",
998 "created": "2016-04-26T00:36:22.465259Z",
999 "updated": "2016-04-26T00:36:22.465288Z",
1000 "enacted": null,
1001 "policed": null,
1002 "backend_register": "{}",
1003 "backend_status": "0 - Provisioning in progress",
1004 "deleted": false,
1005 "write_protect": false,
1006 "lazy_blocked": false,
1007 "no_sync": false,
1008 "instance_id": null,
1009 "instance_uuid": null,
1010 "name": "mysite_vcpe",
1011 "instance_name": null,
1012 "ip": null,
1013 "image": "1",
1014 "creator": "1",
1015 "slice": "1",
1016 "deployment": "1",
1017 "node": "1",
1018 "numberCores": 0,
1019 "flavor": "1",
1020 "userData": null,
1021 "isolation": "vm",
1022 "volumes": "/etc/dnsmasq.d,/etc/ufw",
1023 "parent": null,
1024 "networks": [
1025 "1"
1026 ]
1027 }
1028
1029### Delete instance [DELETE]
1030
1031+ Parameters
1032 + id: 1 (number) - ID of the Instance in the form of an integer
1033
1034+ Response 204
1035
1036
1037## Nodes [/api/core/nodes/{id}/]
1038
1039### List all nodes [GET]
1040
1041+ Response 200 (application/json)
1042
1043 [
1044 {
1045 "humanReadableName": "node2.opencloud.us",
1046 "id": 1,
1047 "created": "2016-04-29T16:19:05.661567Z",
1048 "updated": "2016-04-29T16:19:05.661454Z",
1049 "enacted": null,
1050 "policed": null,
1051 "backend_register": "{}",
1052 "backend_status": "0 - Provisioning in progress",
1053 "deleted": false,
1054 "write_protect": false,
1055 "lazy_blocked": false,
1056 "no_sync": true,
1057 "name": "node2.opencloud.us",
1058 "site_deployment": "1",
1059 "site": "1",
1060 "nodelabels": []
1061 }
1062 ]
1063
1064
1065
1066## Services [/api/core/services/{id}/]
1067
1068### List all Services [GET]
1069
1070+ Response 200 (application/json)
1071
1072 [
1073 {
1074 "humanReadableName": "MyService",
1075 "id": 1,
1076 "created": "2016-05-05T23:06:33.835277Z",
1077 "updated": "2016-05-05T23:06:33.835302Z",
1078 "enacted": null,
1079 "policed": null,
1080 "backend_register": "{}",
1081 "backend_status": "0 - Provisioning in progress",
1082 "deleted": false,
1083 "write_protect": false,
1084 "lazy_blocked": false,
1085 "no_sync": false,
1086 "no_policy": false,
1087 "description": null,
1088 "enabled": true,
1089 "kind": "vROUTER",
1090 "name": "MyService",
1091 "versionNumber": null,
1092 "published": true,
1093 "view_url": "/admin/vrouter/vrouterservice/$id$/",
1094 "icon_url": null,
1095 "public_key": null,
1096 "private_key_fn": null,
1097 "service_specific_id": null,
1098 "service_specific_attribute": null
1099 }
1100 ]
1101
1102### Create a Service [POST]
1103
1104+ Request (application/json)
1105
1106 {
1107 "name": "MyService",
1108 "kind": "vROUTER"
1109 }
1110
1111+ Response 200 (application/json)
1112
1113 {
1114 "humanReadableName": "MyService",
1115 "id": 1,
1116 "created": "2016-05-05T23:06:33.835277Z",
1117 "updated": "2016-05-05T23:06:33.835302Z",
1118 "enacted": null,
1119 "policed": null,
1120 "backend_register": "{}",
1121 "backend_status": "0 - Provisioning in progress",
1122 "deleted": false,
1123 "write_protect": false,
1124 "lazy_blocked": false,
1125 "no_sync": false,
1126 "no_policy": false,
1127 "description": null,
1128 "enabled": true,
1129 "kind": "vROUTER",
1130 "name": "MyService",
1131 "versionNumber": null,
1132 "published": true,
1133 "view_url": "/admin/vrouter/vrouterservice/$id$/",
1134 "icon_url": null,
1135 "public_key": null,
1136 "private_key_fn": null,
1137 "service_specific_id": null,
1138 "service_specific_attribute": null
1139 }
1140
1141### View a Service Detail [GET]
1142
1143+ Parameters
1144 + id: 1 (number) - ID of the Service in the form of an integer
1145
1146+ Response 200 (application/json)
1147
1148 {
1149 "humanReadableName": "MyService",
1150 "id": 1,
1151 "created": "2016-05-05T23:06:33.835277Z",
1152 "updated": "2016-05-05T23:06:33.835302Z",
1153 "enacted": null,
1154 "policed": null,
1155 "backend_register": "{}",
1156 "backend_status": "0 - Provisioning in progress",
1157 "deleted": false,
1158 "write_protect": false,
1159 "lazy_blocked": false,
1160 "no_sync": false,
1161 "no_policy": false,
1162 "description": null,
1163 "enabled": true,
1164 "kind": "vROUTER",
1165 "name": "MyService",
1166 "versionNumber": null,
1167 "published": true,
1168 "view_url": "/admin/vrouter/vrouterservice/$id$/",
1169 "icon_url": null,
1170 "public_key": null,
1171 "private_key_fn": null,
1172 "service_specific_id": null,
1173 "service_specific_attribute": null
1174 }
1175
1176### Delete a Service [DELETE]
1177
1178+ Parameters
1179 + id: 1 (number) - ID of the Service in the form of an integer
1180
1181+ Response 204
1182
1183
1184
1185## Sites [/api/core/sites/{id}/]
1186
1187### List all sites [GET]
1188
1189+ Response 200 (application/json)
1190
1191 {
1192 "humanReadableName": "mysite",
1193 "id": 1,
1194 "created": "2016-04-29T16:19:03.587770Z",
1195 "updated": "2016-04-29T16:19:05.651933Z",
1196 "enacted": null,
1197 "policed": null,
1198 "backend_register": "{}",
1199 "backend_status": "0 - Provisioning in progress",
1200 "deleted": false,
1201 "write_protect": false,
1202 "lazy_blocked": false,
1203 "no_sync": false,
1204 "name": "MySite",
1205 "site_url": "http://opencord.us/",
1206 "enabled": true,
1207 "hosts_nodes": true,
1208 "hosts_users": true,
1209 "location": null,
1210 "longitude": null,
1211 "latitude": null,
1212 "login_base": "mysite",
1213 "is_public": true,
1214 "abbreviated_name": "",
1215 "deployments": [
1216 "1"
1217 ]
1218 }
1219
1220
1221## Slices [/api/core/slices/{id}/]
1222
1223List of the XOS slices
1224
1225### List all slices [GET]
1226
1227+ Response 200 (application/json)
1228
1229 [
1230 {
1231 "humanReadableName": "mysite_slice",
1232 "id": 1,
1233 "created": "2016-04-29T16:23:22.505072Z",
1234 "updated": "2016-04-29T16:23:22.504691Z",
1235 "enacted": null,
1236 "policed": "2016-04-29T16:23:22.781298Z",
1237 "backend_register": "{}",
1238 "backend_status": "0 - Provisioning in progress",
1239 "deleted": false,
1240 "write_protect": false,
1241 "lazy_blocked": false,
1242 "no_sync": false,
1243 "name": "mysite_slice",
1244 "enabled": true,
1245 "omf_friendly": false,
1246 "description": "",
1247 "slice_url": "",
1248 "site": "http://apt118.apt.emulab.net/api/core/sites/1/",
1249 "max_instances": 10,
1250 "service": null,
1251 "network": null,
1252 "exposed_ports": null,
1253 "serviceClass": "http://apt118.apt.emulab.net/api/core/serviceclasses/1/",
1254 "creator": "http://apt118.apt.emulab.net/api/core/users/1/",
1255 "default_flavor": null,
1256 "default_image": null,
1257 "mount_data_sets": "GenBank",
1258 "default_isolation": "vm",
1259 "networks": [
1260 "http://apt118.apt.emulab.net/api/core/networks/1/"
1261 ]
1262 }
1263 ]
1264
1265
1266
1267## Users [/api/core/users/{id}/]
1268
1269### List all Users [GET]
1270
1271+ Response 200 (application/json)
1272
1273 [
1274 {
1275 "id": 2,
1276 "password": "pbkdf2_sha256$12000$9gn8DmZuIoz2$YPQkx3AOOV7jZNYr2ddrgUCkiuaPpvb8+aJR7RwLZNA=",
1277 "last_login": "2016-04-12T18:50:45.880823Z",
1278 "email": "johndoe@myhouse.com",
1279 "username": "johndoe@myhouse.com",
1280 "firstname": "john",
1281 "lastname": "doe",
1282 "phone": null,
1283 "user_url": null,
1284 "site": "http://xos.dev:9999/api/core/sites/1/",
1285 "public_key": null,
1286 "is_active": true,
1287 "is_admin": false,
1288 "is_staff": true,
1289 "is_readonly": false,
1290 "is_registering": false,
1291 "is_appuser": false,
1292 "login_page": null,
1293 "created": "2016-04-12T18:50:45.912602Z",
1294 "updated": "2016-04-12T18:50:45.912671Z",
1295 "enacted": null,
1296 "policed": null,
1297 "backend_status": "Provisioning in progress",
1298 "deleted": false,
1299 "write_protect": false,
1300 "timezone": "America/New_York"
1301 }
1302 ]
1303