Networks API


Create a network

POST /networks

Parameters

cidr
required: true
scope: network
CIDR range to use for the network
tenancy
required: false
scope: network
Tenancy of the network
location
required: true
scope: network
Region for the network
provider
required: true
Provider ID
skip_subnets
required: false
scope: network
Skip automatic subnet creation

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
            "provider": 214,
            "network": {
              "cidr": "172.16.0.0/12",
              "location": "us-east-2",
              "skip_subnets": true
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_network",
              "id": "1c47f210-460d-498a-9014-ef7b591597fc",
              "created_at": "2018-04-12T18:07:37+00:00",
              "started_at": "2018-04-12T18:07:37+00:00",
              "finished_at": "2018-04-12T18:07:37+00:00",
              "message": null,
              "request_status": "Finished: Provision network (1c47f210-460d-498a-9014-ef7b591597fc) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:07:37+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/1c47f210-460d-498a-9014-ef7b591597fc/dependencies",
              "stages": "https://api.engineyard.com/requests/1c47f210-460d-498a-9014-ef7b591597fc/stages",
              "account": "https://api.engineyard.com/accounts/4b187b72-291b-487b-aa65-d4094c61345d",
              "requester": "https://api.engineyard.com/requests/1c47f210-460d-498a-9014-ef7b591597fc/requester",
              "messages": "https://api.engineyard.com/requests/1c47f210-460d-498a-9014-ef7b591597fc/messages",
              "callback_url": "https://api.engineyard.com/requests/1c47f210-460d-498a-9014-ef7b591597fc/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/networks/1bf4000d-03d5-49c1-ac36-a1d513d7938d"
            }
          }
            
          








Create a subnet

POST /subnets

Parameters

cidr
required: true
scope: subnet
CIDR range to use for the subnet
location
required: true
scope: subnet
AZ for the subnet
network
required: true
Network ID for the subnet
name
required: false
scope: subnet
Name of the subnet

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
            "network": "9b1164ef-c058-4968-bb35-26c74789343d",
            "subnet": {
              "cidr": "172.16.0.0/24",
              "location": "us-east-2b"
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_subnet",
              "id": "78c142e4-2fbd-4a07-aa82-f55245acdbf3",
              "created_at": "2018-04-12T18:07:47+00:00",
              "started_at": "2018-04-12T18:07:47+00:00",
              "finished_at": "2018-04-12T18:07:47+00:00",
              "message": null,
              "request_status": "Finished: Provision subnet (78c142e4-2fbd-4a07-aa82-f55245acdbf3) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:07:47+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/78c142e4-2fbd-4a07-aa82-f55245acdbf3/dependencies",
              "stages": "https://api.engineyard.com/requests/78c142e4-2fbd-4a07-aa82-f55245acdbf3/stages",
              "account": "https://api.engineyard.com/accounts/e17cebdd-ae1b-4726-8b70-5d468dd4afd5",
              "requester": "https://api.engineyard.com/requests/78c142e4-2fbd-4a07-aa82-f55245acdbf3/requester",
              "messages": "https://api.engineyard.com/requests/78c142e4-2fbd-4a07-aa82-f55245acdbf3/messages",
              "callback_url": "https://api.engineyard.com/requests/78c142e4-2fbd-4a07-aa82-f55245acdbf3/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/subnets/5f037d28-1cd1-4399-a549-e6b486400fcb"
            }
          }
            
          








Deprovision a network

DELETE /networks/:network

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_network",
              "id": "1bef19d0-6acd-4abc-8676-f3a2947876af",
              "created_at": "2018-04-12T18:07:44+00:00",
              "started_at": "2018-04-12T18:07:44+00:00",
              "finished_at": "2018-04-12T18:07:45+00:00",
              "message": null,
              "request_status": "Finished: Deprovision network (1bef19d0-6acd-4abc-8676-f3a2947876af) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:07:45+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/1bef19d0-6acd-4abc-8676-f3a2947876af/dependencies",
              "stages": "https://api.engineyard.com/requests/1bef19d0-6acd-4abc-8676-f3a2947876af/stages",
              "account": "https://api.engineyard.com/accounts/cfe3b1db-7484-40e6-983d-81b596299359",
              "requester": "https://api.engineyard.com/requests/1bef19d0-6acd-4abc-8676-f3a2947876af/requester",
              "messages": "https://api.engineyard.com/requests/1bef19d0-6acd-4abc-8676-f3a2947876af/messages",
              "callback_url": "https://api.engineyard.com/requests/1bef19d0-6acd-4abc-8676-f3a2947876af/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Deprovision a subnet

