GET/accounts/:account_id/gateways
List Gatewayspublic
Required Parameters
account_id
stringThe 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_id
stringThe account id
name
stringNew gateway name
Optional Parameters
username
stringUsername of bastion server
address
stringPublic IP or DNS address of bastion server
ttl
integerThe number of seconds you want the gateway available
private_ip
stringPrivate IP or DNS address of bastion server
content
stringThe 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
id
integerThe gateway id
account_id
stringThe account id
Optional Parameters
name
stringGateway name
username
stringUsername of bastion server
address
stringPublic IP or DNS address of bastion server
ttl
integerThe number of seconds you want the gateway available
private_ip
stringPrivate IP or DNS address of bastion server
content
stringThe 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
id
integerThe gateway id
account_id
stringThe 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"