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": 1,
            "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": "68378257-0451-4a18-86d0-2aed654a88b0",
              "created_at": "2017-02-22T17:02:12+00:00",
              "started_at": "2017-02-22T17:02:12+00:00",
              "finished_at": "2017-02-22T17:02:12+00:00",
              "message": null,
              "request_status": "Finished: Provision network (68378257-0451-4a18-86d0-2aed654a88b0) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:02:12+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/68378257-0451-4a18-86d0-2aed654a88b0/dependencies",
              "stages": "https://api.engineyard.com/requests/68378257-0451-4a18-86d0-2aed654a88b0/stages",
              "account": "https://api.engineyard.com/accounts/46d698fd-d9a6-43c5-adcb-83608812df45",
              "requester": "https://api.engineyard.com/requests/68378257-0451-4a18-86d0-2aed654a88b0/requester",
              "messages": "https://api.engineyard.com/requests/68378257-0451-4a18-86d0-2aed654a88b0/messages",
              "callback_url": "https://api.engineyard.com/requests/68378257-0451-4a18-86d0-2aed654a88b0/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/networks/97c7920e-505d-4f75-b27c-199d63efbf95"
            }
          }
            
          








Create a subnet

POST /subnets

Parameters

cidr
required: true
scope: network
CIDR range to use for the network
location
required: true
scope: network
Region for the network
network
required: true
Network ID for the subnet

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
            "network": "df300a79-9313-431c-adc7-e07e6a2be67d",
            "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": "8adf31f6-ce6c-42c9-bc9d-22f0011c9612",
              "created_at": "2017-02-22T17:02:49+00:00",
              "started_at": "2017-02-22T17:02:49+00:00",
              "finished_at": "2017-02-22T17:02:49+00:00",
              "message": null,
              "request_status": "Finished: Provision subnet (8adf31f6-ce6c-42c9-bc9d-22f0011c9612) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:02:49+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/8adf31f6-ce6c-42c9-bc9d-22f0011c9612/dependencies",
              "stages": "https://api.engineyard.com/requests/8adf31f6-ce6c-42c9-bc9d-22f0011c9612/stages",
              "account": "https://api.engineyard.com/accounts/457cbff4-926d-4db1-a0de-9d9aeacdfca2",
              "requester": "https://api.engineyard.com/requests/8adf31f6-ce6c-42c9-bc9d-22f0011c9612/requester",
              "messages": "https://api.engineyard.com/requests/8adf31f6-ce6c-42c9-bc9d-22f0011c9612/messages",
              "callback_url": "https://api.engineyard.com/requests/8adf31f6-ce6c-42c9-bc9d-22f0011c9612/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/subnets/08915b08-1c85-4dd3-a7ca-6b744636eb5c"
            }
          }
            
          








Get a network

GET /networks/:network

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "network": {
              "created_at": "2017-02-22T17:02:30+00:00",
              "deleted_at": null,
              "id": "f1287d5b-5e2d-4aba-ba87-9f91c6fece5a",
              "cidr": "172.16.0.0/12",
              "tenancy": "default",
              "provisioned_id": "vpc-3b037eed",
              "provider": "https://api.engineyard.com/providers/3",
              "location": "us-east-2"
            }
          }
            
          








Deprovision a network

DELETE /networks/:network

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_network",
              "id": "0bc03e58-083c-4f02-92d7-f0b642c0c612",
              "created_at": "2017-02-22T17:02:39+00:00",
              "started_at": "2017-02-22T17:02:39+00:00",
              "finished_at": "2017-02-22T17:02:40+00:00",
              "message": null,
              "request_status": "Finished: Deprovision network (0bc03e58-083c-4f02-92d7-f0b642c0c612) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:02:40+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/0bc03e58-083c-4f02-92d7-f0b642c0c612/dependencies",
              "stages": "https://api.engineyard.com/requests/0bc03e58-083c-4f02-92d7-f0b642c0c612/stages",
              "account": "https://api.engineyard.com/accounts/be67028d-0cd3-4029-9eb1-e84d93a29156",
              "requester": "https://api.engineyard.com/requests/0bc03e58-083c-4f02-92d7-f0b642c0c612/requester",
              "messages": "https://api.engineyard.com/requests/0bc03e58-083c-4f02-92d7-f0b642c0c612/messages",
              "callback_url": "https://api.engineyard.com/requests/0bc03e58-083c-4f02-92d7-f0b642c0c612/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








List networks

GET /networks

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "networks": [
              {
                "created_at": "2017-02-22T17:02:20+00:00",
                "deleted_at": null,
                "id": "750e6e92-3215-4456-8e5a-9e50753ca899",
                "cidr": "172.16.0.0/12",
                "tenancy": "default",
                "provisioned_id": "vpc-4b53138a",
                "provider": "https://api.engineyard.com/providers/2",
                "location": "us-east-2"
              }
            ]
          }
            
          








Get a subnet

GET /subnets/:subnet

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnet": {
              "created_at": "2017-02-22T17:03:07+00:00",
              "deleted_at": null,
              "id": "8eff3c7a-a3cb-478c-afa4-2b3b78d029b7",
              "provisioned_id": "subnet-73ae53db",
              "cidr": "172.16.0.0/24",
              "location": "us-east-2b",
              "network": "https://api.engineyard.com/networks/a67f9714-c0e9-454f-96dd-e311bdf58f70"
            }
          }
            
          








List subnets

GET /subnets

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnets": [
              {
                "created_at": "2017-02-22T17:02:58+00:00",
                "deleted_at": null,
                "id": "2680ce7c-d49c-40e8-8589-a3b89e1e7ebf",
                "provisioned_id": "subnet-65c18caa",
                "cidr": "172.16.0.0/24",
                "location": "us-east-2b",
                "network": "https://api.engineyard.com/networks/8338ef1e-2add-4a5f-a9b8-6d178ccd8a7e"
              }
            ]
          }
            
          








Deprovision a subnet

DELETE /subnets/:subnet

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_subnet",
              "id": "0d0e11cb-2737-4b86-8489-ba1bdda4a8c7",
              "created_at": "2017-02-22T17:03:16+00:00",
              "started_at": "2017-02-22T17:03:16+00:00",
              "finished_at": "2017-02-22T17:03:16+00:00",
              "message": null,
              "request_status": "Finished: Deprovision subnet (0d0e11cb-2737-4b86-8489-ba1bdda4a8c7) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:03:16+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/0d0e11cb-2737-4b86-8489-ba1bdda4a8c7/dependencies",
              "stages": "https://api.engineyard.com/requests/0d0e11cb-2737-4b86-8489-ba1bdda4a8c7/stages",
              "account": "https://api.engineyard.com/accounts/311e041a-83de-4310-9fd0-a614e6657745",
              "requester": "https://api.engineyard.com/requests/0d0e11cb-2737-4b86-8489-ba1bdda4a8c7/requester",
              "messages": "https://api.engineyard.com/requests/0d0e11cb-2737-4b86-8489-ba1bdda4a8c7/messages",
              "callback_url": "https://api.engineyard.com/requests/0d0e11cb-2737-4b86-8489-ba1bdda4a8c7/callback",
              "progress": false,
              "resource": false
            }
          }