DELETE /subnets/:subnet

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_subnet",
              "id": "8bbba923-fa49-4a86-ac1c-c12e2c9ed834",
              "created_at": "2018-04-12T18:07:56+00:00",
              "started_at": "2018-04-12T18:07:56+00:00",
              "finished_at": "2018-04-12T18:07:56+00:00",
              "message": null,
              "request_status": "Finished: Deprovision subnet (8bbba923-fa49-4a86-ac1c-c12e2c9ed834) (less than a minute ago)",
              "successful": true,
              "updated_at": "2018-04-12T18:07:56+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/8bbba923-fa49-4a86-ac1c-c12e2c9ed834/dependencies",
              "stages": "https://api.engineyard.com/requests/8bbba923-fa49-4a86-ac1c-c12e2c9ed834/stages",
              "account": "https://api.engineyard.com/accounts/3b664479-3b8d-41b6-b1ce-32887df0a0a1",
              "requester": "https://api.engineyard.com/requests/8bbba923-fa49-4a86-ac1c-c12e2c9ed834/requester",
              "messages": "https://api.engineyard.com/requests/8bbba923-fa49-4a86-ac1c-c12e2c9ed834/messages",
              "callback_url": "https://api.engineyard.com/requests/8bbba923-fa49-4a86-ac1c-c12e2c9ed834/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Get a network

GET /networks/:network

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "network": {
              "created_at": "2018-04-12T18:07:42+00:00",
              "deleted_at": null,
              "id": "12072773-b578-428e-a3e3-c6555cca403e",
              "cidr": "172.16.0.0/12",
              "tenancy": "default",
              "provisioned_id": "vpc-766d4427",
              "provider": "https://api.engineyard.com/providers/216",
              "location": "us-east-2",
              "subnets": "https://api.engineyard.com/subnets?network=12072773-b578-428e-a3e3-c6555cca403e"
            }
          }
            
          








Get a subnet

GET /subnets/:subnet

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnet": {
              "created_at": "2018-04-12T18:07:53+00:00",
              "deleted_at": null,
              "id": "a482d9aa-f296-496c-b443-b245554817d3",
              "provisioned_id": "subnet-a6a7e8b0",
              "cidr": "172.16.0.0/24",
              "location": "us-east-2b",
              "network": "https://api.engineyard.com/networks/d21a63b8-7164-4a39-8b62-7e8735dd0398",
              "primary": true
            }
          }
            
          








List networks

GET /networks

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "networks": [
              {
                "created_at": "2018-04-12T18:07:39+00:00",
                "deleted_at": null,
                "id": "cf3f22f5-0ed2-4744-89a3-2b30b1d584a1",
                "cidr": "172.16.0.0/12",
                "tenancy": "default",
                "provisioned_id": "vpc-d8dd8382",
                "provider": "https://api.engineyard.com/providers/215",
                "location": "us-east-2",
                "subnets": "https://api.engineyard.com/subnets?network=cf3f22f5-0ed2-4744-89a3-2b30b1d584a1"
              }
            ]
          }
            
          








List subnets

GET /subnets

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnets": [
              {
                "created_at": "2018-04-12T18:07:50+00:00",
                "deleted_at": null,
                "id": "96f95cd0-9328-43bc-921a-26c5696d7f75",
                "provisioned_id": "subnet-800213b7",
                "cidr": "172.16.0.0/24",
                "location": "us-east-2b",
                "network": "https://api.engineyard.com/networks/f9376847-8244-418e-9d48-540f387b71c4",
                "primary": true
              }
            ]
          }