This controller is responsible for handling user scripts. These user can be used by the provisoner to run on the created VMs.
Gets the IDs of all the stored scripts
media type | data type | description |
---|---|---|
application/json | array of string (JSON) | a list of all the IDs |
application/xml | list of string (XML) |
GET /user/v1.0/user_script/ids Accept: application/json
HTTP/1.1 200 Looks Good
Content-Type: application/json
...
Uploads a script
name | type | description |
---|---|---|
file | query |
media type | data type | description |
---|---|---|
application/json | string (JSON) | the ID of the stopred script |
application/xml | string (XML) |
POST /user/v1.0/user_script/upload Accept: application/json
HTTP/1.1 201 Looks Good
Content-Type: application/json
...
name | type | description |
---|---|---|
id | path |
media type | data type |
---|---|
application/json | string (JSON) |
application/xml | string (XML) |
DELETE /user/v1.0/user_script/{id} Accept: application/json
HTTP/1.1 204 Looks Good
Content-Type: application/json
...
Gets a script
name | type | description |
---|---|---|
id | path |
media type | data type | description |
---|---|---|
application/json | Script (JSON) | the script |
application/xml | script (XML) |
GET /user/v1.0/user_script/{id} Accept: application/json
HTTP/1.1 200 Looks Good
Content-Type: application/json
{
"id" : "...",
"name" : "config.sh",
"contents" : " #!/bin/bash\necho \"Reading system-wide config....\" >&2\\n. /etc/cool.cfg\nif [ -r ~/.coolrc ]; then\n echo \"Reading user config....\" >&2\\n . ~/.coolrc\\nfi",
"owner" : "..."
}