# drip-api

# Resources

The resources use a data model that is supported by a set of client-side libraries that are made available on the files and libraries page.

name | path | methods | description
--- | --- | --- | ---
AnsibleOutputController | `/user/v1.0/deployer/ansible/` `/user/v1.0/deployer/ansible/all` `/user/v1.0/deployer/ansible/commands` `/user/v1.0/deployer/ansible/ids` `/user/v1.0/deployer/ansible/{id}` | `GET` `DELETE` `GET` `GET` `DELETE GET` | This controller is responsible for showing the output from ansible executions
BenchmarkController | `/user/v1.0/benchmark/` `/user/v1.0/benchmark/all` `/user/v1.0/benchmark/ids` `/user/v1.0/benchmark/{id}` | `GET` `DELETE` `GET` `DELETE GET` | This controller is responsible for handling cloud benchmark tests like sysbench
CloudConfigurationController0 | `/user/v0.0/switch/account/configure/ec2` `/user/v0.0/switch/account/configure/geni` | `POST` `POST` | This controller is responsible for handling cloud credentials used by the provisoner to request for resources (VMs).
CloudCredentialsController | `/user/v1.0/credentials/cloud/` `/user/v1.0/credentials/cloud/all` `/user/v1.0/credentials/cloud/ids` `/user/v1.0/credentials/cloud/sample` `/user/v1.0/credentials/cloud/{id}` `/user/v1.0/credentials/cloud/upload/{id}` | `POST` `DELETE` `GET` `GET` `DELETE GET` `POST` | This controller is responsible for handling CloudCredentials. CloudCredentials are a represntation of the credentials that are used by the provisoner to request for resources (VMs)
ConfigurationController | `/user/v1.0/deployer/configuration/all` `/user/v1.0/deployer/configuration/ids` `/user/v1.0/deployer/configuration/post` `/user/v1.0/deployer/configuration/upload` `/user/v1.0/deployer/configuration/{id}` | `DELETE` `GET` `POST` `POST` `DELETE GET` | This controller is responsible for storing PlayBook descriptions that can be used by the planner.
DeployController | `/user/v1.0/deployer/all` `/user/v1.0/deployer/deploy` `/user/v1.0/deployer/ids` `/user/v1.0/deployer/sample` `/user/v1.0/deployer/scale` `/user/v1.0/deployer/{id}` | `DELETE` `POST` `GET` `GET` `POST` `DELETE GET` | This controller is responsible for deploying a cluster on provisoned resources.
DeployController0 | `/user/v0.0/switch/deploy/kubernetes` `/user/v0.0/switch/deploy/swarm` | `POST` `POST` | This controller is responsible for deploying a cluster on provisoned resources.
KeyPairController | `/user/v1.0/keys/` `/user/v1.0/keys/all` `/user/v1.0/keys/ids` `/user/v1.0/keys/sample` `/user/v1.0/keys/{id}` | `POST` `DELETE` `GET` `GET` `DELETE GET` | This controller is responsible for handling user public keys. These keys can be used by the provisoner to allow the user to login to the VMs from the machine the keys correspond to.
LogController | `/user/v1.0/logs/` | `GET` | This controller is responsible for storing TOSCA descriptions that can be used by the planner.
MonitorringMessageController | `/user/v1.0/monitoring_message/` `/user/v1.0/monitoring_message/ids` `/user/v1.0/monitoring_message/{id}` | `POST` `GET` `GET` |
PlannerController | `/user/v1.0/planner/all` `/user/v1.0/planner/ids` `/user/v1.0/planner/vereify_plan` `/user/v1.0/planner/{id}` `/user/v1.0/planner/plan/{tosca_id}` `/user/v1.0/planner/post/{name}` `/user/v1.0/planner/tosca/{id}` `/user/v1.0/planner/post/{level}/{name}/{id}` | `DELETE` `GET` `POST` `DELETE GET` `GET` `POST` `GET` `POST` | This controller is responsible for planing the type of resources to be provisopned based on a TOSCA description.
PlannerController0 | `/user/v0.0/switch/plan/planning` | `POST` | This controller is responsible for planing the type of resources to be provisopned based on a TOSCA description.
ProvisionController | `/user/v1.0/provisioner/all` `/user/v1.0/provisioner/ids` `/user/v1.0/provisioner/provision` `/user/v1.0/provisioner/sample` `/user/v1.0/provisioner/scale` `/user/v1.0/provisioner/{id}` `/user/v1.0/provisioner/post/provision` | `DELETE` `GET` `POST` `GET` `POST` `DELETE GET` `POST` | This controller is responsible for obtaining resources from cloud providers based the plan generated by the planner
ProvisionController0 | `/user/v0.0/switch/provision/execute` `/user/v0.0/switch/provision/upload` | `POST` `POST` | This controller is responsible for obtaining resources from cloud providers based the plan generated by the planner and uploaded by the user
ScriptController | `/user/v1.0/script/` `/user/v1.0/script/all` `/user/v1.0/script/ids` `/user/v1.0/script/sample` `/user/v1.0/script/upload` `/user/v1.0/script/{id}` | `POST` `DELETE` `GET` `GET` `POST` `DELETE GET` | This controller is responsible for handling user scripts. These user can be used by the provisoner to run on the created VMs.
ToscaController | `/user/v1.0/tosca/all` `/user/v1.0/tosca/ids` `/user/v1.0/tosca/post` `/user/v1.0/tosca/upload` `/user/v1.0/tosca/{id}` `/user/v1.0/tosca/transform/{id}` | `DELETE` `GET` `POST` `POST` `DELETE GET` `GET` | This controller is responsible for storing TOSCA descriptions that can be used by the planner.
UserController | `/manager/v1.0/user/all` `/manager/v1.0/user/ids` `/manager/v1.0/user/modify` `/manager/v1.0/user/register` `/manager/v1.0/user/{id}` | `GET` `GET` `POST` `POST` `DELETE GET` | This controller is responsible for handling user accounts
UserController0 | `/manager/v0.0/switch/account/register` | `POST` | This controller is responsible for handling user accounts
UserPublicKeysController0 | `/user/v0.0/switch/provision/confuserkey` | `POST` | This controller is responsible for handling user public keys. These keys can be used by the provisoner to allow the user to login to the VMs from the machine the keys correspond to.
UserScriptController0 | `/user/v0.0/switch/provision/confscript` | `POST` | This controller is responsible for handling user scripts. These user can be used by the provisoner to run on the created VMs.

