# Provider API

## Get providers list [GET /v3/providers]
> Get devops providers

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    [
      "aws",
      "static",
      "openstack"
    ]
```

## Get provider accounts [GET /v3/provider/:provider/accounts]
> Get accounts list for provider ':provider'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    []
```

## Create provider account [POST /v3/provider/:provider/account]
> Create account for provider ':provider'

### Request
  * Method: POST
  * Headers:
    *  Accept: application/json
    *  Content-Type: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
  * Body:
```json
    []
```

### Response
**Status: 201**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {
      "message": ""
    }
```

## Get provider account [Get /v3/provider/:provider/account/:account]
> Get account ':account' description for provider ':provider'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {
    
    }
```
**Status: 404**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {
      "message": ""
    }
```

## Delete provider account [Delete /v3/provider/:provider/account/:account]
> Delete account ':account' for provider ':provider'

### Request
  * Method: DELETE
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {
      "message": ""
    }
```
**Status: 404**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {
      "message": ""
    }
```

## Get aws vpcs [GET /v3/provider/aws/account/:account/vpcs]
> Get vpcs list for provider 'aws' and account ':account'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :account - provider account

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    []
```

## Get security groups [GET /v3/provider/:provider/account/:account/security_groups]
> Get security groups list for provider ':provider' and account ':account'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account
    * vpc-id - vpc id for aws provider

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {}
```

## Get subnets [GET /v3/provider/:provider/account/:account/networks]
> Get subnets list for provider ':provider' and account ':account'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account
    * vpc-id - vpc id for aws provider

### Response

----
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:

**aws:**
```json
[
    {
      "cidr": "0.0.0.0/16",
      "vpcId": "vpc-1",
      "subnetId": "subnet-1",
      "name": "subnet-1",
      "zone": "us-east-1a"
    }
]
```
**openstack:**
```json
[
    {
      "cidr": "0.0.0.0/16",
      "name": "private",
      "id": "b14f8df9-ac27-48e2-8d65-f7ef78dc2654"
    }
]
```

## Get provider flavors [GET /v3/provider/:provider/account/:account/flavors]
> Get flavors list for provider ':provider' and account ':account'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {}
```

## Get provider images [GET /v3/provider/:provider/account/:account/images]
> Get images list for provider ':provider' and account ':account'

### Request
  * Method: GET
  * Headers:
    *  Accept: application/json
  * Params:
    * :provider - provider ("static", "aws", "openstack")
    * :account - provider account

### Response
**Status: 200**
  * Headers:
    *  Content-Type: application/json
  * Body:
```json
    {}
```