GET/accounts/:account_id/gateways
List Gatewayspublic
Required Parameters
account_idstringThe account id
Get a list of all the gateways of the account.
Request
GET
/accounts/:account_id/gatewayscurl -X GET \
"https://app.cloud66.com/api/3/accounts/:account_id/gateways" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Response
{
"response": [
{
"id": 1,
"name": "aws_bastion",
"username": "ec2-usr",
"address": "1.1.1.1",
"private_ip": "2.2.2.2",
"ttl": "2016-02-01T14:46:38Z",
"content": "N/A",
"created_at_iso": "2016-02-01T14:37:05Z",
"updated_at_iso": "2016-02-01T14:47:01Z",
"created_by": "user1@cloud66.com",
"updated_by": "user1@cloud66.com"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}POST/accounts/:account_id/gateways
Create Gatewayadmin
Required Parameters
account_idstringThe account id
namestringNew gateway name
Optional Parameters
usernamestringUsername of bastion server
addressstringPublic IP or DNS address of bastion server
ttlintegerThe number of seconds you want the gateway available
private_ipstringPrivate IP or DNS address of bastion server
contentstringThe content of private key of bastion server
Create a new gateway under the account. name must be passed as params. You can also specify username, address, ttl, private_ip and content as params.
Related Models:Gateway
Request
POST
/accounts/:account_id/gatewayscurl -X POST \
"https://app.cloud66.com/api/3/accounts/:account_id/gateways?username=ec2-usr&address=1.1.1.1&ttl=3600&private_ip=2.2.2.2&content=xxxxxxxx" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account_id": "12345",
"name": "new_gateway_name"
}'Response
{
"response": {
"ok": true
}
}PUT/accounts/:account_id/gateways/:id
Update Gatewayadmin
Required Parameters
idintegerThe gateway id
account_idstringThe account id
Optional Parameters
namestringGateway name
usernamestringUsername of bastion server
addressstringPublic IP or DNS address of bastion server
ttlintegerThe number of seconds you want the gateway available
private_ipstringPrivate IP or DNS address of bastion server
contentstringThe content of private key of bastion server
Update gateway information.
Related Models:Gateway
Request
PUT
/accounts/:account_id/gateways/:idcurl -X PUT \
"https://app.cloud66.com/api/3/accounts/:account_id/gateways/:id?name=new_gateway_name&username=ec2-usr&address=1.1.1.1&ttl=3600&private_ip=2.2.2.2&content=xxxxxxxx" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "1",
"account_id": "12345"
}'Response
{
"response": {
"ok": true
}
}DELETE/accounts/:account_id/gateways/:id
Delete Gatewayadmin
Required Parameters
idintegerThe gateway id
account_idstringThe account id
Delete a gateway.
Related Models:Gateway
Request
DELETE
/accounts/:account_id/gateways/:idcurl -X DELETE \
"https://app.cloud66.com/api/3/accounts/:account_id/gateways/:id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"