# Data Types

### JSON

type | description
--- | ---
AnsibleOutput | This class represents the the ansible out put for a specific VM. This can be used as a archive / log of ansible executions
AnsibleResult | This class represents an ansible execution result. This can be used as a archive / log of ansible executions for example how much time it took for execution, errors etc.
BenchmarkResult | This is the base class for users to own resources. Many classes extend this class
CloudCredentials | This class represents the cloud credentials. They are used by the provisoner to request for resources.
DRIPLogRecord | This is the base class for users to own resources. Many classes extend this class
DeployParameter | This class is used by the deployer to deploy software (swarm,kubernetes,ansible). It is generated by the provisioner to contain VM information.
DeployRequest | This class holds the necessary POJO IDs to request the deployment of a software
DeployResponse | This class represents the response of a deploy request. It may hold a key pair used for logging in and managing a docker cluster. Currently they key pair is only used by kubernetes
Key | This class represents a key. This key can be used to either login to a VM created by the provisiner or by the VM to allow the user to login to the VMs from the machine the keys correspond to.
KeyPair | This class hold the pair of public private keys. The keys may be used for logging in VMs.
KeyType | This enu specifies if a key is private or public
KeyValueHolder | This is a generic class that hold key-value pairs. It's main usage is to hold abstract types such as TOSCA.
MonitorringMessage | This is the base class for users to own resources. Many classes extend this class
OwnedObject | This is the base class for users to own resources. Many classes extend this class
ProvisionRequest | This class is a holder for the the object IDs that are required by the provisioner to request for cloud resources.
ProvisionResponse | This class represents a description of provisioned resources
ScaleRequest | This class represents a scale request for a deployment. At the moment we only support swarm.
Script | This class represents a simple script that can run on a provisioned VM.
User | This class represents a user.

### XML

Default Namespace (schema)
type | description
--- | ---
attribute |
confScript |
confUserKey |
configure |
deploy |
execute |
loginKey0 |
plan | This class represents a plan to be provided to the planner.
register |
result |
upload |
cloudCredentials | This class represents the cloud credentials. They are used by the provisoner to request for resources.
DRIPLogRecord | This is the base class for users to own resources. Many classes extend this class
deployParameter | This class is used by the deployer to deploy software (swarm,kubernetes,ansible). It is generated by the provisioner to contain VM information.
deployRequest | This class holds the necessary POJO IDs to request the deployment of a software
deployResponse | This class represents the response of a deploy request. It may hold a key pair used for logging in and managing a docker cluster. Currently they key pair is only used by kubernetes
key | This class represents a key. This key can be used to either login to a VM created by the provisiner or by the VM to allow the user to login to the VMs from the machine the keys correspond to.
keyType | This enu specifies if a key is private or public
keyPair | This class hold the pair of public private keys. The keys may be used for logging in VMs.
keyValueHolder | This is a generic class that hold key-value pairs. It's main usage is to hold abstract types such as TOSCA.
monitorringMessage | This is the base class for users to own resources. Many classes extend this class
ownedObject | This is the base class for users to own resources. Many classes extend this class
provisionRequest | This class is a holder for the the object IDs that are required by the provisioner to request for cloud resources.
provisionResponse | This class represents a description of provisioned resources
scaleRequest | This class represents a scale request for a deployment. At the moment we only support swarm.
script | This class represents a simple script that can run on a provisioned VM.
user | This class represents a user.
ansibleOutput | This class represents the the ansible out put for a specific VM. This can be used as a archive / log of ansible executions
benchmarkResult | This is the base class for users to own resources. Many classes extend this class