{"_id":"55ce9b0b9d28781700b7c932","body":"Project FiFo's API is build in a RESTful manner, in addition to `applicaiton/json` as a content type or accepted type `application/x-msgpack` can be used to provide a faster to en- and decode line protocol.\n\nWe put a high value on the API, in this aspect all our tools, pyfi (the console client) and Cerberus (the UI) are working 100% with the API without any special cases. Implemented from the documentation and not the code.\n\nBy this we want to ensure that the API is robust and offers the best possible experience when implementing other components for it.","createdAt":"2015-08-15T01:47:24.312Z","slug":"getting-started","__v":4,"githubsync":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","title":"Getting Started with Project-FiFo API","type":"basic","sync_unique":"","updates":[],"user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"category":"55ce9b0a9d28781700b7c931","excerpt":"","link_external":false,"link_url":"","order":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
Getting Started with Project-FiFo API
{"_id":"55cf2da18f17dc0d00da7ca8","link_external":false,"order":1,"type":"put","category":"55ce9b0a9d28781700b7c931","githubsync":"","hidden":false,"link_url":"","title":"Set Metadata","updates":[],"user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":1,"project":"55ce9a298f17dc0d00da7c48","slug":"metadata-set","sync_unique":"","editedParams":true,"api":{"examples":{"codes":[{"name":"","language":"http","code":"PUT /api/2/vms/2ca285a3-05a8-4ca6-befd-78fa994929ab/metadata/cerberus HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json\n\n{\"notes\": [{\"text\":\"yap\",\"created_at\":\"2014-09-13T01:34:03.379Z\"}]}"}]},"method":"put","params":[{"default":"","type":"string","name":"section","in":"path","_id":"55cfadf05b49e71900262f44","required":true,"desc":"the section to set metadata in, i.e. `orgs`, `users`, etc..."},{"required":true,"desc":"UUID of the element","default":"","type":"string","name":"uuid","in":"path","_id":"55cfadf05b49e71900262f43"},{"name":"path","in":"path","_id":"55cf2da18f17dc0d00da7ca9","required":false,"desc":"URL path to nested metadata","default":"","type":"string"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/:section/:uuid/metadata/:path","auth":"required"},"body":"Every entity in FiFo's database can have metadata attached to it. This metadata is ignored by FiFo itself but an be leveraged by any software that integrates with it. The metadata is represented as a JSON object, nested keys can be directly accessed by using the URL to specify the path.\n\nAs a convention metadata should never be written to a the root key but should be prefixed with an identifier of the application using it. In the example code we set the `notes` to be displayed in `cerberus` so the the key is `cerberus.notes` (as seen by the URL path of `/metadata/cerberus`. This best practice prevents conflicts between applications that might want to use the same names for different kinds of metadata.\n\nMetadata generally should be kept small, a few kilobyte as most as larger metadata can have a negative impact on the performance of the overall system!","createdAt":"2015-08-15T12:16:33.519Z","editedParams2":true,"excerpt":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putSet Metadata
Path Params
section:
required
string
the section to set metadata in, i.e. `orgs`, `users`, etc...
uuid:
required
string
UUID of the element
path:
string
URL path to nested metadata
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cf2de7c27f7d3500da1e97","category":"55ce9b0a9d28781700b7c931","hidden":false,"link_external":false,"link_url":"","body":"Removes a metadata key form an entity, the key can be nested or top level.","createdAt":"2015-08-15T12:17:43.022Z","editedParams2":true,"api":{"auth":"required","examples":{"codes":[{"code":"DELETE /api/2/vms/2ca285a3-05a8-4ca6-befd-78fa994929ab/metadata/cerberus/notes HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json","name":"","language":"http"}]},"method":"delete","params":[{"desc":"section to delete metadata key form","default":"","type":"string","name":"section","in":"path","_id":"55cfae1d8d728e0d00cc5b0d","required":true},{"type":"string","name":"uuid","in":"path","_id":"55cfae1d8d728e0d00cc5b0c","required":true,"desc":"UUID of the element","default":""},{"_id":"55cf2da18f17dc0d00da7ca9","required":false,"desc":"URL path to nested metadata to delete","default":"","type":"string","name":"path","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/:section/:uuid/metadata/:path"},"editedParams":true,"githubsync":"","order":2,"title":"Delete Metadata","type":"delete","updates":[],"version":"55ce9b0a9d28781700b7c930","__v":1,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","slug":"metadata-delete","sync_unique":"","user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Metadata
Path Params
section:
required
string
section to delete metadata key form
uuid:
required
string
UUID of the element
path:
string
URL path to nested metadata to delete
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55d5af3e988e130d000b4089","user":"55af3b15826d210d00041e02","category":"55ce9b0a9d28781700b7c931","createdAt":"2015-08-20T10:43:10.184Z","link_external":false,"order":3,"project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","body":"Gets general information on the clouds status.","hidden":false,"link_url":"","slug":"cloud-status","title":"Cloud status","__v":0,"api":{"settings":"","url":"/cloud","auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":" {\n \"warnings\": [],\n \"metrics\": {\n \"users\": 0,\n \"roles\": 0,\n \"orgs\": 0,\n \"used\": 99121,\n \"total-memory\": 65508,\n \"storage\": \"s3\",\n \"size\": 454656,\n \"reserved-memory\": 0.0,\n \"provisioned-memory\": 46080,\n \"l2size\": 0,\n \"l2miss\": 0,\n \"l2hits\": 0,\n \"l1size\": 1830,\n \"l1miss\": 831913,\n \"l1hits\": 24159020,\n \"hypervisors\": [\n \"cae242d0-fb7a-4a37-82c7-dcc73ce0fa8d\"\n ],\n \"free-memory\": 19428.0,\n \"vms\": 6\n },\n \"versions\": {\n \"snarl\": \"test-a895db8, Tue Aug 26 10:40:50 2014 -0400\",\n \"howl\": \"test-1b05ae8, Sat Jul 19 02:52:51 2014 +0200\",\n \"sniffle\": \"test-a3eeb09, Mon Aug 25 16:58:50 2014 -0400\",\n \"wiggle\": \"test-31008f1, Tue Aug 26 12:12:16 2014 -0400\"\n }\n }","name":""}]}},"updates":[],"excerpt":"","githubsync":"","sync_unique":"","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getCloud status
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea3a98f17dc0d00da7c53","__v":4,"body":"Requests the data related to the current session.","category":"55cea3069d28781700b7c934","link_url":"","order":0,"project":"55ce9a298f17dc0d00da7c48","api":{"auth":"required","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"keys\": [],\n \"metadata\": {},\n \"name\": \"test1\",\n \"org\": \"\",\n \"orgs\": [],\n \"permissions\": [\n [\n \"users\",\n \"5887f2fc-82df-4ba7-b274-b47d6cd275f2\",\n \"...\"\n ]\n ],\n \"roles\": [\n \"ad29d0b8-111e-46f8-9d96-8ef32b17f9be\"\n ],\n \"uuid\": \"5887f2fc-82df-4ba7-b274-b47d6cd275f2\",\n \"yubikeys\": []\n}","name":""}]},"settings":"","url":"/sessions"},"createdAt":"2015-08-15T02:27:53.117Z","excerpt":"","sync_unique":"","updates":[],"slug":"sessions","title":"Current Session","type":"get","version":"55ce9b0a9d28781700b7c930","githubsync":"","hidden":false,"link_external":false,"user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getCurrent Session
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea4899d28781700b7c93b","__v":1,"body":"Generates a one time token to be used when opening web-socket connections.","order":1,"api":{"auth":"required","method":"get","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n token: \"sometoken\", // one time token to use\n expiery: 30 // experiy time in seconds\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/sessions/one_time_token"},"link_external":false,"project":"55ce9a298f17dc0d00da7c48","slug":"sessions-one_time_token","type":"get","createdAt":"2015-08-15T02:31:37.905Z","sync_unique":"","title":"One Time Token","updates":[],"version":"55ce9b0a9d28781700b7c930","category":"55cea3069d28781700b7c934","excerpt":"","githubsync":"","hidden":false,"link_url":"","user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getOne Time Token
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea4f39d28781700b7c93d","order":2,"slug":"sessions-delete","sync_unique":"","updates":[],"__v":0,"api":{"settings":"","url":"/sessions/:session","auth":"required","method":"delete","params":[{"_id":"55cea4f39d28781700b7c93e","required":true,"desc":"Session token to delete","default":"","type":"string","name":"session","in":"path"}],"results":{"codes":[{"name":"","status":204,"language":"json","code":""},{"status":400,"language":"json","code":"{}","name":""}]}},"link_url":"","editedParams":true,"project":"55ce9a298f17dc0d00da7c48","title":"Token Deletion","user":"55af3b15826d210d00041e02","link_external":false,"version":"55ce9b0a9d28781700b7c930","category":"55cea3069d28781700b7c934","createdAt":"2015-08-15T02:33:23.489Z","editedParams2":true,"hidden":false,"body":"Deletes the session with the given token, logging it out.","excerpt":"","githubsync":"","type":"delete","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteToken Deletion
Path Params
session:
required
string
Session token to delete
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d5aef4ced8b9190077cbdd","api":{"url":"/cloud/connection","auth":"optional","method":"get","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":" {\n \"howl\": 1,\n \"snarl\": 1,\n \"sniffle\": 1\n }"}]},"settings":""},"createdAt":"2015-08-20T10:41:56.696Z","order":3,"updates":[],"excerpt":"","link_external":false,"sync_unique":"","title":"Cloud connection status","user":"55af3b15826d210d00041e02","category":"55cea3069d28781700b7c934","githubsync":"","hidden":false,"link_url":"","version":"55ce9b0a9d28781700b7c930","body":"Returns connection status of the cloud services.","project":"55ce9a298f17dc0d00da7c48","slug":"cloud-connections","type":"get","__v":3,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getCloud connection status
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea6978f17dc0d00da7c57","api":{"auth":"optional","method":"get","params":[{"default":"","type":"string","name":"client_id","in":"query","_id":"55cea6978f17dc0d00da7c5b","required":true,"desc":"ID of the client"},{"required":true,"desc":"The URI redirected to at the end of the OAuth2 dance.","default":"","type":"string","name":"redirect_uri","in":"query","_id":"55cea6978f17dc0d00da7c5a"},{"name":"state","in":"query","_id":"55cea6978f17dc0d00da7c59","required":false,"desc":"State of the client","default":"","type":"string"},{"name":"scope","in":"query","_id":"55cea6978f17dc0d00da7c58","required":false,"desc":"The requested scope.","default":"","type":"array_string"}],"results":{"codes":[{"name":"","status":200,"language":"html","code":"<h1>login page</h1>"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/auth?response_type=code"},"createdAt":"2015-08-15T02:40:23.126Z","editedParams":true,"link_url":"","project":"55ce9a298f17dc0d00da7c48","__v":1,"body":"Shows the OAuth2 request form to authorize a client for a given scope. This will either show a login prompt or a simple confirmation when a *Bearer Token* was given","githubsync":"","link_external":false,"title":"Authorization Code Request","user":"55af3b15826d210d00041e02","editedParams2":true,"updates":[],"category":"55cea30d8f17dc0d00da7c51","excerpt":"","hidden":false,"order":0,"slug":"oauth-code-auth-request","sync_unique":"","type":"get","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getAuthorization Code Request
Query Params
client_id:
required
string
ID of the client
redirect_uri:
required
string
The URI redirected to at the end of the OAuth2 dance.
state:
string
State of the client
scope:
array of strings
The requested scope.
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea7eadb457c210076e5a5","excerpt":"OAuth2 Grant","link_external":false,"project":"55ce9a298f17dc0d00da7c48","editedParams2":true,"updates":[],"__v":1,"createdAt":"2015-08-15T02:46:02.070Z","order":1,"sync_unique":"","title":"Authorization Code Grant","user":"55af3b15826d210d00041e02","api":{"auth":"optional","method":"post","params":[{"required":true,"desc":"must be `code`","default":"code","type":"string","name":"response_type","in":"body","_id":"55d39eb1c336ec0d007c21f8"},{"desc":"One of code and token","default":"","type":"string","name":"response_type","in":"body","_id":"55cea7eadb457c210076e5ac","required":true},{"default":"","type":"string","name":"client_id","in":"body","_id":"55cea7eadb457c210076e5ab","required":true,"desc":"ID of the client"},{"required":true,"desc":"The URI redirected to at the end of the OAuth2 dacnce","default":"","type":"string","name":"redirect_uri","in":"body","_id":"55cea7eadb457c210076e5aa"},{"desc":"","default":"","type":"array_string","name":"scope","in":"body","_id":"55cea7eadb457c210076e5a9","required":false},{"type":"string","name":"state","in":"body","_id":"55cea7eadb457c210076e5a8","required":false,"desc":"State of the client","default":""},{"_id":"55cea7eadb457c210076e5a7","required":false,"desc":"The username to authenticate with. (if basic auth or bearer tokens are not used)","default":"","type":"string","name":"username","in":"body"},{"_id":"55cea7eadb457c210076e5a6","required":false,"desc":"The password to authenticate with","default":"","type":"string","name":"password","in":"body"}],"results":{"codes":[{"status":302,"language":"http","code":"HTTP/1.1 302 Found\nlocation: http://client.uri?access_code=abaADbAD123BADas","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/auth"},"category":"55cea30d8f17dc0d00da7c51","link_url":"","hidden":false,"slug":"oauth2-code-grant","type":"post","version":"55ce9b0a9d28781700b7c930","body":"Grants a access token or authroization code request and redirects on. On completion might redirect to GET /oauth2/2fa to perform a second set of two factor autentication if required.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"OAuth2 RFC\",\n \"body\": \"[4.1.1 Authorization Code Grant / Authorization Request](https://tools.ietf.org/html/rfc6749#section-4.1.1)\"\n}\n[/block]\n\nHandles the following parts of the RFC:","editedParams":true,"githubsync":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAuthorization Code Grant
OAuth2 Grant
Body Params
response_type:
required
stringcode
must be `code`
response_type:
required
string
One of code and token
client_id:
required
string
ID of the client
redirect_uri:
required
string
The URI redirected to at the end of the OAuth2 dacnce
scope:
array of strings
state:
string
State of the client
username:
string
The username to authenticate with. (if basic auth or bearer tokens are not used)
password:
string
The password to authenticate with
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55ceae9f9d28781700b7c94b","githubsync":"","hidden":false,"slug":"oauth-token-auth-request","updates":[],"version":"55ce9b0a9d28781700b7c930","__v":1,"editedParams":true,"project":"55ce9a298f17dc0d00da7c48","title":"Implicit Request","user":"55af3b15826d210d00041e02","body":"Shows the OAuth2 request form to authorize a client for a given scope. This will either show a login prompt or a simple confirmation when a *Bearer Token* was given","createdAt":"2015-08-15T03:14:39.616Z","excerpt":"","link_external":false,"api":{"url":"/oauth2/auth?response_type=token","auth":"optional","method":"get","params":[{"name":"client_id","in":"query","_id":"55cea6978f17dc0d00da7c5b","required":true,"desc":"ID of the client","default":"","type":"string"},{"name":"redirect_uri","in":"query","_id":"55cea6978f17dc0d00da7c5a","required":true,"desc":"The URI redirected to at the end of the OAuth2 dance.","default":"","type":"string"},{"name":"state","in":"query","_id":"55cea6978f17dc0d00da7c59","required":false,"desc":"State of the client","default":"","type":"string"},{"desc":"The requested scope.","default":"","type":"array_string","name":"scope","in":"query","_id":"55cea6978f17dc0d00da7c58","required":false}],"results":{"codes":[{"status":200,"language":"html","code":"<h1>login page</h1>","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"55df5b4addfb40170061cfeb"},"category":"55cea30d8f17dc0d00da7c51","editedParams2":true,"link_url":"","order":2,"sync_unique":"","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getImplicit Request
Query Params
client_id:
required
string
ID of the client
redirect_uri:
required
string
The URI redirected to at the end of the OAuth2 dance.
state:
string
State of the client
scope:
array of strings
The requested scope.
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55ceadb78f17dc0d00da7c66","slug":"oauth2-implict-grant","sync_unique":"","updates":[],"editedParams":true,"editedParams2":true,"excerpt":"4.2.1 Implicit Grant","hidden":false,"link_url":"","order":3,"project":"55ce9a298f17dc0d00da7c48","type":"post","version":"55ce9b0a9d28781700b7c930","category":"55cea30d8f17dc0d00da7c51","createdAt":"2015-08-15T03:10:47.214Z","title":"Implicit Grant","user":"55af3b15826d210d00041e02","__v":2,"api":{"auth":"optional","method":"post","params":[{"type":"string","name":"response_type","in":"body","_id":"55d39ec8f77e6d0d00b1b1ec","required":true,"desc":"must be `token`","default":"token"},{"_id":"55cea7eadb457c210076e5ab","required":true,"desc":"ID of the client","default":"","type":"string","name":"client_id","in":"body"},{"_id":"55cea7eadb457c210076e5aa","required":true,"desc":"The URI redirected to at the end of the OAuth2 dacnce","default":"","type":"string","name":"redirect_uri","in":"body"},{"_id":"55cea7eadb457c210076e5a6","required":false,"desc":"The password to authenticate with (if basic auth or bearer tokens are not used)","default":"","type":"string","name":"password","in":"body"},{"in":"body","_id":"55cea7eadb457c210076e5a7","required":false,"desc":"The username to authenticate with (if basic auth or bearer tokens are not used)","default":"","type":"string","name":"username"},{"type":"array_string","name":"scope","in":"body","_id":"55cea7eadb457c210076e5a9","required":false,"desc":"","default":""},{"_id":"55cea7eadb457c210076e5a8","required":false,"desc":"State of the client","default":"","type":"string","name":"state","in":"body"}],"results":{"codes":[{"language":"http","code":"HTTP/1.1 302 Found\nlocation: http://client.uri?access_code=abaADbAD123BADas","name":"","status":302},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/auth"},"body":"Grants a access token or authroization code request and redirects on. On completion might redirect to GET /oauth2/2fa to perform a second set of two factor autentication if required.\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"OAuth2 RFC\",\n \"body\": \"[4.2.1 Implicit Grant / Authorization Request](https://tools.ietf.org/html/rfc6749#section-4.2.1)\"\n}\n[/block]\n\nHandles the following parts of the RFC:","githubsync":"","link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postImplicit Grant
4.2.1 Implicit Grant
Body Params
response_type:
required
stringtoken
must be `token`
client_id:
required
string
ID of the client
redirect_uri:
required
string
The URI redirected to at the end of the OAuth2 dacnce
password:
string
The password to authenticate with (if basic auth or bearer tokens are not used)
username:
string
The username to authenticate with (if basic auth or bearer tokens are not used)
scope:
array of strings
state:
string
State of the client
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea951db457c210076e5ad","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n \"access_token\": \"Ebaz7zB51OPXnmOlVDnKRhv9Ig9kKW2V\",\n \"token_type\": \"bearer\",\n \"expires_in\": 86400,\n \"refresh_token\": \"Qpxr7bOaDA4NUloYc9XYWmS16QAio3Dr\",\n \"scope\": [\n \"*\"\n ]\n}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/token","auth":"optional","method":"post","params":[{"type":"string","name":"grant_type","in":"body","_id":"55d39edec336ec0d007c21f9","required":true,"desc":"must be `authorization_code`","default":"authorization_code"},{"_id":"55cea951db457c210076e5b6","required":true,"desc":"Code from the prior part of OAuth2","default":"","type":"string","name":"code","in":"body"},{"required":true,"desc":"ID of the client","default":"","type":"string","name":"client_id","in":"body","_id":"55cea951db457c210076e5b5"},{"desc":"Redirect for the Client","default":"","type":"string","name":"redirect_uri","in":"body","_id":"55cea951db457c210076e5b4","required":true},{"type":"string","name":"client_secret","in":"body","_id":"55cea951db457c210076e5b2","required":false,"desc":"Secret for the client","default":""},{"_id":"55cea951db457c210076e5b3","required":false,"desc":"Scope of the grant","default":"","type":"string","name":"scope","in":"body"},{"_id":"55cea951db457c210076e5b1","required":false,"desc":"State handed from the client","default":"","type":"string","name":"state","in":"body"}]},"body":"[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"[4.1.3 Access Token Request](https://tools.ietf.org/html/rfc6749#section-4.1.3)\",\n \"title\": \"OAuth2 RFC\"\n}\n[/block]","excerpt":"4.1.3 Access Token Request","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"post","githubsync":"","link_external":false,"link_url":"","order":4,"slug":"oauth2-authorization_code","user":"55af3b15826d210d00041e02","category":"55cea30d8f17dc0d00da7c51","createdAt":"2015-08-15T02:52:01.890Z","editedParams":true,"editedParams2":true,"title":"Access Token Request","updates":[],"__v":2,"hidden":false,"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAccess Token Request
4.1.3 Access Token Request
Body Params
grant_type:
required
stringauthorization_code
must be `authorization_code`
code:
required
string
Code from the prior part of OAuth2
client_id:
required
string
ID of the client
redirect_uri:
required
string
Redirect for the Client
client_secret:
string
Secret for the client
scope:
string
Scope of the grant
state:
string
State handed from the client
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cea976db457c210076e5b8","api":{"auth":"required","method":"post","params":[{"_id":"55d39ef30168850d0073f2ff","required":true,"desc":"must be `client_credentials`","default":"client_credentials","type":"string","name":"grant_type","in":"body"},{"in":"body","_id":"55cea951db457c210076e5b5","required":true,"desc":"","default":"","type":"string","name":"client_id"},{"type":"string","name":"client_secret","in":"body","_id":"55cea951db457c210076e5b2","required":true,"desc":"","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"access_token\": \"Ebaz7zB51OPXnmOlVDnKRhv9Ig9kKW2V\",\n \"token_type\": \"bearer\",\n \"expires_in\": 86400,\n \"scope\": [\n \"*\"\n ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/token"},"editedParams2":true,"excerpt":"4.4.2 Access Token Request","link_url":"","slug":"oauth2tokengrant_type-client_credentials","title":"Client Credentials - Access Token Request","type":"post","__v":2,"order":5,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","updates":[],"version":"55ce9b0a9d28781700b7c930","category":"55cea30d8f17dc0d00da7c51","createdAt":"2015-08-15T02:52:38.547Z","user":"55af3b15826d210d00041e02","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"[4.4.2 Access Token Request](https://tools.ietf.org/html/rfc6749#section-4.4.2)\",\n \"title\": \"OAuth2 RFC\"\n}\n[/block]","editedParams":true,"githubsync":"","hidden":false,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postClient Credentials - Access Token Request
4.4.2 Access Token Request
Body Params
grant_type:
required
stringclient_credentials
must be `client_credentials`
client_id:
required
string
client_secret:
required
string
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55ceaa208f17dc0d00da7c5d","type":"post","updates":[],"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"[6 Refreshing an Access Token](https://tools.ietf.org/html/rfc6749#section-6)\",\n \"title\": \"OAuth2 RFC\"\n}\n[/block]","excerpt":"6 Refreshing an Access Token","githubsync":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":2,"category":"55cea30d8f17dc0d00da7c51","editedParams2":true,"link_external":false,"editedParams":true,"link_url":"","title":"Refreshing an Access Token","api":{"auth":"required","method":"post","params":[{"in":"body","_id":"55d39f0ec336ec0d007c21fc","required":true,"desc":"must be `refresh_token`","default":"refresh_token","type":"string","name":"grant_type"},{"type":"string","name":"refresh_token","in":"body","_id":"55cea951db457c210076e5b1","required":true,"desc":"Used to obtain a new token via a.","default":""},{"_id":"55cea951db457c210076e5b5","required":true,"desc":"Client ID (may be supplied over basic auth)","default":"","type":"string","name":"client_id","in":"body"},{"required":true,"desc":"","default":"","type":"string","name":"redirect_uri","in":"body","_id":"55cea951db457c210076e5b4"},{"desc":"","default":"","type":"string","name":"client_secret","in":"body","_id":"55cea951db457c210076e5b2","required":false}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"access_token\": \"Ebaz7zB51OPXnmOlVDnKRhv9Ig9kKW2V\",\n \"token_type\": \"bearer\",\n \"expires_in\": 86400,\n \"scope\": [\n \"*\"\n ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"55df5b4addfb40170061cfeb","url":"/oauth2/token"},"createdAt":"2015-08-15T02:55:28.303Z","order":6,"slug":"oauth2-refresh_token","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postRefreshing an Access Token
6 Refreshing an Access Token
Body Params
grant_type:
required
stringrefresh_token
must be `refresh_token`
refresh_token:
required
string
Used to obtain a new token via a.
client_id:
required
string
Client ID (may be supplied over basic auth)
redirect_uri:
required
string
client_secret:
string
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55ceaa458f17dc0d00da7c5e","slug":"oauth2-password","sync_unique":"","type":"post","user":"55af3b15826d210d00041e02","api":{"url":"/oauth2/token","auth":"required","method":"post","params":[{"desc":"must be `password`","name":"grant_type","required":true,"type":"string","in":"body","_id":"55d39f20f77e6d0d00b1b1f1","default":"password"},{"default":"","type":"string","name":"username","in":"body","_id":"55cea951db457c210076e5b0","required":true,"desc":"The username for the password grant."},{"in":"body","_id":"55cea951db457c210076e5af","required":true,"desc":"The password for the password grant.","default":"","type":"string","name":"password"},{"type":"string","name":"scope","in":"body","_id":"55cea951db457c210076e5b3","required":true,"desc":"The Scope for a password grant.","default":""},{"_id":"55cea951db457c210076e5ae","required":false,"desc":"The OTP from the user if required (custom extension).","default":"","type":"string","name":"fifo_otp","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"access_token\": \"Ebaz7zB51OPXnmOlVDnKRhv9Ig9kKW2V\",\n \"token_type\": \"bearer\",\n \"expires_in\": 86400,\n \"scope\": [\n \"*\"\n ]\n}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"55df5b4addfb40170061cfeb"},"category":"55cea30d8f17dc0d00da7c51","editedParams2":true,"hidden":false,"link_external":false,"title":"Resource Owner Password Credentials Grant","body":"[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"[4.3 Resource Owner Password Credentials Grant](https://tools.ietf.org/html/rfc6749#section-4.3)\",\n \"title\": \"OAuth2 RFC\"\n}\n[/block]","createdAt":"2015-08-15T02:56:05.851Z","editedParams":true,"excerpt":"4.3 Resource Owner Password Credentials Grant","version":"55ce9b0a9d28781700b7c930","__v":2,"link_url":"","order":7,"updates":[],"githubsync":"","project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postResource Owner Password Credentials Grant
4.3 Resource Owner Password Credentials Grant
Body Params
grant_type:
required
stringpassword
must be `password`
username:
required
string
The username for the password grant.
password:
required
string
The password for the password grant.
scope:
required
string
The Scope for a password grant.
fifo_otp:
string
The OTP from the user if required (custom extension).
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55fdc78051dbf70d00c61bc7","link_external":false,"project":"55ce9a298f17dc0d00da7c48","slug":"scopes-list","updates":[],"sync_unique":"","__v":0,"category":"55cea30d8f17dc0d00da7c51","link_url":"","order":999,"type":"get","user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/scopes","auth":"never","method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n \"default\": true,\n \"description\": \"Everything\",\n \"scope\": \"*\"\n }\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"excerpt":"","githubsync":"","version":"55ce9b0a9d28781700b7c930","body":"Returns the scopes provided by the system.","createdAt":"2015-09-19T20:37:20.379Z","hidden":false,"title":"List Scopes","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Scopes
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf8e025b49e71900262f24","body":"Lists all users visible to the user.\n\nSee [Get User](doc:users-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-15T19:07:46.469Z","title":"List Users","category":"55cea313db457c210076e5a2","editedParams2":true,"type":"get","updates":[],"user":"55af3b15826d210d00041e02","slug":"users-list","sync_unique":"","editedParams":true,"excerpt":"","hidden":false,"link_external":false,"link_url":"","order":0,"__v":0,"api":{"auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list","in":"query"},{"in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":"","type":"array_string","name":"full-list-fields"}],"results":{"codes":[{"language":"json","code":"[\n \"7015cc51-3b09-45da-9cab-970d94b27c45\",\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users"},"githubsync":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Users
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf8e47982d692b006fe0dd","type":"post","user":"55af3b15826d210d00041e02","createdAt":"2015-08-15T19:08:55.160Z","editedParams":true,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","title":"Create User","body":"Creates a new user","editedParams2":true,"githubsync":"","link_external":false,"order":1,"hidden":false,"link_url":"","updates":[],"__v":0,"api":{"params":[{"default":"","type":"string","name":"user","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"the login"},{"in":"body","_id":"55cf261c46db442b00105be9","required":true,"desc":"the password for the user","default":"","type":"string","name":"password"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/users/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]},"settings":"","url":"/users","auth":"required","method":"post"},"category":"55cea313db457c210076e5a2","slug":"users-create","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate User
Body Params
user:
required
string
the login
password:
required
string
the password for the user
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf8e875b49e71900262f26","__v":1,"api":{"method":"get","params":[{"desc":"UUID of the user","name":"uuid","required":true,"type":"string","in":"path","_id":"55cfae578d728e0d00cc5b0e","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"keys\": {\n },\n \"metadata\": {\n \"cerberus\": {\n \"howl\": \"ws://localhost:8888\",\n \"ws\": \"ws://localhost:8888\"\n },\n \"jingles\": {\n \"vms_orderBy\": \"{\\\"config.alias\\\":\\\"desc\\\"}\"\n }\n },\n \"name\": \"admin\",\n \"org\": \"5f8dddd1-d965-45ee-b662-ca29d677a312\",\n \"orgs\": [\n \"5f8dddd1-d965-45ee-b662-ca29d677a312\",\n \"6c298215-fd8e-4e3d-80dc-6d48e8a4fea1\"\n ],\n \"permissions\": [\n [\n \"...\"\n ],\n [\n \"channels\",\n \"2e081394-7d1b-436a-bde1-08cdb28636f7\",\n \"join\"\n ],\n [\n \"cloud\",\n \"...\"\n ],\n [\n \"vms\",\n \"2e081394-7d1b-436a-bde1-08cdb28636f7\",\n \"...\"\n ]\n ],\n \"roles\": [\n \"ad29d0b8-111e-46f8-9d96-8ef32b17f9be\"\n ],\n \"tokens\": [\n {\n \"client\": \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\",\n \"expiery\": 1442683138,\n \"id\": \"6758e971-6f1d-4d23-a878-4db5599f3900\",\n \"scope\": [\n \"*\"\n ],\n \"type\": \"refresh\"\n },\n {\n \"client\": \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\",\n \"expiery\": 1442683138,\n \"id\": \"b7b5a77e-4919-4fc7-aa6e-19366cfe49f4\",\n \"scope\": [\n \"*\"\n ],\n \"type\": \"access\"\n },\n {\n \"expiery\": 1442681769,\n \"id\": \"bbf5c619-0546-4110-a2cb-96c34924b21d\",\n \"scope\": [\n \"*\"\n ],\n \"type\": \"access\"\n },\n {\n \"expiery\": 1442682118,\n \"id\": \"1419ec15-3e33-4bbf-94fe-1957bd4dce4a\",\n \"scope\": [\n \"*\"\n ],\n \"type\": \"access\"\n },\n {\n \"expiery\": 1442682394,\n \"id\": \"3e168a85-96aa-44a4-9e04-bf058ea69ef3\",\n \"scope\": [\n \"*\"\n ],\n \"type\": \"access\"\n }\n ],\n \"uuid\": \"e01d2b2c-178c-4b9d-9046-cba2471b2c27\",\n \"yubikeys\": []\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users/:uuid","auth":"required"},"createdAt":"2015-08-15T19:09:59.080Z","githubsync":"","link_external":false,"link_url":"","sync_unique":"","excerpt":"","user":"55af3b15826d210d00041e02","project":"55ce9a298f17dc0d00da7c48","slug":"users-get","title":"Get User","updates":[],"version":"55ce9b0a9d28781700b7c930","body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Sensitive data\",\n \"body\": \"Note that no sensitive data will be returned from this call. Neither the users password hash nor the actual tokens used by the user are included in the reply. The token id's can **not be used** to authenticate requests!\"\n}\n[/block]\nReads a user.","category":"55cea313db457c210076e5a2","editedParams":true,"editedParams2":true,"hidden":false,"order":2,"type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet User
Path Params
uuid:
required
string
UUID of the user
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf8ebd5b49e71900262f28","link_url":"","order":3,"slug":"users-password","type":"put","sync_unique":"","user":"55af3b15826d210d00041e02","__v":1,"createdAt":"2015-08-15T19:10:53.585Z","githubsync":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","updates":[],"category":"55cea313db457c210076e5a2","editedParams":true,"excerpt":"","title":"Set User Password","version":"55ce9b0a9d28781700b7c930","api":{"auth":"required","method":"put","params":[{"type":"string","name":"uuid","in":"path","_id":"55cfae948d728e0d00cc5b0f","required":true,"desc":"UUID of the user","default":""},{"_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"New password for the user","default":"","type":"string","name":"password","in":"body"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users/:uuid"},"body":"Changes the `password` of a user","editedParams2":true,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putSet User Password
Path Params
uuid:
required
string
UUID of the user
Body Params
password:
required
string
New password for the user
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf8edc8d728e0d00cc5ae8","hidden":false,"project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","body":"Deletes a user.","category":"55cea313db457c210076e5a2","editedParams":true,"editedParams2":true,"type":"delete","updates":[],"api":{"params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cfaea05b49e71900262f45","required":true,"desc":"UUID of the user"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/users/:uuid","auth":"required","method":"delete"},"createdAt":"2015-08-15T19:11:24.928Z","link_external":false,"sync_unique":"","__v":1,"link_url":"","title":"Delete User","user":"55af3b15826d210d00041e02","excerpt":"","githubsync":"","order":4,"slug":"users-delete","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete User
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf8f148d728e0d00cc5aea","api":{"params":[{"required":true,"desc":"UUID of the user","default":"","type":"string","name":"uuid","in":"path","_id":"55cfaeb08d728e0d00cc5b10"},{"desc":"the permission to test as path i.e. `some/funky/permission`","default":"","type":"string","name":"permission","in":"path","_id":"55cf29fa8f17dc0d00da7ca5","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"ok\": \"allowed\"\n}","name":"Allowed"},{"name":"Forbidden","status":200,"language":"text","code":"{\n \"error\": \"forbidden\"\n}"}]},"settings":"","url":"/users/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"code":"GET /api/2/users/b7c658e0-2ddb-46dd-8973-4a59ffc9957e/permissions/cloud/vms/create HTTP/1.1\nhost: cloud.project-fifo.net\naccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":"","language":"http"}]},"method":"get"},"excerpt":"","link_external":false,"project":"55ce9a298f17dc0d00da7c48","user":"55af3b15826d210d00041e02","category":"55cea313db457c210076e5a2","editedParams2":true,"hidden":false,"sync_unique":"","updates":[],"version":"55ce9b0a9d28781700b7c930","slug":"users-permission-test","title":"Test User Permission","createdAt":"2015-08-15T19:12:20.562Z","editedParams":true,"githubsync":"","link_url":"","order":5,"__v":1,"body":"Tests if a user has is allowed to perform an action. Please note that 403 here does **not** mean the user is not allowed but that the requesting token was not allowed to test for the client!","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTest User Permission
Path Params
uuid:
required
string
UUID of the user
permission:
required
string
the permission to test as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cf8f4d5b49e71900262f29","editedParams2":true,"githubsync":"","slug":"users-permission-grant","version":"55ce9b0a9d28781700b7c930","api":{"method":"put","params":[{"type":"string","name":"uuid","in":"path","_id":"55cfaebe957dcd3500b3449f","required":true,"desc":"UUID of the user","default":""},{"_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to grant as path i.e. `some/funky/permission`","default":"","type":"string","name":"permission","in":"path"}],"results":{"codes":[{"status":201,"language":"text","code":""}]},"settings":"","url":"/users/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/users/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]}},"category":"55cea313db457c210076e5a2","editedParams":true,"order":6,"sync_unique":"","type":"put","updates":[],"body":"Grants a permission to a user .","hidden":false,"link_external":false,"createdAt":"2015-08-15T19:13:17.878Z","user":"55af3b15826d210d00041e02","link_url":"","project":"55ce9a298f17dc0d00da7c48","title":"Grant User Permissions","__v":1,"excerpt":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putGrant User Permissions
Path Params
uuid:
required
string
UUID of the user
permission:
required
string
the permission to grant as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cf8fb88d728e0d00cc5aec","body":"Revokes a permission from a user.","githubsync":"","hidden":false,"link_external":false,"type":"delete","__v":1,"api":{"auth":"required","examples":{"codes":[{"language":"http","code":"DELETE /api/2/users/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"delete","params":[{"_id":"55cfaed08d728e0d00cc5b11","required":true,"desc":"UUID of the user","default":"","type":"string","name":"uuid","in":"path"},{"in":"path","_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to revoke as path i.e. `some/funky/permission`","default":"","type":"string","name":"permission"}],"results":{"codes":[{"language":"text","code":"","status":204}]},"settings":"","url":"/users/:uuid/permissions/:permission"},"category":"55cea313db457c210076e5a2","editedParams":true,"order":7,"slug":"users-permission-revoke","user":"55af3b15826d210d00041e02","link_url":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","title":"Revoke User Permission","createdAt":"2015-08-15T19:15:04.265Z","editedParams2":true,"excerpt":"","updates":[],"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRevoke User Permission
Path Params
uuid:
required
string
UUID of the user
permission:
required
string
the permission to revoke as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cf90208d728e0d00cc5aed","__v":1,"createdAt":"2015-08-15T19:16:48.294Z","link_url":"","order":8,"sync_unique":"","title":"Give Role to User","user":"55af3b15826d210d00041e02","category":"55cea313db457c210076e5a2","project":"55ce9a298f17dc0d00da7c48","updates":[],"type":"put","api":{"params":[{"type":"string","name":"uuid","in":"path","_id":"55cfaf0d957dcd3500b344a0","required":true,"desc":"UUID of the user","default":""},{"_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"UUID of the role to join","default":"","type":"string","name":"role","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users/:uuid/roles/:role","auth":"required","method":"put"},"editedParams":true,"editedParams2":true,"githubsync":"","hidden":false,"link_external":false,"slug":"users-role-join","body":"Gives a user a role.","excerpt":"","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putGive Role to User
Path Params
uuid:
required
string
UUID of the user
role:
required
string
UUID of the role to join
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf903d5b49e71900262f2a","__v":1,"category":"55cea313db457c210076e5a2","editedParams":true,"githubsync":"","link_external":false,"updates":[],"api":{"auth":"required","method":"delete","params":[{"in":"path","_id":"55cfaf1a8d728e0d00cc5b12","required":true,"desc":"UUID of the user","default":"","type":"string","name":"uuid"},{"type":"string","name":"role","in":"path","_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"UUID of the role to join","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/users/:uuid/roles/:role"},"excerpt":"","body":"Removes a role from a user.","createdAt":"2015-08-15T19:17:17.089Z","editedParams2":true,"hidden":false,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"delete","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","link_url":"","order":9,"slug":"users-role-delete","title":"Remove Role from User","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove Role from User
Path Params
uuid:
required
string
UUID of the user
role:
required
string
UUID of the role to join
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf9e918d728e0d00cc5afa","githubsync":"","link_external":false,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","version":"55ce9b0a9d28781700b7c930","editedParams2":true,"excerpt":"","link_url":"","api":{"method":"put","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cfaf32957dcd3500b344a1","required":true,"desc":"UUID of the user"},{"in":"body","_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"key/value pair for the key","default":"","type":"string","name":"<key>"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"language":"json","code":"","name":"","status":409}]},"settings":"","url":"/users/:uuid/keys","auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/users/7df734a1-7332-45da-aa2a-9a3d856fa58a/keys HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json\n\n{\n\"test@testhost\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZyw2HsD2TBPpBcCJLge4Eu1N9IXHx0S9APSdC4GEre3h4huNT9LUA78oOB1LDIyqmwbHy5yqVVBht4awmcveaSsBIDEPBrU+ZrSeibg3ikQxBYA+7IG8gwvEqxI9EdbnF6eqstfiUIaLsLuUY2E2b2DGIohy/NIw0tccchLR0kHUGz4yjmMZg78X9ux2VqFhlTfj3xDsagxFjo90FQkrO32SLULFS9fG5Ki8vsvhfkhhtgct74i894lj4DRThqmvgygODXcyvi/wtixaqKqcn+Y1JCr5AsvXvYmWQzdRh9Rv77j0mleo0xqosqXIH1HqsM4CJmdYGCPU7JB6k0j/H test@testhost\"\n}\n","name":""}]}},"body":"Adds a SSH key to a user.\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"Doublicate keys\",\n \"body\": \"It is not possible to add the same key to two users. A `409` error is returned when this is attempted.\"\n}\n[/block]","createdAt":"2015-08-15T20:18:25.423Z","hidden":false,"order":10,"slug":"users-key-add","__v":1,"updates":[],"user":"55af3b15826d210d00041e02","title":"Add SSH Key to User","type":"put","category":"55cea313db457c210076e5a2","editedParams":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putAdd SSH Key to User
Path Params
uuid:
required
string
UUID of the user
Body Params
key:
required
string
key/value pair for the key
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cfa0e88d728e0d00cc5afb","api":{"params":[{"type":"string","name":"uuid","in":"path","_id":"55cfa0e88d728e0d00cc5afd","required":true,"desc":"UUID if the user","default":""},{"_id":"55cfa0e88d728e0d00cc5afc","required":true,"desc":"id if the key to delete","default":"","type":"string","name":"key-id","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/users/:uuid/keys/:key-id","auth":"required","method":"delete"},"body":"Removes a SSH key from a user.","hidden":false,"link_url":"","updates":[],"user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":0,"category":"55cea313db457c210076e5a2","editedParams2":true,"excerpt":"","githubsync":"","order":11,"editedParams":true,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","title":"Remove SSH key from User","createdAt":"2015-08-15T20:28:24.376Z","link_external":false,"slug":"users-key-delete","type":"delete","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove SSH key from User
Path Params
uuid:
required
string
UUID if the user
key-id:
required
string
id if the key to delete
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfa28f5b49e71900262f38","title":"Add Yubikey to User","body":"Removes a SSH key from a user.","hidden":false,"link_external":false,"order":12,"type":"put","version":"55ce9b0a9d28781700b7c930","category":"55cea313db457c210076e5a2","editedParams":true,"editedParams2":true,"excerpt":"","sync_unique":"","updates":[],"createdAt":"2015-08-15T20:35:27.185Z","githubsync":"","project":"55ce9a298f17dc0d00da7c48","slug":"users-yubikeys-add","user":"55af3b15826d210d00041e02","__v":0,"api":{"url":"/users/:uuid/yubikeys","auth":"required","method":"put","params":[{"name":"uuid","in":"path","_id":"55cfa0e88d728e0d00cc5afd","required":true,"desc":"UUID if the user","default":"","type":"string"},{"name":"otp","in":"body","_id":"55cfa0e88d728e0d00cc5afc","required":true,"desc":"OTP from the YubiKey to add","default":"","type":"string"}],"results":{"codes":[{"code":"","name":"","status":204,"language":"json"}]},"settings":""},"link_url":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putAdd Yubikey to User
Path Params
uuid:
required
string
UUID if the user
Body Params
otp:
required
string
OTP from the YubiKey to add
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfa1f45b49e71900262f37","hidden":false,"slug":"users-yubikey-delete","updates":[],"__v":0,"api":{"auth":"required","method":"delete","params":[{"type":"string","name":"uuid","in":"path","_id":"55cfa0e88d728e0d00cc5afd","required":true,"desc":"UUID if the user","default":""},{"_id":"55cfa0e88d728e0d00cc5afc","required":true,"desc":"id if the key to delete","default":"","type":"string","name":"key-id","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/users/:uuid/yubikeys/:key-id"},"createdAt":"2015-08-15T20:32:52.101Z","editedParams":true,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","order":13,"title":"Remove Yubikey from User","category":"55cea313db457c210076e5a2","githubsync":"","link_external":false,"link_url":"","body":"Removes a SSH key from a user.","editedParams2":true,"sync_unique":"","type":"delete","user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove Yubikey from User
Path Params
uuid:
required
string
UUID if the user
key-id:
required
string
id if the key to delete
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfa3d5957dcd3500b34492","category":"55cea313db457c210076e5a2","link_url":"","title":"Adds the User to an Organisation","type":"put","updates":[],"version":"55ce9b0a9d28781700b7c930","excerpt":"","link_external":false,"project":"55ce9a298f17dc0d00da7c48","editedParams":true,"githubsync":"","slug":"user-org-add","sync_unique":"","order":14,"user":"55af3b15826d210d00041e02","__v":1,"api":{"method":"put","params":[{"name":"uuid","in":"path","_id":"55cfaf578d728e0d00cc5b13","required":true,"desc":"UUID of the user","default":"","type":"string"},{"desc":"UUID of the org to join","default":"","type":"string","name":"org","in":"path","_id":"55cf28068f17dc0d00da7ca2","required":true},{"type":"boolean","name":"active","in":"body","_id":"55cfa3d5957dcd3500b34493","required":false,"desc":"used to set an orga","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users/:uuid/orgs/:org","auth":"required"},"body":"Adds a user to an Organisation. The first joined Organisation will automatically be set as active. Any further Organisations need to be selected as active by passing the `active` parameter in a JSON.","createdAt":"2015-08-15T20:40:53.092Z","editedParams2":true,"hidden":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putAdds the User to an Organisation
Path Params
uuid:
required
string
UUID of the user
org:
required
string
UUID of the org to join
Body Params
active:
boolean
used to set an orga
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfa4058d728e0d00cc5b01","category":"55cea313db457c210076e5a2","githubsync":"","slug":"users-org-delete","title":"Remove User from Organistation","version":"55ce9b0a9d28781700b7c930","type":"delete","__v":1,"createdAt":"2015-08-15T20:41:41.526Z","excerpt":"","link_url":"","order":15,"project":"55ce9a298f17dc0d00da7c48","editedParams":true,"hidden":false,"link_external":false,"sync_unique":"","api":{"auth":"required","method":"delete","params":[{"in":"path","_id":"55cfaf675b49e71900262f46","required":true,"desc":"UUID of the user","default":"","type":"string","name":"uuid"},{"type":"string","name":"org","in":"path","_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"UUID of the role to join","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/users/:uuid/orgs/:org"},"body":"Removes user from an organization.","editedParams2":true,"updates":[],"user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove User from Organistation
Path Params
uuid:
required
string
UUID of the user
org:
required
string
UUID of the role to join
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55fc81e7af72eb0d0007e080","editedParams2":true,"excerpt":"","version":"55ce9b0a9d28781700b7c930","user":"55af3b15826d210d00041e02","__v":0,"body":"Crates a API token for a user with a given scope, please keep in mind that the reply to this request is **THE ONLY TIME** the bearer token can be accessed!","category":"55cea313db457c210076e5a2","createdAt":"2015-09-18T21:28:07.645Z","link_external":false,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","hidden":false,"link_url":"","order":999,"slug":"users-tokens-create","title":"Create API Key","api":{"results":{"codes":[{"code":"{\n \"bearer\": \"DZPGPuj67aVbAN62Uu2YYzdGGpYS4eUX\",\n \"id\": \"b7b5a77e-4919-4fc7-aa6e-19366cfe49f4\"\n}","name":"","status":200,"language":"json"}]},"settings":"","url":"/users/:uuid/tokens","auth":"required","method":"post","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the user"},{"in":"body","_id":"55cf261c46db442b00105be9","required":true,"desc":"A comment for the token","default":"","type":"string","name":"comment"},{"default":"","type":"array_string","name":"scopes","in":"body","_id":"55fc81e7af72eb0d0007e081","required":false,"desc":"A list of scopes for the token"}]},"editedParams":true,"githubsync":"","type":"post","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate API Key
Path Params
uuid:
required
string
UUID of the user
Body Params
comment:
required
string
A comment for the token
scopes:
array of strings
A list of scopes for the token
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55fc8295f4dbbf0d008f44a2","order":999,"project":"55ce9a298f17dc0d00da7c48","title":"Revoke Token","updates":[],"version":"55ce9b0a9d28781700b7c930","hidden":false,"link_url":"","editedParams":true,"editedParams2":true,"githubsync":"","slug":"users-tokens-revoke","api":{"params":[{"type":"string","name":"uuid","in":"path","_id":"55cfaea05b49e71900262f45","required":true,"desc":"UUID of the user","default":""},{"_id":"55fc8295f4dbbf0d008f44a3","required":true,"desc":"ID of the token to delete (not the token itself!)","default":"","type":"string","name":"token-id","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/users/:uuid/tokens/:token-id","auth":"required","method":"delete"},"user":"55af3b15826d210d00041e02","category":"55cea313db457c210076e5a2","createdAt":"2015-09-18T21:31:01.631Z","excerpt":"","link_external":false,"sync_unique":"","type":"delete","__v":0,"body":"Revokes a token, this applies equally for access and refresh tokens.","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRevoke Token
Path Params
uuid:
required
string
UUID of the user
token-id:
required
string
ID of the token to delete (not the token itself!)
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf261c46db442b00105be8","link_url":"","order":0,"slug":"clients-list","body":"Lists all clients visible to the user.\n\nSee [Get Client](doc:clients-get) for the fields available for `full-list-fields`.","excerpt":"","githubsync":"","hidden":false,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","type":"get","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":0,"createdAt":"2015-08-15T11:44:28.639Z","editedParams2":true,"updates":[],"api":{"auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","default":"false","desc":"to get a full list instead of UUIDs","name":"full-list","required":false,"type":"string","in":"query"},{"in":"query","_id":"55cf261c46db442b00105be9","default":"","desc":"fields to include in the full list (`,` separated)","name":"full-list-fields","required":false,"type":"array_string"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n \"7015cc51-3b09-45da-9cab-970d94b27c45\",\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/clients"},"category":"55cea3189d28781700b7c935","editedParams":true,"sync_unique":"","title":"List Clients","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Clients
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf272046db442b00105bec","user":"55af3b15826d210d00041e02","excerpt":"","hidden":false,"order":1,"title":"Create Client","link_external":false,"project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","__v":0,"editedParams":true,"githubsync":"","type":"post","body":"Creates a new client","category":"55cea3189d28781700b7c935","createdAt":"2015-08-15T11:48:48.335Z","editedParams2":true,"updates":[],"api":{"auth":"required","method":"post","params":[{"default":"","type":"string","name":"client","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"the ClientID"},{"in":"body","_id":"55cf261c46db442b00105be9","required":false,"desc":"the secret for the client","default":"","type":"string","name":"secret"}],"results":{"codes":[{"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/clients/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":"","status":303}]},"settings":"","url":"/clients"},"link_url":"","slug":"clients-create","sync_unique":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate Client
Body Params
client:
required
string
the ClientID
secret:
string
the secret for the client
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf275b5c06ee2100ecd9f7","__v":2,"createdAt":"2015-08-15T11:49:47.926Z","githubsync":"","slug":"clients-get","updates":[],"category":"55cea3189d28781700b7c935","link_external":false,"project":"55ce9a298f17dc0d00da7c48","type":"get","user":"55af3b15826d210d00041e02","body":"Reads a client","editedParams":true,"editedParams2":true,"hidden":false,"sync_unique":"","title":"Get Client","api":{"params":[{"type":"string","name":"uuid","in":"path","_id":"55cfaf8e8d728e0d00cc5b14","required":true,"desc":"UUID of the client","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"client_id\": \"Client1\",\n \"metadata\": {},\n \"name\": \"Client1\",\n \"permissions\": [],\n \"redirect_uris\": {\n \"606054\": \"http://test.com\"\n },\n \"roles\": [],\n \"type\": \"public\",\n \"uuid\": \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/clients/:uuid","auth":"required","method":"get"},"excerpt":"","link_url":"","order":2,"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Client
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf28068f17dc0d00da7ca1","body":"Changes the `secret` of a client","editedParams2":true,"excerpt":"","githubsync":"","sync_unique":"","title":"Set Client Secret","updates":[],"category":"55cea3189d28781700b7c935","link_url":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","api":{"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/clients/:uuid","auth":"required","method":"put","params":[{"required":true,"desc":"UUID of the client","default":"","type":"string","name":"uuid","in":"path","_id":"55cfaf9b957dcd3500b344a3"},{"desc":"New secret for the cleint","default":"","type":"string","name":"secret","in":"body","_id":"55cf28068f17dc0d00da7ca2","required":true}]},"link_external":false,"order":3,"slug":"clients-set-secret","type":"put","user":"55af3b15826d210d00041e02","__v":1,"createdAt":"2015-08-15T11:52:38.735Z","editedParams":true,"hidden":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putSet Client Secret
Path Params
uuid:
required
string
UUID of the client
Body Params
secret:
required
string
New secret for the cleint
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf28605c06ee2100ecd9f9","editedParams2":true,"hidden":false,"updates":[],"version":"55ce9b0a9d28781700b7c930","category":"55cea3189d28781700b7c935","createdAt":"2015-08-15T11:54:08.995Z","slug":"clients-delete","user":"55af3b15826d210d00041e02","excerpt":"","link_url":"","project":"55ce9a298f17dc0d00da7c48","type":"delete","api":{"method":"delete","params":[{"name":"uuid","in":"path","_id":"55cfafb25b49e71900262f47","required":true,"desc":"UUID of the client","default":"","type":"string"}],"results":{"codes":[{"name":"","status":204,"language":"json","code":""}]},"settings":"","url":"/clients/:uuid","auth":"required"},"githubsync":"","editedParams":true,"link_external":false,"order":4,"sync_unique":"","title":"Delete Client","__v":1,"body":"Deletes a Client.","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Client
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf294646db442b00105bef","link_url":"","user":"55af3b15826d210d00041e02","__v":2,"api":{"settings":"","url":"/clients/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"language":"http","code":"GET /api/2/clients/b7c658e0-2ddb-46dd-8973-4a59ffc9957e/permissions/cloud/vms/create HTTP/1.1\nhost: cloud.project-fifo.net\naccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"get","params":[{"desc":"UUID of the client","default":"","type":"string","name":"uuid","in":"path","_id":"55cfafc1957dcd3500b344a4","required":true},{"type":"string","name":"permission","in":"path","_id":"55cf29fa8f17dc0d00da7ca5","required":true,"desc":"the permission to test as path i.e. `some/funky/permission`","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"ok\": \"allowed\"\n}","name":"Allowed"},{"name":"Forbidden","status":200,"language":"text","code":"{\n \"error\": \"forbidden\"\n}"}]}},"category":"55cea3189d28781700b7c935","createdAt":"2015-08-15T11:57:58.268Z","project":"55ce9a298f17dc0d00da7c48","title":"Test Client Permissions","type":"get","updates":[],"body":"Tests if a client has is allowed to perform an action. Please note that 403 here does **not** mean the client is not allowed but that the requesting token was not allowed to test for the client!","editedParams":true,"editedParams2":true,"githubsync":"","link_external":false,"order":5,"excerpt":"","hidden":false,"slug":"clients-permissions-test","sync_unique":"","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getTest Client Permissions
Path Params
uuid:
required
string
UUID of the client
permission:
required
string
the permission to test as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cf29b746db442b00105bf1","category":"55cea3189d28781700b7c935","link_url":"","slug":"clients-permission-grant","__v":2,"user":"55af3b15826d210d00041e02","title":"Grant Client Permissions","body":"Grants a permission> to a client .","createdAt":"2015-08-15T11:59:51.612Z","editedParams2":true,"githubsync":"","hidden":false,"link_external":false,"sync_unique":"","type":"put","updates":[],"api":{"params":[{"in":"path","_id":"55cfafe7957dcd3500b344a5","required":true,"desc":"UUID of the client","default":"","type":"string","name":"uuid"},{"default":"","type":"string","name":"permission","in":"path","_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to grant as path i.e. `some/funky/permission`"}],"results":{"codes":[{"status":201,"language":"text","code":""}]},"settings":"","url":"/clients/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/clients/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"put"},"editedParams":true,"excerpt":"","order":6,"project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putGrant Client Permissions
Path Params
uuid:
required
string
UUID of the client
permission:
required
string
the permission to grant as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cf2a575c06ee2100ecd9fb","__v":1,"body":"Revokes a permission to a client .","link_url":"","order":7,"sync_unique":"","user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/clients/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"language":"http","code":"DELETE /api/2/clients/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"delete","params":[{"in":"path","_id":"55cfaff65b49e71900262f48","required":true,"desc":"UUID of the client","default":"","type":"string","name":"uuid"},{"type":"string","name":"permission","in":"path","_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to revoke as path i.e. `some/funky/permission`","default":""}],"results":{"codes":[{"status":204,"language":"text","code":""}]}},"editedParams":true,"slug":"orgs-permission-revoke","title":"Revoke Client Permissions","updates":[],"version":"55ce9b0a9d28781700b7c930","category":"55cea3189d28781700b7c935","editedParams2":true,"excerpt":"","link_external":false,"project":"55ce9a298f17dc0d00da7c48","type":"delete","createdAt":"2015-08-15T12:02:31.142Z","githubsync":"","hidden":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRevoke Client Permissions
Path Params
uuid:
required
string
UUID of the client
permission:
required
string
the permission to revoke as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cf2ae48f17dc0d00da7ca6","editedParams2":true,"excerpt":"","title":"Add Redirect URI to Client","type":"post","githubsync":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","slug":"clients-uri-add","api":{"url":"/clients/:uuid/uris","auth":"required","method":"post","params":[{"desc":"UUID of the client","default":"","type":"string","name":"uuid","in":"path","_id":"55cfb0098d728e0d00cc5b15","required":true},{"type":"string","name":"uri","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"the URI to add","default":""}],"results":{"codes":[{"status":204,"language":"http","code":"","name":""}]},"settings":""},"link_url":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-15T12:04:52.146Z","editedParams":true,"link_external":false,"order":8,"__v":1,"body":"Adds an URI to the valid redirect URI’s for this client.","category":"55cea3189d28781700b7c935","sync_unique":"","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd Redirect URI to Client
Path Params
uuid:
required
string
UUID of the client
Body Params
uri:
required
string
the URI to add
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf2c205c06ee2100ecd9fd","title":"Remove Redirect URI from Client","body":"Deletes key with given uuid for client with given uuid.","githubsync":"","slug":"clients-uri-delete","sync_unique":"","category":"55cea3189d28781700b7c935","hidden":false,"user":"55af3b15826d210d00041e02","editedParams2":true,"order":9,"__v":1,"api":{"url":"/clients/:uuid/uris/:id","auth":"required","method":"delete","params":[{"name":"uuid","in":"path","_id":"55cfb01b8d728e0d00cc5b16","required":true,"desc":"UUID of the client","default":"","type":"string"},{"name":"id","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"id of the URI to delete","default":"","type":"int"}],"results":{"codes":[{"status":204,"language":"http","code":"","name":""}]},"settings":""},"createdAt":"2015-08-15T12:10:08.153Z","editedParams":true,"type":"delete","updates":[],"version":"55ce9b0a9d28781700b7c930","excerpt":"","link_external":false,"link_url":"","project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove Redirect URI from Client
Path Params
uuid:
required
string
UUID of the client
id:
required
integer
id of the URI to delete
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfa75a8d728e0d00cc5b06","user":"55af3b15826d210d00041e02","__v":0,"body":"Lists all roles visible to the user.\n\nSee [Get Roles](doc:roles-get) for the fields available for `full-list-fields`.","category":"55cea31c9d28781700b7c936","link_external":false,"order":0,"type":"get","createdAt":"2015-08-15T20:55:54.609Z","githubsync":"","title":"List Roles","updates":[],"editedParams":true,"editedParams2":true,"link_url":"","version":"55ce9b0a9d28781700b7c930","api":{"auth":"required","method":"get","params":[{"in":"query","_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list"},{"default":"","type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n \"7015cc51-3b09-45da-9cab-970d94b27c45\",\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/roles"},"excerpt":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","slug":"roles-list","sync_unique":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Roles
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfcc1c2096360d0071364a","createdAt":"2015-08-15T23:32:44.761Z","editedParams":true,"excerpt":"","hidden":false,"api":{"url":"/roles","auth":"required","method":"post","params":[{"desc":"Name of the role","default":"","type":"string","name":"name","in":"body","_id":"55cf261c46db442b00105bea","required":true},{"default":"","type":"string","name":"secret","in":"body","_id":"55cf261c46db442b00105be9","required":false,"desc":"the secret for the client"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/roles/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]},"settings":""},"link_url":"","sync_unique":"","body":"Creates a new client","editedParams2":true,"githubsync":"","link_external":false,"order":1,"slug":"roles-add","version":"55ce9b0a9d28781700b7c930","category":"55cea31c9d28781700b7c936","project":"55ce9a298f17dc0d00da7c48","title":"Create Role","type":"post","updates":[],"user":"55af3b15826d210d00041e02","__v":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate Role
Body Params
name:
required
string
Name of the role
secret:
string
the secret for the client
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfa91b8d728e0d00cc5b08","excerpt":"","hidden":false,"link_url":"","title":"Get Role","type":"get","updates":[],"__v":0,"body":"Reads a role","category":"55cea31c9d28781700b7c936","user":"55af3b15826d210d00041e02","api":{"method":"get","params":[{"desc":"UUID of the role","name":"uuid","required":true,"type":"string","in":"path","_id":"55cf261c46db442b00105bea","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"metadata\": {},\n \"name\": \"Users\",\n \"permissions\": [\n [\n \"cloud\",\n \"cloud\",\n \"status\"\n ],\n [\n \"cloud\",\n \"datasets\",\n \"list\"\n ],\n [\n \"cloud\",\n \"hypervisors\",\n \"list\"\n ],\n [\n \"cloud\",\n \"ipranges\",\n \"list\"\n ],\n [\n \"cloud\",\n \"networks\",\n \"list\"\n ],\n [\n \"cloud\",\n \"orgs\",\n \"list\"\n ],\n [\n \"cloud\",\n \"packages\",\n \"list\"\n ],\n [\n \"cloud\",\n \"roles\",\n \"list\"\n ],\n [\n \"cloud\",\n \"users\",\n \"list\"\n ],\n [\n \"cloud\",\n \"vms\",\n \"create\"\n ],\n [\n \"cloud\",\n \"vms\",\n \"list\"\n ],\n [\n \"datasets\",\n \"_\",\n \"create\"\n ],\n [\n \"hypervisors\",\n \"_\",\n \"create\"\n ],\n [\n \"roles\",\n \"ad29d0b8-111e-46f8-9d96-8ef32b17f9be\",\n \"get\"\n ]\n ],\n \"uuid\": \"ad29d0b8-111e-46f8-9d96-8ef32b17f9be\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/roles/:uuid","auth":"required"},"editedParams":true,"editedParams2":true,"link_external":false,"order":2,"slug":"roles-get","sync_unique":"","createdAt":"2015-08-15T21:03:23.348Z","githubsync":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Role
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfa9a58d728e0d00cc5b0a","title":"Delete Role","user":"55af3b15826d210d00041e02","body":"Deletes a role","editedParams":true,"excerpt":"","githubsync":"","api":{"url":"/roles/:uuid","auth":"required","method":"delete","params":[{"type":"string","in":"path","_id":"55cf261c46db442b00105bea","default":"false","desc":"UUID of the role","name":"uuid","required":true}],"results":{"codes":[{"code":"","name":"","status":204,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":""},"link_external":false,"sync_unique":"","updates":[],"project":"55ce9a298f17dc0d00da7c48","slug":"roles-delete","__v":0,"createdAt":"2015-08-15T21:05:41.952Z","hidden":false,"order":3,"type":"delete","version":"55ce9b0a9d28781700b7c930","category":"55cea31c9d28781700b7c936","editedParams2":true,"link_url":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Role
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfaa2a957dcd3500b3449e","title":"Grant Role Permissions","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":1,"api":{"params":[{"required":true,"desc":"UUID of the role","default":"","type":"string","name":"uuid","in":"path","_id":"55cfb0748d728e0d00cc5b18"},{"name":"permission","in":"path","_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to grant as path i.e. `some/funky/permission`","default":"","type":"string"}],"results":{"codes":[{"status":201,"language":"text","code":""}]},"settings":"","url":"/roles/:uuid/permissions/:permission","auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/roles/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"put"},"category":"55cea31c9d28781700b7c936","createdAt":"2015-08-15T21:07:54.072Z","sync_unique":"","body":"Grants a permission to a role.","editedParams":true,"editedParams2":true,"excerpt":"","slug":"roles-permission-grant","githubsync":"","link_external":false,"link_url":"","order":4,"type":"put","hidden":false,"project":"55ce9a298f17dc0d00da7c48","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putGrant Role Permissions
Path Params
uuid:
required
string
UUID of the role
permission:
required
string
the permission to grant as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cfaa6e8d728e0d00cc5b0b","githubsync":"","link_external":false,"link_url":"","updates":[],"api":{"auth":"required","examples":{"codes":[{"language":"http","code":"DELETE /api/2/roles/7df734a1-7332-45da-aa2a-9a3d856fa58a/permissions/groupings/35c4cfbb-057c-455b-93f8-e93205d44ada/get HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6","name":""}]},"method":"delete","params":[{"_id":"55cfb0828d728e0d00cc5b19","required":true,"desc":"UUID of the role","default":"","type":"string","name":"uuid","in":"path"},{"in":"path","_id":"55cf29e98f17dc0d00da7ca4","required":true,"desc":"the permission to revoke as path i.e. `some/funky/permission`","default":"","type":"string","name":"permission"}],"results":{"codes":[{"status":204,"language":"text","code":""}]},"settings":"","url":"/roles/:uuid/permissions/:permission"},"body":"Revokes a permission from a role.","order":5,"title":"Revoke Role Permissions","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-15T21:09:02.196Z","editedParams":true,"hidden":false,"sync_unique":"","type":"delete","__v":1,"category":"55cea31c9d28781700b7c936","editedParams2":true,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","slug":"roles-permission-revoke","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRevoke Role Permissions
Path Params
uuid:
required
string
UUID of the role
permission:
required
string
the permission to revoke as path i.e. `some/funky/permission`
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55cfb351957dcd3500b344a6","order":0,"api":{"auth":"required","method":"get","params":[{"in":"query","_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list"},{"type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":""}],"results":{"codes":[{"language":"json","code":"[\n \"7015cc51-3b09-45da-9cab-970d94b27c45\",\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/orgs"},"editedParams":true,"githubsync":"","hidden":false,"sync_unique":"","updates":[],"link_external":false,"link_url":"","project":"55ce9a298f17dc0d00da7c48","slug":"orgs-list","body":"Lists all organizations visible to the user.\n\nSee [Get Org](doc:orgs-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-15T21:46:57.241Z","editedParams2":true,"version":"55ce9b0a9d28781700b7c930","type":"get","user":"55af3b15826d210d00041e02","__v":0,"category":"55cea3389d28781700b7c937","excerpt":"","title":"List Organizations","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Organizations
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfcba63568180d0046238f","hidden":false,"order":1,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","title":"Create an Organization","updates":[],"__v":0,"category":"55cea3389d28781700b7c937","excerpt":"","link_external":false,"link_url":"","slug":"orgs-add","editedParams2":true,"githubsync":"","type":"post","user":"55af3b15826d210d00041e02","api":{"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/orgs","auth":"required","method":"post","params":[{"name":"name","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"the name of the organization","default":"false","type":"string"}]},"createdAt":"2015-08-15T23:30:46.882Z","editedParams":true,"version":"55ce9b0a9d28781700b7c930","body":"Creates a new organization.","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate an Organization
Body Params
name:
required
stringfalse
the name of the organization
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfcb002096360d00713647","createdAt":"2015-08-15T23:28:00.884Z","order":2,"user":"55af3b15826d210d00041e02","link_url":"","title":"Get Organization","version":"55ce9b0a9d28781700b7c930","__v":0,"body":"Reads a org","editedParams2":true,"githubsync":"","updates":[],"category":"55cea3389d28781700b7c937","editedParams":true,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","slug":"get-organization","sync_unique":"","type":"get","api":{"url":"/orgs/:uuid","auth":"required","method":"get","params":[{"desc":"UUID of the org","default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"metadata\": {},\n \"name\": \"Test Org\",\n \"triggers\": [],\n \"uuid\": \"102747cc-b1a7-461f-b387-7fe93a7c00f5\"\n}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":""},"excerpt":"","hidden":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Organization
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf24c95c06ee2100ecd9f4","category":"55cea3389d28781700b7c937","hidden":false,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","title":"Get Accounting Data","updates":[],"__v":1,"type":"get","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","body":"This will grab accounting data for a period between `start` and `end`. The data presented will include all data points for every resource that existed in this timeframe not only those in the timeframe.\n\nThis allows reconstructing the entire situation during the time frame, including resources that were created before and destroyed after the period.","editedParams2":true,"slug":"orgs-accounting","sync_unique":"","githubsync":"","link_url":"","editedParams":true,"excerpt":"","order":3,"api":{"auth":"required","method":"get","params":[{"required":true,"desc":"UUID of the organization","default":"","type":"string","name":"uuid","in":"path","_id":"55cfb0a05b49e71900262f49"},{"desc":"Timestamp of the start of the accounting period","default":"","type":"int","name":"start","in":"query","_id":"55cf24c95c06ee2100ecd9f6","required":true},{"type":"int","name":"end","in":"query","_id":"55cf24c95c06ee2100ecd9f5","required":true,"desc":"Timestamp of the end of the accounting period","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n \"action\": \"create\",\n \"metadata\": {\n \"package\": \"f33d78b0-423b-11e5-9408-4b0bc2b37a43\",\n \"dataset\": \"008497c4-423c-11e5-a926-077d74874de7\"\n },\n \"resource\": \"f3121497-23ee-467c-bb3f-8b37cc41a9f6\",\n \"timestamp\": 14211\n },\n {\n \"action\": \"create\",\n \"metadata\": {\n \"package\": \"f33d78b0-423b-11e5-9408-4b0bc2b37a43\",\n \"dataset\": \"1316cfd8-423c-11e5-8434-67fe3d93dfba\"\n },\n \"resource\": \"69b09fac-916b-42e1-9b91-9c68a077d4df\",\n \"timestamp\": 15982\n },\n {\n \"action\": \"create\",\n \"metadata\": {\n \"package\": \"187629d8-423c-11e5-9f87-dbc6b0f5fb32\",\n \"dataset\": \"1de84612-423c-11e5-9a37-b388720c2b9c\"\n },\n \"resource\": \"cee67f6b-9a94-4356-ad20-4c8a3c40efbd\",\n \"timestamp\": 21498\n }\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/orgs/:uuid/accounting"},"createdAt":"2015-08-15T11:38:49.953Z","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Accounting Data
Path Params
uuid:
required
string
UUID of the organization
Query Params
start:
required
integer
Timestamp of the start of the accounting period
end:
required
integer
Timestamp of the end of the accounting period
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cfccef8d728e0d00cc5b43","__v":0,"category":"55cea3389d28781700b7c937","createdAt":"2015-08-15T23:36:15.111Z","slug":"orgs-delete","type":"delete","editedParams":true,"editedParams2":true,"hidden":false,"version":"55ce9b0a9d28781700b7c930","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","api":{"auth":"required","method":"delete","params":[{"type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the org","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/orgs/:uuid"},"body":"Deletes an organization","githubsync":"","link_url":"","order":4,"user":"55af3b15826d210d00041e02","excerpt":"","link_external":false,"title":"Delete Organization","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Organization
Path Params
uuid:
required
string
UUID of the org
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cfceff2096360d0071364d","order":5,"user":"55af3b15826d210d00041e02","editedParams":true,"excerpt":"","sync_unique":"","editedParams2":true,"link_url":"","project":"55ce9a298f17dc0d00da7c48","slug":"orgs-triggers-user_create","__v":0,"api":{"url":"/orgs/:uuid/triggers/user_create","auth":"required","examples":{"codes":[{"code":"POST /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603/triggers/user_create HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json;charset=UTF-8\n\n{\n \"action\": \"role_grant\",\n \"base\": \"vms\",\n \"permission\": [\"get\"],\n \"target\": \"094a757b-84cd-46df-92bb-279a943fa489\"\n}","language":"http","name":""},{"code":"POST /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603/triggers/user_create HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json;charset=UTF-8\n\n{\n \"action\": \"join_role\",\n \"target\": \"094a757b-84cd-46df-92bb-279a943fa489\"\n}","language":"http"}]},"method":"post","params":[{"desc":"UUID of the organization.","name":"uuid","ref":"","required":true,"type":"string","in":"path","_id":"55cf261c46db442b00105bea","default":"false"},{"ref":"","required":true,"type":"string","in":"body","_id":"55cfceff2096360d00713651","default":"","desc":"Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`.","name":"action"},{"_id":"55cfceff2096360d00713650","default":"","desc":"For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.","name":"target","ref":"","required":true,"type":"string","in":"body"},{"_id":"55cfceff2096360d0071364f","default":"","desc":"For `*_grant` triggers, the base of the permissions to be granted.","name":"base","ref":"","required":false,"type":"string","in":"body"},{"_id":"55cfceff2096360d0071364e","default":"","desc":"The rest of the permission to be granted","name":"permission","ref":"","required":false,"type":"array_string","in":"body"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":""},"body":"This trigger is executed when a new user is created from someone who belongs to an org.","category":"55cea3389d28781700b7c937","updates":[],"link_external":false,"title":"Add Trigger when a User is Created","type":"post","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-15T23:45:03.837Z","githubsync":"","hidden":false,"isReference":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd Trigger when a User is Created
Path Params
uuid:
required
stringfalse
UUID of the organization.
Body Params
action:
required
string
Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`.
target:
required
string
For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.
base:
string
For `*_grant` triggers, the base of the permissions to be granted.
permission:
array of strings
The rest of the permission to be granted
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cfcf418d728e0d00cc5b44","api":{"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/orgs/:uuid/triggers/dataset_create","auth":"required","examples":{"codes":[{"language":"http","code":"POST /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603/triggers/dataset_create HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json;charset=UTF-8\n\n{\n \"action\": \"role_grant\",\n \"base\": \"datasets\",\n \"permission\": [\"get\"],\n \"target\": \"094a757b-84cd-46df-92bb-279a943fa489\"\n}","name":""}]},"method":"post","params":[{"in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the organization.","default":"false","type":"string","name":"uuid"},{"default":"","type":"string","name":"action","in":"body","_id":"55cfceff2096360d00713651","required":true,"desc":"Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`."},{"in":"body","_id":"55cfceff2096360d00713650","required":true,"desc":"For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.","default":"","type":"string","name":"target"},{"default":"","type":"string","name":"base","in":"body","_id":"55cfceff2096360d0071364f","required":false,"desc":"For `*_grant` triggers, the base of the permissions to be granted."},{"required":false,"desc":"The rest of the permission to be granted","default":"","type":"array_string","name":"permission","in":"body","_id":"55cfceff2096360d0071364e"}]},"editedParams2":true,"excerpt":"","version":"55ce9b0a9d28781700b7c930","editedParams":true,"link_url":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","user":"55af3b15826d210d00041e02","category":"55cea3389d28781700b7c937","hidden":false,"slug":"orgs-triggers-dataset_create","title":"Add Trigger when a Dataset is Created","updates":[],"__v":0,"body":"This trigger is executed when a new dataset is created from someone who belongs to this org.","createdAt":"2015-08-15T23:46:09.974Z","githubsync":"","link_external":false,"order":6,"type":"post","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd Trigger when a Dataset is Created
Path Params
uuid:
required
stringfalse
UUID of the organization.
Body Params
action:
required
string
Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`.
target:
required
string
For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.
base:
string
For `*_grant` triggers, the base of the permissions to be granted.
permission:
array of strings
The rest of the permission to be granted
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cfd08c2096360d00713652","updates":[],"api":{"method":"post","params":[{"ref":"","required":true,"type":"string","in":"path","_id":"55cf261c46db442b00105bea","default":"false","desc":"UUID of the organization.","name":"uuid"},{"in":"body","_id":"55cfceff2096360d00713651","default":"","desc":"Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`.","name":"action","ref":"","required":true,"type":"string"},{"type":"string","in":"body","_id":"55cfceff2096360d00713650","default":"","desc":"For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.","name":"target","ref":"","required":true},{"name":"base","ref":"","required":false,"type":"string","in":"body","_id":"55cfceff2096360d0071364f","default":"","desc":"For `*_grant` triggers, the base of the permissions to be granted."},{"type":"array_string","in":"body","_id":"55cfceff2096360d0071364e","default":"","desc":"The rest of the permission to be granted","name":"permission","ref":"","required":false}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/orgs/:uuid/triggers/vm_create","auth":"required","examples":{"codes":[{"language":"http","code":"POST /api/2/orgs/72b3cdb0-7647-478b-906e-28a59f09c603/triggers/vm_create HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json;charset=UTF-8\n\n{\n \"action\": \"role_grant\",\n \"base\": \"datasets\",\n \"permission\": [\"get\"],\n \"target\": \"094a757b-84cd-46df-92bb-279a943fa489\"\n}","name":""}]}},"category":"55cea3389d28781700b7c937","createdAt":"2015-08-15T23:51:40.995Z","editedParams2":true,"isReference":false,"link_url":"","title":"Add Trigger when a VM is Created","user":"55af3b15826d210d00041e02","body":"This trigger is executed when a new VM is created by someone who belongs to this org.","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"post","excerpt":"","githubsync":"","hidden":false,"slug":"orgs-triggers-vm_create","version":"55ce9b0a9d28781700b7c930","__v":0,"editedParams":true,"link_external":false,"order":7,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd Trigger when a VM is Created
Path Params
uuid:
required
stringfalse
UUID of the organization.
Body Params
action:
required
string
Action to be performed, one of `join_role`, `join_org`, `role_grant` and `user_grant`.
target:
required
string
For `join_*` actions the role or org to be joined, for `*_grant` the role or user the permission to be granted to.
base:
string
For `*_grant` triggers, the base of the permissions to be granted.
permission:
array of strings
The rest of the permission to be granted
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cfcd443568180d00462390","editedParams":true,"excerpt":"","order":8,"version":"55ce9b0a9d28781700b7c930","editedParams2":true,"githubsync":"","link_external":false,"link_url":"","slug":"delete-trigger-from-organization","sync_unique":"","api":{"settings":"","url":"/orgs/:uuid/triggers/:trigger-id","auth":"required","method":"delete","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the org","default":"","type":"string","name":"uuid","in":"path"},{"in":"path","_id":"55cfcd443568180d00462391","required":true,"desc":"trigger to be deleted","default":"","type":"int","name":"trigger-id"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"title":"Delete Trigger from Organization","type":"delete","user":"55af3b15826d210d00041e02","project":"55ce9a298f17dc0d00da7c48","body":"Deletes a trigger from an organization","category":"55cea3389d28781700b7c937","createdAt":"2015-08-15T23:37:40.021Z","hidden":false,"updates":[],"__v":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Trigger from Organization
Path Params
uuid:
required
string
UUID of the org
trigger-id:
required
integer
trigger to be deleted
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d55d9b5082980d0009c99a","githubsync":"","updates":[],"title":"List Hypervisors","version":"55ce9b0a9d28781700b7c930","__v":0,"api":{"results":{"codes":[{"status":200,"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/hypervisors","auth":"required","method":"get","params":[{"default":"false","type":"string","name":"full-list","in":"query","_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs"},{"required":false,"desc":"fields to include in the full list (`,` separated)","default":"","type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9"}]},"link_url":"","order":0,"slug":"hypervisors-list","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","category":"55cea343db457c210076e5a3","editedParams":true,"editedParams2":true,"excerpt":"","hidden":false,"body":"Lists all hypervisors visible to the user.\n\nSee [Get Hypervisor](doc:hypervisors-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-20T04:54:51.328Z","link_external":false,"type":"get","user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Hypervisors
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d55e7c5082980d0009c99b","project":"55ce9a298f17dc0d00da7c48","title":"Get Hypervisor","updates":[],"api":{"settings":"","url":"/hypervisors/:uuid","auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the hypervisor","default":"","type":"string","name":"uuid","in":"path"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n \"alias\": \"\",\n \"characteristics\": [],\n \"etherstubs\": [],\n \"host\": \"192.168.1.22\",\n \"metadata\": [],\n \"networks\": [\n \"admin\"\n ],\n \"path\": [],\n \"pools\": {\n \"zones\": {\n \"dedup\": 100,\n \"free\": 272376,\n \"health\": \"ONLINE\",\n \"size\": 305152,\n \"used\": 32776\n }\n },\n \"port\": 4200,\n \"resources\": {\n \"free-memory\": 16356,\n \"l1hits\": 24367455,\n \"l1miss\": 1843639,\n \"l1size\": 3945,\n \"l2hits\": 0,\n \"l2miss\": 0,\n \"l2size\": 0,\n \"provisioned-memory\": 0,\n \"reserved-memory\": 0,\n \"total-memory\": 16356\n },\n \"services\": {\n \"lrc:/etc/rc2_d/S20sysetup\": \"legacy_run\",\n \"lrc:/etc/rc2_d/S47pppd\": \"legacy_run\",\n \"lrc:/etc/rc2_d/S81dodatadm_udaplt\": \"legacy_run\",\n \"lrc:/etc/rc2_d/S89PRESERVE\": \"legacy_run\",\n \"svc:/milestone/devices:default\": \"online\",\n \"svc:/milestone/multi-user-server:default\": \"online\",\n \"svc:/milestone/multi-user:default\": \"online\",\n \"svc:/milestone/name-services:default\": \"online\",\n//...\n \"svc:/system/utmp:default\": \"online\",\n \"svc:/system/vtdaemon:default\": \"online\",\n \"svc:/system/zones:default\": \"online\"\n },\n \"sysinfo\": {\n \"Boot Parameters\": {\n \"console\": \"text\",\n \"smartos\": \"true\"\n },\n \"Boot Time\": \"1439417554\",\n \"CPU Physical Cores\": 1,\n \"CPU Total Cores\": 4,\n \"CPU Type\": \"Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz\",\n \"CPU Virtualization\": \"vmx\",\n \"Disks\": {\n \"c1t0d0\": {\n \"Size in GB\": 320\n },\n \"c1t1d0\": {\n \"Size in GB\": 320\n }\n },\n \"HW Family\": \"To be filled by O.E.M.\",\n \"HW Version\": \"0123456789\",\n \"Hostname\": \"00-25-90-a6-3b-c7\",\n \"Link Aggregations\": {},\n \"Live Image\": \"20150806T063417Z\",\n \"Manufacturer\": \"Supermicro\",\n \"MiB of Memory\": \"16356\",\n \"Network Interfaces\": {\n \"e1000g0\": {\n \"Link Status\": \"up\",\n \"MAC Address\": \"00:25:90:a6:3b:c7\",\n \"NIC Names\": [\n \"admin\"\n ],\n \"ip4addr\": \"192.168.1.22\"\n },\n \"e1000g1\": {\n \"Link Status\": \"down\",\n \"MAC Address\": \"00:25:90:a6:3b:c6\",\n \"NIC Names\": [],\n \"ip4addr\": \"\"\n }\n },\n \"Product\": \"X9SCL/X9SCM\",\n \"SDC Version\": \"7.0\",\n \"SKU Number\": \"To be filled by O.E.M.\",\n \"Serial Number\": \"0123456789\",\n \"Setup\": \"false\",\n \"System Type\": \"SunOS\",\n \"UUID\": \"002590a6-3bc6-0607-0025-90a63bc60e0f\",\n \"VM Capable\": true,\n \"Virtual Network Interfaces\": {},\n \"Zpool\": \"zones\",\n \"Zpool Creation\": 1365567446,\n \"Zpool Disks\": \"c1t0d0,c1t1d0\",\n \"Zpool Profile\": \"mirror\",\n \"Zpool Size in GiB\": 288\n },\n \"uuid\": \"\",\n \"version\": \"test-c5ed54f, Tue Aug 18 15:00:36 2015 +0200\",\n \"virtualisation\": [\n \"zone\",\n \"kvm\"\n ]\n}"},{"language":"json","code":"{}","name":"","status":400}]}},"category":"55cea343db457c210076e5a3","editedParams":true,"excerpt":"","__v":0,"user":"55af3b15826d210d00041e02","link_url":"","order":1,"sync_unique":"","body":"Reads a Hypervisor","githubsync":"","link_external":false,"type":"get","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-20T04:58:36.473Z","editedParams2":true,"hidden":false,"slug":"hypervisors-get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Hypervisor
Path Params
uuid:
required
string
UUID of the hypervisor
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d55eb74fe64521006d5a95","editedParams":true,"hidden":false,"type":"delete","version":"55ce9b0a9d28781700b7c930","category":"55cea343db457c210076e5a3","link_external":false,"order":3,"project":"55ce9a298f17dc0d00da7c48","title":"Delete Hypervisor","body":"Deletes a Hypervisor. Every VM still residing on this hypervisor will either be put in **limbo** when at least one full backup exists, or be deleted if not.","githubsync":"","sync_unique":"","__v":0,"api":{"url":"/hypervisors/:uuid","auth":"required","method":"delete","params":[{"desc":"UUID of the hypervisor","default":"","type":"string","name":"uuid","in":"path","_id":"55cfaea05b49e71900262f45","required":true}],"results":{"codes":[{"language":"json","code":"","name":"","status":204}]},"settings":""},"createdAt":"2015-08-20T04:59:35.373Z","editedParams2":true,"excerpt":"","link_url":"","slug":"hypervisors-delete","updates":[],"user":"55af3b15826d210d00041e02","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Hypervisor
Path Params
uuid:
required
string
UUID of the hypervisor
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d55f68988e130d000b3f8a","__v":0,"body":"Sets a hypervisor characteristic, this can be later used on rules to match against.","hidden":false,"user":"55af3b15826d210d00041e02","createdAt":"2015-08-20T05:02:32.942Z","editedParams":true,"excerpt":"","githubsync":"","link_external":false,"link_url":"","sync_unique":"","editedParams2":true,"project":"55ce9a298f17dc0d00da7c48","slug":"hypervisors-characteristics-add","title":"Set Hypervisor Characteristic","type":"put","updates":[],"api":{"method":"put","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cfadf05b49e71900262f43","required":true,"desc":"UUID of the hypervisor"},{"required":false,"desc":"URL path prefix of the characteristic","default":"","type":"string","name":"path","in":"path","_id":"55cf2da18f17dc0d00da7ca9"}],"results":{"codes":[{"code":"","name":"","status":204,"language":"json"}]},"settings":"","url":"/hypervisors/:uuid/characteristics/:path","auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/hypervisors/cae242d0-fb7a-4a37-82c7-dcc73ce0fa8d/characteristics HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json\n\n{\"color\": \"blue\"}","name":""}]}},"category":"55cea343db457c210076e5a3","order":4,"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putSet Hypervisor Characteristic
Path Params
uuid:
required
string
UUID of the hypervisor
path:
string
URL path prefix of the characteristic
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55d55fb7988e130d000b3f8b","body":"Removes a characteristic from a hypervisor","createdAt":"2015-08-20T05:03:51.186Z","editedParams":true,"link_url":"","sync_unique":"","project":"55ce9a298f17dc0d00da7c48","slug":"hypervisors-characteristics-delete","type":"delete","version":"55ce9b0a9d28781700b7c930","__v":1,"category":"55cea343db457c210076e5a3","editedParams2":true,"hidden":false,"user":"55af3b15826d210d00041e02","api":{"examples":{"codes":[{"name":"","language":"http","code":"DELETE /api/2/hypervisors/2ca285a3-05a8-4ca6-befd-78fa994929ab/characteristics/color/front HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json"}]},"method":"delete","params":[{"type":"string","name":"uuid","in":"path","_id":"55cfae1d8d728e0d00cc5b0c","required":true,"desc":"UUID of the hypervisor","default":""},{"_id":"55cf2da18f17dc0d00da7ca9","required":false,"desc":"URL path to characteristic to delete","default":"","type":"string","name":"path","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""}]},"settings":"","url":"/hypervisors/:uuid/characteristics/:path","auth":"required"},"excerpt":"","githubsync":"","link_external":false,"order":5,"title":"Delete Hypervisor Characteristic","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Hypervisor Characteristic
Path Params
uuid:
required
string
UUID of the hypervisor
path:
string
URL path to characteristic to delete
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55f2ca8ccb01c71900c8e200","editedParams":true,"editedParams2":true,"link_url":"","order":6,"api":{"auth":"required","examples":{"codes":[{"language":"http","code":"PUT /api/2/hypervisors/cae242d0-fb7a-4a37-82c7-dcc73ce0fa8d/characteristics HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nContent-Type: application/json\n\n{\"color\": \"blue\"}","name":""}]},"method":"put","params":[{"type":"string","name":"uuid","in":"path","_id":"55cfadf05b49e71900262f43","required":true,"desc":"UUID of the hypervisor","default":""},{"_id":"55cf2da18f17dc0d00da7ca9","required":true,"desc":"New alias of the hypervisor","default":"","type":"string","name":"alias","in":"body"}],"results":{"codes":[{"name":"","status":204,"language":"json","code":""}]},"settings":"","url":"/hypervisors/:uuid/config"},"body":"Sets a configuration / alias of the hypervisor.","createdAt":"2015-09-11T12:35:24.905Z","slug":"hypervisors-config-set","sync_unique":"","__v":0,"project":"55ce9a298f17dc0d00da7c48","title":"Set Hypervisor Configuration","type":"put","excerpt":"","link_external":false,"user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","category":"55cea343db457c210076e5a3","githubsync":"","hidden":false,"updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putSet Hypervisor Configuration
Path Params
uuid:
required
string
UUID of the hypervisor
Body Params
alias:
required
string
New alias of the hypervisor
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55d093698d728e0d00cc5b8d","editedParams2":true,"excerpt":"","githubsync":"","link_external":false,"type":"get","category":"55cea3499d28781700b7c938","project":"55ce9a298f17dc0d00da7c48","title":"List VMs","updates":[],"user":"55af3b15826d210d00041e02","body":"Lists all VMs visible to the user.\n\nSee [Get VM](doc:vms-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-16T13:43:05.883Z","editedParams":true,"slug":"vms-list","sync_unique":"","version":"55ce9b0a9d28781700b7c930","__v":0,"api":{"auth":"required","method":"get","params":[{"in":"query","_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list"},{"type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":""}],"results":{"codes":[{"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms"},"hidden":false,"link_url":"","order":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList VMs
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d098178d728e0d00cc5b91","editedParams":true,"updates":[],"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"post","user":"55af3b15826d210d00041e02","body":"This request queues a new VM creation. Most of the keys in `config` are self-explanatory the one noteworthy is `networks` however. It is a map of nics (provided by the dataset) to UUIDs of **networks** (not ip ranges!).","createdAt":"2015-08-16T14:03:03.276Z","link_external":false,"link_url":"","order":1,"slug":"vms-create","version":"55ce9b0a9d28781700b7c930","category":"55cea3499d28781700b7c938","excerpt":"","hidden":false,"githubsync":"","title":"Create VM","__v":0,"api":{"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/vms/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/vms","auth":"required","examples":{"codes":[{"code":"POST /api/2/vms HTTP/1.1\nAccept: application/json\nContent-Type: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\n\n {\n \"package\": \"aa77ce44-cdb6-4e59-8f64-97f65b7eba2d\",\n \"dataset\": \"d34c301e-10c3-11e4-9b79-5f67ca448df0\",\n \"config\":\n {\n \"networks\": {\"net0\":\"a3850354-d356-4bb7-a9ae-a41387702ad5\"},\n \"hostnames\": {\"net0\":\"vm1\"},\n \"metadata\": {},\n \"alias\": \"vm1\",\n \"hostname\": \"vm1\",\n \"requirements\": [],\n \"autoboot\": true\n }\n }","name":"","language":"http"}]},"method":"post","params":[{"name":"package","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the package to use for the VM","default":"","type":"string"},{"name":"dataset","in":"body","_id":"55d098178d728e0d00cc5b93","required":true,"desc":"UUID of the dataset to use for the VM","default":"","type":"string"},{"desc":"Object with aditional","default":"","type":"object","name":"config","in":"body","_id":"55d098178d728e0d00cc5b92","required":true}]},"editedParams2":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate VM
Body Params
package:
required
string
UUID of the package to use for the VM
dataset:
required
string
UUID of the dataset to use for the VM
config:
required
object
Object with aditional
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55d095ad2096360d007137a8","createdAt":"2015-08-16T13:52:45.614Z","editedParams":true,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","title":"Get VM","updates":[],"version":"55ce9b0a9d28781700b7c930","api":{"auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","default":"","desc":"UUID of the VM","name":"uuid","required":true,"type":"string","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"alias\": \"\",\n \"backups\": [\n {\n \"comment\": \"ex\",\n \"files\": [\n \"bd1d9ed0-00e8-483a-aae0-b9436c027e05/6e7da878-00ff-4edc-ad87-f51c0da16bbe\"\n ],\n \"local\": true,\n \"pending\": false,\n \"sha1\": \"49c74c48cedb8543b07b795d57797176deef5ed0\",\n \"size\": 312442865,\n \"state\": \"completed\",\n \"timestamp\": 1411482863814152,\n \"uuid\": \"6e7da878-00ff-4edc-ad87-f51c0da16bbe\",\n \"xml\": true\n }\n ],\n \"config\": {\n \"alias\": \"fifo01\",\n \"autoboot\": true,\n \"cpu_cap\": 400,\n \"cpu_shares\": 100,\n \"created_at\": \"2015-04-26T11:29:31.297Z\",\n \"dataset\": \"75d1b5d8-e509-11e4-a51f-2fd538c62d87\",\n \"dns_domain\": \"local\",\n \"hostname\": \"fifo01\",\n \"max_swap\": 6442450944,\n \"networks\": [\n {\n \"gateway\": \"192.168.10.1\",\n \"interface\": \"net1\",\n \"ip\": \"192.168.10.44\",\n \"mac\": \"12:1e:96:73:04:17\",\n \"netmask\": \"255.255.255.0\",\n \"nic_tag\": \"admin\"\n },\n {\n \"gateway\": \"192.168.1.1\",\n \"interface\": \"net0\",\n \"ip\": \"192.168.1.41\",\n \"mac\": \"12:1e:96:73:04:14\",\n \"netmask\": \"255.255.255.0\",\n \"nic_tag\": \"admin\",\n \"primary\": \"true\"\n }\n ],\n \"quota\": 40,\n \"ram\": 6144,\n \"resolvers\": [\n \"8.8.8.8\",\n \"8.8.4.4\"\n ],\n \"state\": \"running\",\n \"type\": \"zone\",\n \"zfs_io_priority\": 100,\n \"zonepath\": \"/zones/4fdfbd27-c51b-459f-9d9f-623ece60a4ce\"\n },\n \"dataset\": \"\",\n \"fw_rules\": [],\n \"groupings\": [],\n \"hypervisor\": \"d1a03736-303c-41c1-9960-78b2b9a6722d\",\n \"info\": [],\n \"log\": [],\n \"metadata\": [],\n \"network_mappings\": [],\n \"owner\": \"\",\n \"package\": \"\",\n \"services\": {\n \"lrc:/etc/rc2_d/S99net_tune\": \"legacy_run\",\n \"svc:/dalmatiner/db:default\": \"disabled\",\n \"svc:/dalmatiner/fe:default\": \"disabled\",\n \"svc:/leofs/gateway:default\": \"disabled\",\n \"svc:/milestone/devices:default\": \"online\",\n \"svc:/milestone/multi-user-server:default\": \"online\",\n \"svc:/milestone/multi-user:default\": \"online\",\n \"svc:/milestone/name-services:default\": \"online\",\n //...\n \"svc:/milestone/network:default\": \"online\",\n \"svc:/system/svc/global:default\": \"disabled\",\n \"svc:/system/svc/restarter:default\": \"online\",\n \"svc:/system/sysidtool:net\": \"online\",\n \"svc:/system/sysidtool:system\": \"online\",\n \"svc:/system/system-log:default\": \"online\",\n \"svc:/system/utmp:default\": \"online\",\n \"svc:/system/vtdaemon:default\": \"disabled\",\n \"svc:/system/zoneinit:default\": \"online\"\n },\n \"snapshots\": [\n {\n \"comment\": \"ex\",\n \"state\": \"completed\",\n \"timestamp\": 1411482795708708,\n \"uuid\": \"9fc74869-0d4b-48cb-85bb-054813ac18e8\"\n }\n ],\n \"state\": \"running\",\n \"deleting\": false,\n \"creating\": false,\n \"uuid\": \"4fdfbd27-c51b-459f-9d9f-623ece60a4ce\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid"},"body":"Reads a VM","githubsync":"","link_url":"","order":2,"__v":0,"category":"55cea3499d28781700b7c938","slug":"get-vm","sync_unique":"","type":"get","user":"55af3b15826d210d00041e02","editedParams2":true,"hidden":false,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet VM
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55f2f454d1c4c7170033dfb7","category":"55cea3499d28781700b7c938","createdAt":"2015-09-11T15:33:40.149Z","githubsync":"","link_external":false,"order":3,"api":{"auth":"required","method":"get","params":[{"required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n \"n\": \"cpu-usage\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"cpu-effective\",\n \"r\": 1000,\n \"v\": [\n 100, 100, 100, 100, // ...\n ]\n },\n {\n \"n\": \"cpu-nwait\",\n \"r\": 1000,\n \"v\": [\n 100, 100, 100, 100, // ...\n ]\n },\n {\n \"n\": \"memory-usage\",\n \"r\": 1000,\n \"v\": [\n 31, 31, 31, 31, 31, // ...\n ]\n },\n {\n \"n\": \"memory-value\",\n \"r\": 1000,\n \"v\": [\n 1024, 1024, 1024, 1024, // ...\n ]\n },\n {\n \"n\": \"memory-usage\",\n \"r\": 1000,\n \"v\": [\n 31, 31, 31, 31, 31, // ...\n ]\n },\n {\n \"n\": \"memory-value\",\n \"r\": 1000,\n \"v\": [\n 1024, 1024, 1024, 1024, // ...\n ]\n },\n {\n \"n\": \"net-send-ops-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-recv-ops-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-send-kb-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-recv-kb-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-read-kb\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-write-kb\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-read-ops\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-write-ops\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n }\n]","name":""},{"code":"bad resolution","name":"","status":400,"language":"text"},{"status":503,"language":"text","code":"failed to connect to database"}]},"settings":"","url":"/vms/:uuid/metrics"},"body":"Reads a VM","excerpt":"","hidden":false,"link_url":"","slug":"vms-metrics","user":"55af3b15826d210d00041e02","__v":0,"project":"55ce9a298f17dc0d00da7c48","editedParams":true,"editedParams2":true,"sync_unique":"","title":"Get VM Metrics","type":"get","updates":[],"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet VM Metrics
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d09a508d728e0d00cc5b94","category":"55cea3499d28781700b7c938","editedParams2":true,"hidden":false,"order":4,"project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","__v":0,"githubsync":"","link_external":false,"link_url":"","slug":"vms-delete","user":"55af3b15826d210d00041e02","body":"Deletes a VM.","excerpt":"","api":{"auth":"required","method":"delete","params":[{"default":"","desc":"UUID of the vm","name":"uuid","required":true,"type":"string","in":"path","_id":"55cf261c46db442b00105bea"}],"results":{"codes":[{"name":"","status":204,"language":"json","code":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid"},"title":"Delete VM","sync_unique":"","type":"delete","updates":[],"createdAt":"2015-08-16T14:12:32.668Z","editedParams":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete VM
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d099b707d62c17008b016d","githubsync":"","order":5,"version":"55ce9b0a9d28781700b7c930","type":"put","updates":[],"createdAt":"2015-08-16T14:09:59.928Z","excerpt":"","link_external":false,"sync_unique":"","title":"Dry run VM creation","__v":0,"category":"55cea3499d28781700b7c938","editedParams2":true,"hidden":false,"slug":"vms-dry_run","user":"55af3b15826d210d00041e02","api":{"examples":{"codes":[{"language":"http","code":"POST /api/2/vms/dry_run HTTP/1.1\nAccept: application/json\nContent-Type: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\n\n {\n \"package\": \"aa77ce44-cdb6-4e59-8f64-97f65b7eba2d\",\n \"dataset\": \"d34c301e-10c3-11e4-9b79-5f67ca448df0\",\n \"config\":\n {\n \"networks\": {\"net0\":\"a3850354-d356-4bb7-a9ae-a41387702ad5\"},\n \"metadata\": {},\n \"alias\": \"vm1\",\n \"hostname\": \"vm1\",\n \"requirements\": [],\n \"autoboot\": true\n }\n }","name":""}]},"method":"put","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the package to use for the VM","default":"","type":"string","name":"package","in":"body"},{"required":true,"desc":"UUID of the dataset to use for the VM","default":"","type":"string","name":"dataset","in":"body","_id":"55d098178d728e0d00cc5b93"},{"name":"config","in":"body","_id":"55d098178d728e0d00cc5b92","required":true,"desc":"Object with aditional","default":"","type":"object"}],"results":{"codes":[{"status":201,"language":"http","code":"HTTP/1.1 201 Created\nvary: accept","name":""}]},"settings":"","url":"/vms/dry_run","auth":"required"},"body":"This is the same as the normal [Create an VM](doc:vms-create) request however it stops before sending the request to the hypervisor. So no VM is ever created however it does check if the VM could be created.\n\nIt needs to be noted that both false positives and false negatives can occur so this is a good approximation but should not be taken as a definite. False positive are more likely then false negatives.","editedParams":true,"link_url":"","project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putDry run VM creation
Body Params
package:
required
string
UUID of the package to use for the VM
dataset:
required
string
UUID of the dataset to use for the VM
config:
required
object
Object with aditional
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55cf2f078f17dc0d00da7caa","body":"Initiates a VM state change for the VM.","editedParams2":true,"excerpt":"","link_url":"","sync_unique":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":1,"editedParams":true,"hidden":false,"order":6,"updates":[],"createdAt":"2015-08-15T12:22:31.629Z","githubsync":"","slug":"vms-state","api":{"auth":"required","method":"put","params":[{"_id":"55d09ecc2096360d007137b5","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path"},{"_id":"55cf2f078f17dc0d00da7cac","required":true,"desc":"One of `start`, `stop` or `reboot`.","default":"","type":"string","name":"action","in":"body"},{"required":false,"desc":"Used for `stop` and `reboot` determines if the shutdown should be graceful or forced","default":"false","type":"boolean","name":"force","in":"body","_id":"55cf2f078f17dc0d00da7cab"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/state"},"category":"55cea3499d28781700b7c938","link_external":false,"project":"55ce9a298f17dc0d00da7c48","title":"Change VM Power State","type":"put","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putChange VM Power State
Path Params
uuid:
required
string
UUID of the VM
Body Params
action:
required
string
One of `start`, `stop` or `reboot`.
force:
booleanfalse
Used for `stop` and `reboot` determines if the shutdown should be graceful or forced
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf2f425c06ee2100ecd9ff","__v":1,"api":{"auth":"required","method":"put","params":[{"required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55d09ede07d62c17008b0173"},{"name":"package","in":"body","_id":"55cf2f078f17dc0d00da7cac","required":true,"desc":"UUID of the new package","default":"","type":"string"}],"results":{"codes":[{"code":"","name":"","status":204,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/package"},"body":"Resizes the VM to a new package.","updates":[],"order":7,"slug":"vms-resize","sync_unique":"","type":"put","editedParams":true,"githubsync":"","link_url":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-15T12:23:30.694Z","excerpt":"","project":"55ce9a298f17dc0d00da7c48","title":"Resize VM","category":"55cea3499d28781700b7c938","editedParams2":true,"hidden":false,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putResize VM
Path Params
uuid:
required
string
UUID of the VM
Body Params
package:
required
string
UUID of the new package
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf2fdf5c06ee2100ecda00","githubsync":"","link_url":"","project":"55ce9a298f17dc0d00da7c48","slug":"vms-config","category":"55cea3499d28781700b7c938","hidden":false,"link_external":false,"sync_unique":"","title":"Update VM Config","user":"55af3b15826d210d00041e02","api":{"auth":"required","method":"put","params":[{"_id":"55d09ef907d62c17008b0174","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path"},{"in":"body","_id":"55cf2f078f17dc0d00da7cac","required":false,"desc":"the hostname of the VM","default":"","type":"string","name":"hostname"},{"default":"","type":"string","name":"alias","in":"body","_id":"55cf2fdf5c06ee2100ecda03","required":false,"desc":"the VM’s alias"},{"in":"body","_id":"55cf2fdf5c06ee2100ecda02","required":false,"desc":"list of VM’s resolvers","default":"","type":"array_string","name":"resolvers"},{"default":"","type":"boolean","name":"autoboot","in":"body","_id":"55cf2fdf5c06ee2100ecda01","required":false,"desc":"weather the vm boots automatically or not"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/config"},"editedParams":true,"createdAt":"2015-08-15T12:26:07.020Z","editedParams2":true,"excerpt":"","order":8,"type":"put","updates":[],"__v":1,"body":"Updates the config for the VM","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putUpdate VM Config
Path Params
uuid:
required
string
UUID of the VM
Body Params
hostname:
string
the hostname of the VM
alias:
string
the VM’s alias
resolvers:
array of strings
list of VM’s resolvers
autoboot:
boolean
weather the vm boots automatically or not
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf302b5c06ee2100ecda04","updates":[],"version":"55ce9b0a9d28781700b7c930","__v":1,"editedParams2":true,"excerpt":"","order":9,"api":{"auth":"required","method":"put","params":[{"in":"path","_id":"55d09f122096360d007137b6","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid"},{"type":"string","name":"org","in":"body","_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"New owner","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/owner"},"category":"55cea3499d28781700b7c938","link_url":"","slug":"vms-owner","sync_unique":"","title":"Change VM Ownership","body":"Changes the owner of the VM","githubsync":"","hidden":false,"link_external":false,"type":"put","user":"55af3b15826d210d00041e02","createdAt":"2015-08-15T12:27:23.082Z","editedParams":true,"project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putChange VM Ownership
Path Params
uuid:
required
string
UUID of the VM
Body Params
org:
required
string
New owner
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf3077c27f7d3500da1e98","githubsync":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","updates":[],"category":"55cea3499d28781700b7c938","createdAt":"2015-08-15T12:28:39.314Z","editedParams2":true,"version":"55ce9b0a9d28781700b7c930","title":"Add NIC to VM","user":"55af3b15826d210d00041e02","__v":1,"body":"Adds a new NIC to a VM.","link_external":false,"slug":"vms-nic-add","api":{"url":"/vms/:uuid/nics","auth":"required","method":"post","params":[{"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55d09f2907d62c17008b0175","required":true},{"type":"string","name":"network","in":"body","_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"Network of the new NIC","default":""}],"results":{"codes":[{"status":303,"language":"json","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/vms/2ca285a3-05a8-4ca6-befd-78fa994929ab","name":""},{"status":412,"language":"http","code":"HTTP/1.1 412 Precondition Failed\nconnection: close\nserver: Cowboy\ndate: Sun, 23 Aug 2015 07:11:58 GMT\ncontent-length: 10\naccess-control-allow-origin: *\naccess-control-allow-headers: Authorization, content-type, x-snarl-token, x-full-list, x-full-list-fields\naccess-control-expose-headers: x-snarl-token, x-full-list, x-full-list-fields\naccess-control-allow-credentials: true\ncontent-type: application/json\nvary: accept\n\nVM Running","name":"Precondition Failed"}]},"settings":""},"sync_unique":"","type":"post","editedParams":true,"excerpt":"","link_url":"","order":10,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd NIC to VM
Path Params
uuid:
required
string
UUID of the VM
Body Params
network:
required
string
Network of the new NIC
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf30bb8f17dc0d00da7cad","body":"Removes a NIC from a VM.","githubsync":"","hidden":false,"slug":"vms-nic-delete","__v":1,"category":"55cea3499d28781700b7c938","link_url":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"delete","api":{"settings":"","url":"/vms/:uuid/nis/:mac","auth":"required","method":"delete","params":[{"_id":"55d09f3e8d728e0d00cc5b9c","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path"},{"in":"path","_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"MAC address of the NIC to remove","default":"","type":"string","name":"mac"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"name":"","status":400,"language":"json","code":"{}"}]}},"editedParams":true,"editedParams2":true,"excerpt":"","link_external":false,"order":11,"title":"Remove NIC from VM","user":"55af3b15826d210d00041e02","createdAt":"2015-08-15T12:29:47.925Z","updates":[],"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove NIC from VM
Path Params
uuid:
required
string
UUID of the VM
mac:
required
string
MAC address of the NIC to remove
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55cf315dc27f7d3500da1e99","hidden":false,"slug":"vms-fw-add","type":"post","updates":[],"api":{"settings":"","url":"/vms/:uuid/fw_rules","auth":"required","method":"post","params":[{"_id":"55d09f522096360d007137b7","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path"},{"_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"The action of the rule, either `block` or `allow`.","default":"","type":"string","name":"action","in":"body"},{"in":"body","_id":"55cf31aa8f17dc0d00da7cb0","required":true,"desc":"The direction of the rule, either `inbound` or `outbound`.","default":"","type":"string","name":"direction"},{"type":"mixed","name":"target","in":"body","_id":"55cf31aa8f17dc0d00da7caf","required":true,"desc":"The other side of the rule","default":""},{"_id":"55cf32715c06ee2100ecda08","required":true,"desc":"The protocol to match, either `tcp`, `udp` or `icmp`.","default":"","type":"string","name":"protocol","in":"body"},{"_id":"55cf32715c06ee2100ecda07","required":true,"desc":"The filter to narrow down the match.","default":"","type":"mixed","name":"filters","in":"body"}],"results":{"codes":[{"status":303,"language":"json","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/vms/2ca285a3-05a8-4ca6-befd-78fa994929ab","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"Creates a firewall rule of the VM. One side is always the current VM the other side can be defined in `target`.\n\n## target\n\n* The string `\"all\"` for all targets.\n* An object with the key `ip` and the IP address in a string as value for a single IP target.\n* An object with the key `subnet` with the base address of the subnet as string, and key `mask` with a number indicating the relevant bits as value for a subnet as target.\n\n## filters\n\n* A list of one or more ports for UDP and TCP.\n* The string `\"all\"` for UDP and TCP.\n* A list of objects containing the key `type` and optionally `code`, both with numbers as values for ICMP.","editedParams":true,"editedParams2":true,"excerpt":"","project":"55ce9a298f17dc0d00da7c48","__v":3,"user":"55af3b15826d210d00041e02","githubsync":"","category":"55cea3499d28781700b7c938","createdAt":"2015-08-15T12:32:29.650Z","link_external":false,"link_url":"","order":12,"sync_unique":"","title":"Add Firewall Rule to VM","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postAdd Firewall Rule to VM
Path Params
uuid:
required
string
UUID of the VM
Body Params
action:
required
string
The action of the rule, either `block` or `allow`.
direction:
required
string
The direction of the rule, either `inbound` or `outbound`.
target:
required
mixed
The other side of the rule
protocol:
required
string
The protocol to match, either `tcp`, `udp` or `icmp`.
filters:
required
mixed
The filter to narrow down the match.
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55cf3311c27f7d3500da1e9a","editedParams":true,"updates":[],"title":"Remove Firewall Rule from VM","api":{"url":"/vms/:uuid/fw_rules/:rule_id","auth":"required","method":"post","params":[{"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55d09f692096360d007137b8","required":true},{"type":"int","name":"rule_id","in":"path","_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"The rule to remove.","default":""}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":""},"category":"55cea3499d28781700b7c938","createdAt":"2015-08-15T12:39:45.740Z","editedParams2":true,"user":"55af3b15826d210d00041e02","__v":1,"hidden":false,"link_url":"","order":13,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","slug":"vms-fw-delete","sync_unique":"","body":"Deletes a firewall rule for the VM uuid, the rule id can be found in the `rule_id` field of the rule.","excerpt":"","githubsync":"","type":"post","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postRemove Firewall Rule from VM
Path Params
uuid:
required
string
UUID of the VM
rule_id:
required
integer
The rule to remove.
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d09bab07d62c17008b016e","link_external":false,"slug":"vms-snapshots-create","updates":[],"api":{"auth":"required","examples":{"codes":[{"code":"","language":"text"}]},"method":"post","params":[{"name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the VM","default":"","type":"string"},{"desc":"Comment for the snapshot","default":"","type":"string","name":"comment","in":"body","_id":"55d098178d728e0d00cc5b93","required":true}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/vms/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/vms/:uuid/snapshots"},"excerpt":"","hidden":false,"link_url":"","order":14,"user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","body":"Creates a ZFS snapshot of the VM","editedParams2":true,"githubsync":"","__v":1,"category":"55cea3499d28781700b7c938","sync_unique":"","title":"Snapshot a VM","type":"post","createdAt":"2015-08-16T14:18:19.135Z","editedParams":true,"project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postSnapshot a VM
Path Params
uuid:
required
string
UUID of the VM
Body Params
comment:
required
string
Comment for the snapshot
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d09da08d728e0d00cc5b98","excerpt":"","order":15,"version":"55ce9b0a9d28781700b7c930","project":"55ce9a298f17dc0d00da7c48","slug":"vms-snapshots-restore","sync_unique":"","category":"55cea3499d28781700b7c938","editedParams2":true,"githubsync":"","link_url":"","link_external":false,"title":"Restore a VM Snapshot","updates":[],"user":"55af3b15826d210d00041e02","api":{"results":{"codes":[{"name":"","status":204,"language":"json","code":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/vms/:uuid/snapshots/:snap-id","auth":"required","method":"put","params":[{"type":"string","in":"path","_id":"55cf302b5c06ee2100ecda05","default":"","desc":"UUID of the VM","name":"uuid","required":true},{"name":"snap-id","in":"path","_id":"55d09da08d728e0d00cc5b9a","required":true,"desc":"UUID of the snapshot to restore","default":"","type":"string"},{"desc":"needs to be `rollback`","name":"action","required":true,"type":"string","in":"body","_id":"55d09da08d728e0d00cc5b99","default":"rollback"}]},"body":"This will roll back a ZFS snapshot and delete all snapshots newer then the snapshot.\n[block:callout]\n{\n \"type\": \"danger\",\n \"title\": \"zfs snapshots\",\n \"body\": \"Please note that ZFS snapshots do not allow keeping snapshots newer that a rolled back snapshots so those will be deleted. Please use backups of this is a feature you need.\"\n}\n[/block]","createdAt":"2015-08-16T14:26:40.485Z","editedParams":true,"__v":0,"hidden":false,"type":"put","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putRestore a VM Snapshot
Path Params
uuid:
required
string
UUID of the VM
snap-id:
required
string
UUID of the snapshot to restore
Body Params
action:
required
stringrollback
needs to be `rollback`
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d09e7b07d62c17008b0171","order":16,"user":"55af3b15826d210d00041e02","createdAt":"2015-08-16T14:30:19.233Z","editedParams":true,"excerpt":"","hidden":false,"link_external":false,"link_url":"","type":"delete","version":"55ce9b0a9d28781700b7c930","__v":0,"editedParams2":true,"sync_unique":"","api":{"url":"/vms/:uuid/nis/:snap-id","auth":"required","method":"delete","params":[{"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55cf302b5c06ee2100ecda05","required":true},{"type":"string","name":"snap-id","in":"path","_id":"55d09e7b07d62c17008b0172","required":true,"desc":"UUID of the snapshot","default":""}],"results":{"codes":[{"language":"json","code":"","name":"","status":204},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"body":"Deletes a Snapshot, newer snapshots will not be affected other then their size night change.","project":"55ce9a298f17dc0d00da7c48","slug":"vms-snapshots-delete","title":"Delete a Snapshot form a VM","updates":[],"category":"55cea3499d28781700b7c938","githubsync":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete a Snapshot form a VM
Path Params
uuid:
required
string
UUID of the VM
snap-id:
required
string
UUID of the snapshot
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d09c8107d62c17008b016f","sync_unique":"","title":"Backup a VM","type":"post","githubsync":"","hidden":false,"link_external":false,"slug":"vms-backups-create","user":"55af3b15826d210d00041e02","category":"55cea3499d28781700b7c938","editedParams2":true,"excerpt":"","link_url":"","__v":1,"body":"Creates a ZFS snapshot and sends it to to LeoFS as a backup. Both incremental and full backups can be created. If a incremental backup is done the parent **must** be local.\n\nIn incremental backup here means that a incremental ZFS send is done with the parent as parent.\n\nThe following files are created in LeoFS:\n\n* `<vm-uuid>/<backup-uuid>` - the gzip compressed ZFS snapshot\n* `<vm-uuid>/<backup-uuid>.xml` - the zone config XML file from `/etc/zones/<vm-uuid>.xml`\n* `<vm-uuid>/<backup-uuid>.parent` - UUID of the parent snapshot if this is a incremental backup.","editedParams":true,"project":"55ce9a298f17dc0d00da7c48","updates":[],"version":"55ce9b0a9d28781700b7c930","api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"post","params":[{"in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid"},{"type":"string","name":"comment","in":"body","_id":"55d098178d728e0d00cc5b93","required":true,"desc":"Comment for the snapshot","default":""},{"_id":"55d0a3dd0f37432300e05564","required":false,"desc":"UUID of the parent snapshot (needs to be local).","default":"","type":"string","name":"parent","in":"body"},{"_id":"55d0a3dd0f37432300e05563","required":false,"desc":"If `parent` is given weather the Parent will be deleted from the hypervisor after uploading the backup. If `parent` is not provided wether the backup itself will be deleted after it is uploaded.","default":"false","type":"boolean","name":"delete","in":"body"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6\nlocation: /api/2/vms/72b3cdb0-7647-478b-906e-28a59f09c603","name":""}]},"settings":"","url":"/vms/:uuid/backups"},"createdAt":"2015-08-16T14:21:53.978Z","order":17,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postBackup a VM
Path Params
uuid:
required
string
UUID of the VM
Body Params
comment:
required
string
Comment for the snapshot
parent:
string
UUID of the parent snapshot (needs to be local).
delete:
booleanfalse
If `parent` is given weather the Parent will be deleted from the hypervisor after uploading the backup. If `parent` is not provided wether the backup itself will be deleted after it is uploaded.
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d0a57f8d728e0d00cc5ba6","body":"Deletes a Backup, this will also delete all files on LeoFS related to this backup. This will **also delete all children** of this backup since the restore can no longer happen without the parent. However other backups who are not in the child path of this backup will not be affected, not even if they are newer.","link_external":false,"sync_unique":"","updates":[],"api":{"url":"/vms/:uuid/nis/:backup-id","auth":"required","method":"delete","params":[{"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path","_id":"55cf302b5c06ee2100ecda05","required":true},{"default":"","type":"string","name":"backup-id","in":"path","_id":"55d09e7b07d62c17008b0172","required":true,"desc":"UUID of the backup"}],"results":{"codes":[{"name":"","status":204,"language":"json","code":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"githubsync":"","link_url":"","order":18,"version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-16T15:00:15.810Z","type":"delete","user":"55af3b15826d210d00041e02","excerpt":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","slug":"vms-backups-delete","__v":0,"category":"55cea3499d28781700b7c938","editedParams":true,"editedParams2":true,"title":"Delete a Backup of a VM","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete a Backup of a VM
Path Params
uuid:
required
string
UUID of the VM
backup-id:
required
string
UUID of the backup
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d0a959d4ff801700ae8f77","body":"This restores a backup in the process the entire zfs volume might be destroyed and re-created, **all snapshots will be deleted**!\n\nIf the VM is 'in limbo' so not deployed to a hypervisor right now, it is possible to select the hypervisor it is re-deployed to.","order":19,"sync_unique":"","category":"55cea3499d28781700b7c938","slug":"restore-a-vm-backup","user":"55af3b15826d210d00041e02","editedParams2":true,"excerpt":"","hidden":false,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","type":"put","version":"55ce9b0a9d28781700b7c930","__v":0,"api":{"auth":"required","method":"put","params":[{"name":"uuid","required":true,"type":"string","in":"path","_id":"55cf302b5c06ee2100ecda05","default":"","desc":"UUID of the VM"},{"in":"path","_id":"55d09da08d728e0d00cc5b9a","required":true,"desc":"UUID of the backup to restore","default":"","type":"string","name":"backup-id"},{"type":"string","name":"action","in":"body","_id":"55d09da08d728e0d00cc5b99","required":true,"desc":"needs to be `rollback`","default":"rollback"},{"_id":"55d0a959d4ff801700ae8f78","required":false,"desc":"Restores a backup to a specifo","default":"","type":"string","name":"hypervisor","in":"body"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/backups/:backup-id"},"createdAt":"2015-08-16T15:16:41.442Z","editedParams":true,"githubsync":"","link_url":"","title":"Restore a VM Backup","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putRestore a VM Backup
Path Params
uuid:
required
string
UUID of the VM
backup-id:
required
string
UUID of the backup to restore
Body Params
action:
required
stringrollback
needs to be `rollback`
hypervisor:
string
Restores a backup to a specifo
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d0a9ec67a6c82d00300f04","link_external":false,"updates":[],"__v":0,"category":"55cea3499d28781700b7c938","editedParams":true,"order":20,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","title":"Change Service state.","body":"Changes the service state, see `man svcadm` for more information.","hidden":false,"link_url":"","editedParams2":true,"excerpt":"","api":{"settings":"","url":"/vms/:uuid/services","auth":"required","method":"put","params":[{"_id":"55cf302b5c06ee2100ecda05","required":true,"desc":"UUID of the VM","default":"","type":"string","name":"uuid","in":"path"},{"in":"body","_id":"55d09da08d728e0d00cc5b9a","required":true,"desc":"The service identifier","default":"","type":"string","name":"service"},{"type":"string","name":"action","in":"body","_id":"55d09da08d728e0d00cc5b99","required":true,"desc":"one of `enable`, `disable`, `clear`, `restart`, and `refresh`","default":"rollback"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"createdAt":"2015-08-16T15:19:08.882Z","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","githubsync":"","slug":"vms-services-state","type":"put","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putChange Service state.
Path Params
uuid:
required
string
UUID of the VM
Body Params
service:
required
string
The service identifier
action:
required
stringrollback
one of `enable`, `disable`, `clear`, `restart`, and `refresh`
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55f2f4a779109e2d007e04e0","editedParams":true,"excerpt":"","order":999,"user":"55af3b15826d210d00041e02","category":"55cea3499d28781700b7c938","editedParams2":true,"link_url":"","title":"Get Hypervisor Metrics","updates":[],"createdAt":"2015-09-11T15:35:03.541Z","api":{"auth":"required","method":"get","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the Hypervisor"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n \"n\": \"cpu-usage\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"cpu-effective\",\n \"r\": 1000,\n \"v\": [\n 100, 100, 100, 100, // ...\n ]\n },\n {\n \"n\": \"cpu-nwait\",\n \"r\": 1000,\n \"v\": [\n 100, 100, 100, 100, // ...\n ]\n },\n {\n \"n\": \"memory-usage\",\n \"r\": 1000,\n \"v\": [\n 31, 31, 31, 31, 31, // ...\n ]\n },\n {\n \"n\": \"memory-value\",\n \"r\": 1000,\n \"v\": [\n 1024, 1024, 1024, 1024, // ...\n ]\n },\n {\n \"n\": \"memory-usage\",\n \"r\": 1000,\n \"v\": [\n 31, 31, 31, 31, 31, // ...\n ]\n },\n {\n \"n\": \"memory-value\",\n \"r\": 1000,\n \"v\": [\n 1024, 1024, 1024, 1024, // ...\n ]\n },\n {\n \"n\": \"net-send-ops-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-recv-ops-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-send-kb-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"net-recv-kb-net0\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-read-kb\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-write-kb\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-read-ops\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n },\n {\n \"n\": \"zfs-write-ops\",\n \"r\": 1000,\n \"v\": [\n 0, 0, 0, 0, 0, 0, //...\n ]\n }\n]","name":""},{"status":400,"language":"text","code":"bad resolution","name":""},{"language":"text","code":"failed to connect to database","status":503}]},"settings":"","url":"/hypervisors/:uuid/metrics"},"hidden":false,"link_external":false,"slug":"hypervisors-metrics","__v":0,"body":"Reads a VM","githubsync":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"get","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Hypervisor Metrics
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"560d60adaf97231900938128","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","githubsync":"","link_external":false,"order":999,"slug":"vms-hypervisor-delete","sync_unique":"","updates":[],"__v":0,"createdAt":"2015-10-01T16:34:53.132Z","excerpt":"","link_url":"","project":"55ce9a298f17dc0d00da7c48","category":"55cea3499d28781700b7c938","editedParams":true,"hidden":false,"api":{"method":"delete","params":[{"name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the vm","default":"","type":"string"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/vms/:uuid/hypervisor","auth":"required"},"body":"Deletes a VM from the hypervisor to put it in 'limbo'","editedParams2":true,"title":"Removes a VM from a hypervisor","type":"delete","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemoves a VM from a hypervisor
Path Params
uuid:
required
string
UUID of the vm
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d102b8d4ff801700ae8ffd","api":{"auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list","in":"query"},{"in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":"","type":"array_string","name":"full-list-fields"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/networks"},"category":"55cea34edb457c210076e5a4","link_external":false,"slug":"networks-list","sync_unique":"","type":"get","version":"55ce9b0a9d28781700b7c930","body":"Lists all networks visible to the user.\n\nSee [Get Network](doc:networks-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-16T21:38:00.524Z","hidden":false,"link_url":"","order":0,"title":"List Networks","editedParams2":true,"project":"55ce9a298f17dc0d00da7c48","user":"55af3b15826d210d00041e02","__v":0,"editedParams":true,"excerpt":"","githubsync":"","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Networks
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d1033fcf1e671700834001","__v":0,"api":{"settings":"","url":"/networks","auth":"required","method":"post","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"name of the network","default":"","type":"string","name":"name","in":"body"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/networks/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]}},"body":"Creates a new network","excerpt":"","githubsync":"","createdAt":"2015-08-16T21:40:15.040Z","order":1,"slug":"networks-create","sync_unique":"","type":"post","updates":[],"hidden":false,"link_url":"","title":"Create Network","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","category":"55cea34edb457c210076e5a4","editedParams":true,"editedParams2":true,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate Network
Body Params
name:
required
string
name of the network
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d103d8d4ff801700ae8ffe","title":"Get Network","editedParams2":true,"githubsync":"","link_url":"","project":"55ce9a298f17dc0d00da7c48","hidden":false,"order":2,"version":"55ce9b0a9d28781700b7c930","body":"Reads a Network","category":"55cea34edb457c210076e5a4","editedParams":true,"excerpt":"","type":"get","updates":[],"slug":"get-network","sync_unique":"","user":"55af3b15826d210d00041e02","__v":0,"api":{"auth":"required","method":"get","params":[{"type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the network","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"ipranges\": [\n \"b45e7702-93f8-47ac-8ad2-92518be7c1bf\"\n ],\n \"metadata\": [],\n \"name\": \"Test Net\",\n \"uuid\": \"faa25949-e8a2-446f-b01a-ddf17f058016\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/networks/:uuid"},"createdAt":"2015-08-16T21:42:48.748Z","link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Network
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d10447d4ff801700ae8fff","editedParams2":true,"excerpt":"","link_url":"","hidden":false,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","title":"Delete Network","__v":0,"api":{"method":"delete","params":[{"name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the network","default":"","type":"string"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/networks/:uuid","auth":"required"},"category":"55cea34edb457c210076e5a4","githubsync":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","body":"Deletes a Network.","createdAt":"2015-08-16T21:44:39.447Z","order":3,"updates":[],"editedParams":true,"slug":"networks-delete","sync_unique":"","type":"delete","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Network
Path Params
uuid:
required
string
UUID of the network
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d1061ccf1e67170083400d","body":"Adds an iprange to a network.","editedParams":true,"updates":[],"version":"55ce9b0a9d28781700b7c930","editedParams2":true,"hidden":false,"title":"Add an IP Range a Network","__v":0,"category":"55cea34edb457c210076e5a4","link_external":false,"link_url":"","slug":"networks-ipranges-add","user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/networks/:uuid/iprange/:iprange","auth":"required","method":"put","params":[{"_id":"55cfaf0d957dcd3500b344a0","required":true,"desc":"UUID of the network","default":"","type":"string","name":"uuid","in":"path"},{"in":"path","_id":"55cf28068f17dc0d00da7ca2","required":true,"desc":"UUID of the iprange to add","default":"","type":"string","name":"iprange"}],"results":{"codes":[{"language":"json","code":"","name":"","status":204},{"status":400,"language":"json","code":"{}","name":""}]}},"createdAt":"2015-08-16T21:52:28.924Z","excerpt":"","githubsync":"","order":4,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"put","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putAdd an IP Range a Network
Path Params
uuid:
required
string
UUID of the network
iprange:
required
string
UUID of the iprange to add
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d1068d67a6c82d00300f86","excerpt":"","link_external":false,"title":"Remove an IP Range from a Network","version":"55ce9b0a9d28781700b7c930","order":5,"user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/networks/:uuid/iprange/:iprange","auth":"required","method":"delete","params":[{"_id":"55cfaf1a8d728e0d00cc5b12","default":"","desc":"UUID of the network","name":"uuid","required":true,"type":"string","in":"path"},{"in":"body","_id":"55cf28068f17dc0d00da7ca2","default":"","desc":"UUID of the iprange to delete","name":"role","required":true,"type":"string"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"name":"","status":400,"language":"json","code":"{}"}]}},"body":"Removes an IP Range from an network.","category":"55cea34edb457c210076e5a4","createdAt":"2015-08-16T21:54:21.304Z","editedParams":true,"editedParams2":true,"type":"delete","__v":0,"githubsync":"","hidden":false,"link_url":"","slug":"networks-ipranges-remove","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove an IP Range from a Network
Path Params
uuid:
required
string
UUID of the network
Body Params
role:
required
string
UUID of the iprange to delete
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d109bdcf1e67170083400e","body":"Lists all IP Ranges visible to the user.\n\nSee [Get IP Range](doc:ipranges-get) for the fields available for `full-list-fields`.","editedParams":true,"link_external":false,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","__v":0,"createdAt":"2015-08-16T22:07:57.460Z","hidden":false,"type":"get","user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/ipranges","auth":"required","method":"get","params":[{"_id":"55cf261c46db442b00105bea","required":false,"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list","in":"query"},{"required":false,"desc":"fields to include in the full list (`,` separated)","default":"","type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"editedParams2":true,"excerpt":"","order":0,"slug":"ipranges-list","title":"List IP Ranges","updates":[],"version":"55ce9b0a9d28781700b7c930","githubsync":"","link_url":"","category":"55cea3569d28781700b7c939","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList IP Ranges
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d10ceed4ff801700ae9004","category":"55cea3569d28781700b7c939","editedParams2":true,"hidden":false,"project":"55ce9a298f17dc0d00da7c48","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","excerpt":"","order":1,"sync_unique":"","type":"post","updates":[],"api":{"auth":"required","method":"post","params":[{"type":"string","name":"name","in":"body","_id":"55cf261c46db442b00105bea","required":true,"desc":"name of the ip rnage","default":""},{"_id":"55d10e94d4ff801700ae900b","required":true,"desc":"NIC Tag for the IP Range to use","default":"","type":"string","name":"tag","in":"body"},{"required":true,"desc":"The network address of the subnet","default":"","type":"string","name":"subnet","in":"body","_id":"55d10e94d4ff801700ae900a"},{"name":"netmask","in":"body","_id":"55d10e94d4ff801700ae9009","required":true,"desc":"The netmask of the subnet","default":"","type":"string"},{"desc":"The gateway of the subnet","default":"","type":"string","name":"gateway","in":"body","_id":"55d10e94d4ff801700ae9008","required":true},{"default":"","type":"string","name":"first","in":"body","_id":"55d10e94d4ff801700ae9007","required":true,"desc":"First address to hand out (must be part of subnet!)"},{"required":true,"desc":"Last address to hand out (must be part of subnet!)","default":"","type":"string","name":"last","in":"body","_id":"55d10e94d4ff801700ae9006"},{"name":"vlan","in":"body","_id":"55d10e94d4ff801700ae9005","required":false,"desc":"VLan to tag the nics with","default":"","type":"int"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/ipranges/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]},"settings":"","url":"/ipranges"},"createdAt":"2015-08-16T22:21:34.627Z","githubsync":"","link_url":"","__v":1,"body":"Creates a new ip range","editedParams":true,"link_external":false,"slug":"ipranges-create","title":"Create IP Range","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate IP Range
Body Params
name:
required
string
name of the ip rnage
tag:
required
string
NIC Tag for the IP Range to use
subnet:
required
string
The network address of the subnet
netmask:
required
string
The netmask of the subnet
gateway:
required
string
The gateway of the subnet
first:
required
string
First address to hand out (must be part of subnet!)
last:
required
string
Last address to hand out (must be part of subnet!)
vlan:
integer
VLan to tag the nics with
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d10b7bd4ff801700ae9003","api":{"method":"get","params":[{"name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the ip range","default":"","type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"free\": [\n \"10.10.10.100\",\n \"10.10.10.101\",\n \"10.10.10.102\",\n \"10.10.10.103\",\n \"10.10.10.104\",\n \"10.10.10.105\",\n \"10.10.10.106\",\n \"10.10.10.107\",\n \"10.10.10.108\",\n \"10.10.10.109\",\n \"10.10.10.110\",\n \"10.10.10.111\",\n \"10.10.10.112\",\n \"10.10.10.113\",\n \"10.10.10.114\",\n \"10.10.10.115\",\n \"10.10.10.116\",\n \"10.10.10.117\",\n \"10.10.10.118\",\n \"10.10.10.119\",\n \"10.10.10.120\"\n ],\n \"gateway\": \"10.10.10.1\",\n \"metadata\": [],\n \"name\": \"test\",\n \"netmask\": \"255.255.255.0\",\n \"network\": \"10.10.10.0\",\n \"tag\": \"admin\",\n \"used\": [],\n \"uuid\": \"b45e7702-93f8-47ac-8ad2-92518be7c1bf\",\n \"vlan\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/ipranges/:uuid","auth":"required"},"excerpt":"","slug":"ipranges-get","sync_unique":"","type":"get","updates":[],"order":2,"__v":0,"createdAt":"2015-08-16T22:15:23.255Z","editedParams":true,"hidden":false,"link_external":false,"link_url":"","title":"Get IP Range","user":"55af3b15826d210d00041e02","category":"55cea3569d28781700b7c939","githubsync":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","body":"Reads a IP Range","editedParams2":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet IP Range
Path Params
uuid:
required
string
UUID of the ip range
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d13611cecdd00d0034b9ad","hidden":false,"link_url":"","slug":"delete-ip-range","version":"55ce9b0a9d28781700b7c930","api":{"method":"delete","params":[{"desc":"UUID of the iprange","default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true}],"results":{"codes":[{"language":"json","code":"","name":"","status":204},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/ipranges/:uuid","auth":"required"},"excerpt":"","category":"55cea3569d28781700b7c939","createdAt":"2015-08-17T01:17:05.914Z","link_external":false,"title":"Delete IP Range","type":"delete","updates":[],"body":"Deletes a Network.","user":"55af3b15826d210d00041e02","githubsync":"","order":3,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","editedParams":true,"editedParams2":true,"__v":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete IP Range
Path Params
uuid:
required
string
UUID of the iprange
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d208c8945e481700afbb2e","order":4,"__v":0,"createdAt":"2015-08-17T16:16:08.639Z","excerpt":"","githubsync":"","link_url":"","slug":"ipranges-claim","sync_unique":"","title":"Claim IP from IP Range","category":"55cea3569d28781700b7c939","type":"put","project":"55ce9a298f17dc0d00da7c48","updates":[],"user":"55af3b15826d210d00041e02","hidden":false,"api":{"settings":"","url":"/ipranges/:uuid","auth":"required","method":"put","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the ip range","default":"","type":"string","name":"uuid","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"tag\": \"admin\",\n \"ip\": \"10.10.10.100\",\n \"netmask\": \"255.255.255.0\",\n \"gateway\": \"10.10.10.1\",\n \"vlan\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"Claims an IP Address from the range","editedParams":true,"editedParams2":true,"link_external":false,"version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putClaim IP from IP Range
Path Params
uuid:
required
string
UUID of the ip range
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d208fa486de50d00326f74","createdAt":"2015-08-17T16:16:58.821Z","editedParams2":true,"excerpt":"","sync_unique":"","user":"55af3b15826d210d00041e02","__v":0,"api":{"settings":"","url":"/ipranges/:uuid/:ip","auth":"required","method":"delete","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the iprange","default":"","type":"string","name":"uuid","in":"path"},{"required":true,"desc":"IP Address to release","default":"","type":"string","name":"ip","in":"path","_id":"55d208fa486de50d00326f75"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"category":"55cea3569d28781700b7c939","type":"delete","updates":[],"editedParams":true,"link_external":false,"title":"Releases an IP Range","hidden":false,"link_url":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","body":"Releases an IP","githubsync":"","order":5,"slug":"iprange-release","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteReleases an IP Range
Path Params
uuid:
required
string
UUID of the iprange
ip:
required
string
IP Address to release
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d576954fe64521006d5ab3","createdAt":"2015-08-20T06:41:25.286Z","order":0,"project":"55ce9a298f17dc0d00da7c48","updates":[],"user":"55af3b15826d210d00041e02","__v":0,"api":{"url":"/datasets","auth":"required","method":"get","params":[{"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list","in":"query","_id":"55cf261c46db442b00105bea","required":false},{"type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"editedParams":true,"editedParams2":true,"excerpt":"","githubsync":"","link_url":"","title":"List Datasets","type":"get","body":"Lists all Datasets visible to the user.\n\nSee [Get Dataset](doc:datasets-get) for the fields available for `full-list-fields`.","category":"55cea35c8f17dc0d00da7c52","slug":"datasets-list","version":"55ce9b0a9d28781700b7c930","hidden":false,"link_external":false,"sync_unique":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Datasets
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d576da5082980d0009c9c8","order":1,"updates":[],"user":"55af3b15826d210d00041e02","__v":0,"createdAt":"2015-08-20T06:42:34.684Z","editedParams2":true,"api":{"method":"post","params":[{"desc":"url of the manifest to import","default":"","type":"string","name":"url","in":"body","_id":"55cf261c46db442b00105bea","required":true}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/datasets/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]},"settings":"","url":"/datasets","auth":"required"},"sync_unique":"","version":"55ce9b0a9d28781700b7c930","body":"Imports a dataset form a imgapi compatible server or promotes a VM's snapshot to a dataset.\n\nIf `url` is given a imgapi import is performed. if `vm`, `snapshot` and `config` is given then the snapshot in question is promoted to a mimage.\n\n`config` is an object and needs to have the fields: `version`, `os`, `name` and `description`, all strings.","link_external":false,"project":"55ce9a298f17dc0d00da7c48","type":"post","hidden":false,"link_url":"","slug":"datasets-import","title":"Import Dataset","category":"55cea35c8f17dc0d00da7c52","editedParams":true,"excerpt":"","githubsync":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postImport Dataset
Body Params
url:
required
string
url of the manifest to import
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d57761e60a2f0d00b88b6b","title":"Get Dataset","user":"55af3b15826d210d00041e02","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":2,"createdAt":"2015-08-20T06:44:49.502Z","slug":"datasets-get","__v":0,"api":{"url":"/datasets/:uuid","auth":"required","method":"get","params":[{"name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the datasets","default":"","type":"string"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n \"description\": \"core.io Mailbox Server\",\n \"image_size\": 152608931,\n \"imported\": 1,\n \"metadata\": {\n \"homepage\": \"https://github.com/skylime/mi-core-mbox\"\n },\n \"name\": \"core-mbox\",\n \"networks\": [\n {\n \"description\": \"public\",\n \"name\": \"net0\"\n }\n ],\n \"os\": \"smartos\",\n \"requirements\": [\n {\n \"attribute\": \"sysinfo.Live Image\",\n \"condition\": \">=\",\n \"value\": \"20150405T212953Z\",\n \"weight\": \"must\"\n }\n ],\n \"status\": \"imported\",\n \"type\": \"zone\",\n \"uuid\": \"0f3f5375-063b-43da-8407-ce14e381f440\",\n \"version\": \"15.1.0\"\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"excerpt":"","project":"55ce9a298f17dc0d00da7c48","version":"55ce9b0a9d28781700b7c930","updates":[],"body":"Reads a Dataset","category":"55cea35c8f17dc0d00da7c52","editedParams":true,"editedParams2":true,"sync_unique":"","type":"get","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Dataset
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d5ad05988e130d000b4087","body":"Deletes a dataset","createdAt":"2015-08-20T10:33:41.845Z","editedParams2":true,"githubsync":"","order":3,"excerpt":"","link_url":"","project":"55ce9a298f17dc0d00da7c48","sync_unique":"","updates":[],"version":"55ce9b0a9d28781700b7c930","type":"delete","user":"55af3b15826d210d00041e02","slug":"datasets-delete","title":"Delete Dataset","__v":0,"api":{"auth":"required","method":"delete","params":[{"in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the datasets","default":"","type":"string","name":"uuid"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/datasets/:uuid"},"category":"55cea35c8f17dc0d00da7c52","editedParams":true,"hidden":false,"link_external":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Dataset
Path Params
uuid:
required
string
UUID of the datasets
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d57bc7988e130d000b3fbf","body":"Downloads a zVol","order":4,"slug":"datasets-get-zvol","sync_unique":"","api":{"auth":"required","examples":{"codes":[{"name":"","language":"text","code":"GET /api/2/datasets/b7c658e0-2ddb-46dd-8973-4a59ffc9957e/dataset.gz HTTP/1.1\nhost: cloud.project-fifo.net\naccept: application/x-gzip\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6"}]},"method":"get","params":[{"type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the datasets","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"... gz data ...","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/datasets/:uuid/datasets.gz"},"excerpt":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","type":"get","user":"55af3b15826d210d00041e02","editedParams2":true,"githubsync":"","link_external":false,"title":"Get Dataset zVol","updates":[],"editedParams":true,"category":"55cea35c8f17dc0d00da7c52","createdAt":"2015-08-20T07:03:35.271Z","link_url":"","version":"55ce9b0a9d28781700b7c930","__v":0,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Dataset zVol
Path Params
uuid:
required
string
UUID of the datasets
Definition
{{ api_url }}{{ page_api_url }}
Examples
Result Format
{"_id":"55d5782e988e130d000b3faf","link_url":"","updates":[],"slug":"datasets-upload-manifest","sync_unique":"","type":"put","version":"55ce9b0a9d28781700b7c930","__v":1,"body":"Uploads a manifest as 1st step of a dataset import from a local file.","category":"55cea35c8f17dc0d00da7c52","link_external":false,"hidden":false,"order":5,"createdAt":"2015-08-20T06:48:14.512Z","editedParams":true,"editedParams2":true,"excerpt":"","user":"55af3b15826d210d00041e02","api":{"settings":"","url":"/datasets/:uuid","auth":"required","method":"put","params":[{"_id":"55d5785f5082980d0009c9cd","required":true,"desc":"UUID of the dataset to import","default":"","type":"string","name":"uuid","in":"path"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/datasets/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]}},"githubsync":"","project":"55ce9a298f17dc0d00da7c48","title":"Upload Manifest","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putUpload Manifest
Path Params
uuid:
required
string
UUID of the dataset to import
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d57b194fe64521006d5ac9","project":"55ce9a298f17dc0d00da7c48","type":"put","version":"55ce9b0a9d28781700b7c930","category":"55cea35c8f17dc0d00da7c52","createdAt":"2015-08-20T07:00:41.004Z","hidden":false,"slug":"datasets-upload-zvol","api":{"auth":"required","method":"put","params":[{"_id":"55d5785f5082980d0009c9cd","required":true,"desc":"UUID of the dataset to import","default":"","type":"string","name":"uuid","in":"path"}],"results":{"codes":[{"code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/datasets/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":"","status":303,"language":"http"}]},"settings":"","url":"/datasets/:uuid/dataset.gz"},"editedParams2":true,"sync_unique":"","updates":[],"user":"55af3b15826d210d00041e02","link_external":false,"link_url":"","order":6,"__v":0,"body":"Uploads a zvol as 2nd step of a dataset import from a local file.","editedParams":true,"excerpt":"","githubsync":"","title":"Upload Dataset zVol","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putUpload Dataset zVol
Path Params
uuid:
required
string
UUID of the dataset to import
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d579134fe64521006d5ab9","__v":0,"api":{"url":"/datasets/:uuid/networks/:nic","auth":"required","method":"put","params":[{"desc":"UUID of the dataset to import","default":"","type":"string","name":"uuid","in":"path","_id":"55d5785f5082980d0009c9cd","required":true},{"default":"","type":"string","name":"nic","in":"path","_id":"55d579134fe64521006d5abb","required":true,"desc":"name of the nic to add (i.e. `net1`)"},{"required":true,"desc":"description of the interface","default":"","type":"string","name":"description","in":"body","_id":"55d579134fe64521006d5aba"}],"results":{"codes":[{"status":204,"language":"http","code":"","name":""}]},"settings":""},"title":"Add NIC to Dataset","version":"55ce9b0a9d28781700b7c930","excerpt":"","githubsync":"","link_url":"","user":"55af3b15826d210d00041e02","sync_unique":"","body":"Adds or modifies a nic on the dataset.","createdAt":"2015-08-20T06:52:03.020Z","editedParams":true,"link_external":false,"order":7,"project":"55ce9a298f17dc0d00da7c48","slug":"datasets-networks-add","type":"put","category":"55cea35c8f17dc0d00da7c52","editedParams2":true,"hidden":false,"updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
putAdd NIC to Dataset
Path Params
uuid:
required
string
UUID of the dataset to import
nic:
required
string
name of the nic to add (i.e. `net1`)
Body Params
description:
required
string
description of the interface
Definition
{{ api_url }}{{ page_api_url }}
{"_id":"55d579354fe64521006d5abe","editedParams2":true,"excerpt":"","user":"55af3b15826d210d00041e02","__v":0,"category":"55cea35c8f17dc0d00da7c52","order":8,"project":"55ce9a298f17dc0d00da7c48","sync_unique":"","type":"delete","editedParams":true,"githubsync":"","hidden":false,"link_external":false,"slug":"datasets-networks-remove","title":"Remove NIC from Dataset","updates":[],"body":"Adds or modifies a nic on the dataset.","version":"55ce9b0a9d28781700b7c930","createdAt":"2015-08-20T06:52:37.763Z","link_url":"","api":{"examples":{"codes":[{"name":"","language":"http","code":"DELETE /api/2/datasets/21274016-2ad3-11e4-9673-e3abad521cc2/networks/net1 HTTP/1.1\nAccept: application/json\nAuthorization: Bearer gjGGIkIM2m518n4UmEgubIH0H2Xkt1Y6"}]},"method":"delete","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55d5785f5082980d0009c9cd","required":true,"desc":"UUID of the dataset to import"},{"required":true,"desc":"name of the nic to add (i.e. `net1`)","default":"","type":"string","name":"nic","in":"path","_id":"55d579134fe64521006d5abb"}],"results":{"codes":[{"status":204,"language":"http","code":"","name":""}]},"settings":"","url":"/datasets/:uuid/networks/:nic","auth":"required"},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteRemove NIC from Dataset
Path Params
uuid:
required
string
UUID of the dataset to import
nic:
required
string
name of the nic to add (i.e. `net1`)
Definition
{{ api_url }}{{ page_api_url }}
Examples
{"_id":"55d5a74be60a2f0d00b88c28","link_external":false,"body":"Lists all Packages visible to the user.\n\nSee [Get Package](doc:packages-get) for the fields available for `full-list-fields`.","createdAt":"2015-08-20T10:09:15.336Z","editedParams2":true,"githubsync":"","project":"55ce9a298f17dc0d00da7c48","type":"get","user":"55af3b15826d210d00041e02","category":"55cea3689d28781700b7c93a","editedParams":true,"link_url":"","version":"55ce9b0a9d28781700b7c930","sync_unique":"","__v":0,"api":{"url":"/packages","auth":"required","method":"get","params":[{"desc":"to get a full list instead of UUIDs","default":"false","type":"string","name":"full-list","in":"query","_id":"55cf261c46db442b00105bea","required":false},{"type":"array_string","name":"full-list-fields","in":"query","_id":"55cf261c46db442b00105be9","required":false,"desc":"fields to include in the full list (`,` separated)","default":""}],"results":{"codes":[{"language":"json","code":"[\n \"af7d83bd-93d4-4d16-998f-7fbd3cc756cf\"\n]","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"excerpt":"","hidden":false,"order":0,"slug":"packages-list","title":"List Packages","updates":[],"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getList Packages
Query Params
full-list:
stringfalse
to get a full list instead of UUIDs
full-list-fields:
array of strings
fields to include in the full list (`,` separated)
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d5a8cb988e130d000b4075","updates":[],"link_url":"","slug":"packages-create","githubsync":"","link_external":false,"title":"Create Package","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","__v":1,"body":"Creates a new package. \n\n# Requirements\n`requirements` is an array of objects as with the following atributes:\n\n### `weight` \nA number (positive or negative) or the string `\"must\"`, `\"cant`\" for strong enforcement or `\"scale\"` and `\"random\"`\n\n### `must`, `cant`, and `<number>` rules\n\nThis rules simply compare an attribute of the hypervisor against a value and either enforces a the rule (`must`/`cant`) or gives out points, both positive and negative to rate the found hypervisors.\n\n#### `attribute`\nThe attribute to check on the hypervisors, this can be a json like path so for example `\"characteristics.colour\"` will look up `colour` in the hypervisors `characteristics`\n\n#### `value`\nThe value to check against, this can be a number, a string, or an array.\n\n#### `condition`\nOne of:\n* `>=`, `>` - Checks if the value of `attribute` is larger (or equal) to the value\n* `=<`, `<` - Checks if the value of `attribute` is smaller (or equal) to the value\n* `=:=` - Checks if the value of `attribute` is equal to the value\n* `=/=` - Checks if the value of `attribute` is not equal to the value\n* `\"subset\"` - Checks if the value of `attribute` is a subset of value (requires value to be an array)\n* `\"superset\"` - Checks if the value of `attribute` is a superset of value (requires value to be an array)\n* `\"disjoint\"` - Checks if the value of `attribute` is disjoint with the value (requires value to be an array)\n* `\"element\"` - Checks if the value is contained in the `attribute`\n\n### `scale` rules\nThis rules linearly map an attributes value onto a given scale and give the result as points for hypervisor selection.\n\n#### `attribute`\nThe attribute to check on the hypervisors, this can be a json like path so for example `\"characteristics.cores\"` will look up `cores` in the hypervisors `characteristics` This must be an numeric value towork\n\n#### `low`, and `high`\nThe lowest and highest number of the scale, to map against.\n\n### `random` rules\nThis rules simply generate a random number on a given scale, this allows making non deterministic rules. The resulting number is used as points for hypervisor selection.\n\n#### `low`, and `high`\nThe lowest and highest number the random number is generated from.\n## exmaple\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"[{\\n \\\"weight\\\": \\\"must\\\",\\n \\\"attribute\\\": \\\"characteristics.colour\\\",\\n \\\"condition\\\": \\\"=:=\\\",\\n \\\"value\\\": \\\"purple\\\"\\n}]\\n \",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","excerpt":"","hidden":false,"project":"55ce9a298f17dc0d00da7c48","type":"post","category":"55cea3689d28781700b7c93a","editedParams2":true,"createdAt":"2015-08-20T10:15:39.839Z","editedParams":true,"order":1,"sync_unique":"","api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"in":"body","_id":"55d5acd6ced8b9190077cbd7","required":true,"desc":"Name of the package","default":"","type":"string","name":"name"},{"default":"","type":"int","name":"quota","in":"body","_id":"55d5acd6ced8b9190077cbd6","required":true,"desc":"`GB` of quota to give the package, for KVM this applies as secondary disk"},{"required":true,"desc":"`MB` of memory for the","default":"","type":"int","name":"ram","in":"body","_id":"55d5acd6ced8b9190077cbd5"},{"name":"cpu_cap","in":"body","_id":"55d5acd6ced8b9190077cbd4","required":true,"desc":"`%` of CPU cores to give the zone","default":"","type":"int"},{"name":"cpu_shares","in":"body","_id":"55d5acd6ced8b9190077cbd3","required":true,"desc":"Shares of CPU time when two zones compete. (Defaults to % of memory)","default":"","type":"string"},{"name":"zfs_io_priority","in":"body","_id":"55d5acd6ced8b9190077cbd2","required":false,"desc":"ZFS Priority if zones are competing. (Defaults to % of memory)","default":"","type":"int"},{"desc":"Block size for KVM","default":"","type":"int","name":"blicksize","in":"body","_id":"55d5acd6ced8b9190077cbd1","required":false},{"type":"string","name":"compression","in":"body","_id":"55d5acd6ced8b9190077cbd0","required":false,"desc":"Compression used for the ZFS volume","default":""},{"_id":"55d5acd6ced8b9190077cbcf","required":false,"desc":"A list of rules to create","default":"","type":"object","name":"requirements","in":"body"}],"results":{"codes":[{"status":303,"language":"http","code":"HTTP/1.1 303 See Other\nvary: accept\nlocation: /api/2/packages/7df734a1-7332-45da-aa2a-9a3d856fa58a","name":""}]},"settings":"","url":"/packages"},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
postCreate Package
Body Params
name:
required
string
Name of the package
quota:
required
integer
`GB` of quota to give the package, for KVM this applies as secondary disk
ram:
required
integer
`MB` of memory for the
cpu_cap:
required
integer
`%` of CPU cores to give the zone
cpu_shares:
required
string
Shares of CPU time when two zones compete. (Defaults to % of memory)
zfs_io_priority:
integer
ZFS Priority if zones are competing. (Defaults to % of memory)
blicksize:
integer
Block size for KVM
compression:
string
Compression used for the ZFS volume
requirements:
object
A list of rules to create
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d5a7c0e60a2f0d00b88c29","api":{"auth":"required","method":"get","params":[{"default":"","type":"string","name":"uuid","in":"path","_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the package"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n \"compression\": \"off\",\n \"cpu_cap\": 100,\n \"metadata\": [],\n \"name\": \"mini\",\n \"quota\": 10,\n \"ram\": 1024,\n \"requirements\": [],\n \"uuid\": \"42bf38f3-5632-49cb-82ce-973a04c3a8f6\"\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/packages/:uuid"},"githubsync":"","project":"55ce9a298f17dc0d00da7c48","slug":"packages-get","sync_unique":"","updates":[],"editedParams2":true,"link_external":false,"title":"Get Package","__v":0,"category":"55cea3689d28781700b7c93a","createdAt":"2015-08-20T10:11:12.457Z","excerpt":"","link_url":"","type":"get","user":"55af3b15826d210d00041e02","body":"Reads a Package","hidden":false,"order":2,"version":"55ce9b0a9d28781700b7c930","editedParams":true,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
getGet Package
Definition
{{ api_url }}{{ page_api_url }}
Result Format
{"_id":"55d5ad4cced8b9190077cbd8","api":{"settings":"","url":"/packages/:uuid","auth":"required","method":"delete","params":[{"_id":"55cf261c46db442b00105bea","required":true,"desc":"UUID of the packges","default":"","type":"string","name":"uuid","in":"path"}],"results":{"codes":[{"status":204,"language":"json","code":"","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"Deletes a package","title":"Delete Package","category":"55cea3689d28781700b7c93a","hidden":false,"link_external":false,"order":3,"project":"55ce9a298f17dc0d00da7c48","slug":"packages-delete","sync_unique":"","editedParams":true,"editedParams2":true,"link_url":"","type":"delete","updates":[],"__v":0,"createdAt":"2015-08-20T10:34:52.059Z","excerpt":"","githubsync":"","user":"55af3b15826d210d00041e02","version":"55ce9b0a9d28781700b7c930","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}
deleteDelete Package
Path Params
uuid:
required
string
UUID of the packges
Definition
{{ api_url }}{{ page_api_url }}