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": 212,
            "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": "6d15e926-f774-4daf-9876-830abed5fdb5",
              "created_at": "2017-10-10T15:56:56+00:00",
              "started_at": "2017-10-10T15:56:56+00:00",
              "finished_at": "2017-10-10T15:56:56+00:00",
              "message": null,
              "request_status": "Finished: Provision network (6d15e926-f774-4daf-9876-830abed5fdb5) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:56:56+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/6d15e926-f774-4daf-9876-830abed5fdb5/dependencies",
              "stages": "https://api.engineyard.com/requests/6d15e926-f774-4daf-9876-830abed5fdb5/stages",
              "account": "https://api.engineyard.com/accounts/66b4c6bb-b3cd-4eb8-bf8a-916b433b0aec",
              "requester": "https://api.engineyard.com/requests/6d15e926-f774-4daf-9876-830abed5fdb5/requester",
              "messages": "https://api.engineyard.com/requests/6d15e926-f774-4daf-9876-830abed5fdb5/messages",
              "callback_url": "https://api.engineyard.com/requests/6d15e926-f774-4daf-9876-830abed5fdb5/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/networks/305e6295-46eb-4bd4-879f-a09f148915a7"
            }
          }
            
          








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": "00f8e845-ec6a-4d13-a5df-769ebf18a5a2",
            "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": "309a5204-50a5-49e7-918e-a5f202cbbcf5",
              "created_at": "2017-10-10T15:57:07+00:00",
              "started_at": "2017-10-10T15:57:07+00:00",
              "finished_at": "2017-10-10T15:57:07+00:00",
              "message": null,
              "request_status": "Finished: Provision subnet (309a5204-50a5-49e7-918e-a5f202cbbcf5) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:57:07+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/309a5204-50a5-49e7-918e-a5f202cbbcf5/dependencies",
              "stages": "https://api.engineyard.com/requests/309a5204-50a5-49e7-918e-a5f202cbbcf5/stages",
              "account": "https://api.engineyard.com/accounts/31cb2385-26c7-4f79-80d8-f70e6c608d56",
              "requester": "https://api.engineyard.com/requests/309a5204-50a5-49e7-918e-a5f202cbbcf5/requester",
              "messages": "https://api.engineyard.com/requests/309a5204-50a5-49e7-918e-a5f202cbbcf5/messages",
              "callback_url": "https://api.engineyard.com/requests/309a5204-50a5-49e7-918e-a5f202cbbcf5/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/subnets/6ea397ce-b41f-4776-aea4-c6890d09d48e"
            }
          }
            
          








Deprovision a network

DELETE /networks/:network

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_network",
              "id": "888ae63f-8f9f-4b7c-afc8-70aec61d4c8b",
              "created_at": "2017-10-10T15:57:04+00:00",
              "started_at": "2017-10-10T15:57:04+00:00",
              "finished_at": "2017-10-10T15:57:04+00:00",
              "message": null,
              "request_status": "Finished: Deprovision network (888ae63f-8f9f-4b7c-afc8-70aec61d4c8b) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:57:04+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/888ae63f-8f9f-4b7c-afc8-70aec61d4c8b/dependencies",
              "stages": "https://api.engineyard.com/requests/888ae63f-8f9f-4b7c-afc8-70aec61d4c8b/stages",
              "account": "https://api.engineyard.com/accounts/6e06f1cd-6e03-47fd-9977-ef6922d12197",
              "requester": "https://api.engineyard.com/requests/888ae63f-8f9f-4b7c-afc8-70aec61d4c8b/requester",
              "messages": "https://api.engineyard.com/requests/888ae63f-8f9f-4b7c-afc8-70aec61d4c8b/messages",
              "callback_url": "https://api.engineyard.com/requests/888ae63f-8f9f-4b7c-afc8-70aec61d4c8b/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Deprovision a subnet

DELETE /subnets/:subnet

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_subnet",
              "id": "fbcc151f-5b0f-46fa-9771-3f731b62f927",
              "created_at": "2017-10-10T15:57:16+00:00",
              "started_at": "2017-10-10T15:57:16+00:00",
              "finished_at": "2017-10-10T15:57:16+00:00",
              "message": null,
              "request_status": "Finished: Deprovision subnet (fbcc151f-5b0f-46fa-9771-3f731b62f927) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:57:16+00:00",
              "read_channel": null,
              "stage": "destroy",
              "dependencies": "https://api.engineyard.com/requests/fbcc151f-5b0f-46fa-9771-3f731b62f927/dependencies",
              "stages": "https://api.engineyard.com/requests/fbcc151f-5b0f-46fa-9771-3f731b62f927/stages",
              "account": "https://api.engineyard.com/accounts/55351873-4b8b-4544-85fe-8296d19c452c",
              "requester": "https://api.engineyard.com/requests/fbcc151f-5b0f-46fa-9771-3f731b62f927/requester",
              "messages": "https://api.engineyard.com/requests/fbcc151f-5b0f-46fa-9771-3f731b62f927/messages",
              "callback_url": "https://api.engineyard.com/requests/fbcc151f-5b0f-46fa-9771-3f731b62f927/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Get a network

GET /networks/:network

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "network": {
              "created_at": "2017-10-10T15:57:01+00:00",
              "deleted_at": null,
              "id": "f68a2de4-ce6a-437c-a490-977eb44020a2",
              "cidr": "172.16.0.0/12",
              "tenancy": "default",
              "provisioned_id": "vpc-924a1ec2",
              "provider": "https://api.engineyard.com/providers/214",
              "location": "us-east-2",
              "subnets": "https://api.engineyard.com/subnets?network=f68a2de4-ce6a-437c-a490-977eb44020a2"
            }
          }
            
          








Get a subnet

GET /subnets/:subnet

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnet": {
              "created_at": "2017-10-10T15:57:13+00:00",
              "deleted_at": null,
              "id": "a376b62b-44d0-4676-9786-86f6f9c1e972",
              "provisioned_id": "subnet-6bc3e5fb",
              "cidr": "172.16.0.0/24",
              "location": "us-east-2b",
              "network": "https://api.engineyard.com/networks/01055434-3e40-4696-8878-09ebfe084da8",
              "primary": true
            }
          }
            
          








List networks

GET /networks

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "networks": [
              {
                "created_at": "2017-10-10T15:56:59+00:00",
                "deleted_at": null,
                "id": "5c04b8fb-9a0b-4ab5-b70a-973d687ba23c",
                "cidr": "172.16.0.0/12",
                "tenancy": "default",
                "provisioned_id": "vpc-c5934ccb",
                "provider": "https://api.engineyard.com/providers/213",
                "location": "us-east-2",
                "subnets": "https://api.engineyard.com/subnets?network=5c04b8fb-9a0b-4ab5-b70a-973d687ba23c"
              }
            ]
          }
            
          








List subnets

GET /subnets

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "subnets": [
              {
                "created_at": "2017-10-10T15:57:10+00:00",
                "deleted_at": null,
                "id": "2e7cb875-ef3d-4595-840f-7a5ee4f81649",
                "provisioned_id": "subnet-736ff71d",
                "cidr": "172.16.0.0/24",
                "location": "us-east-2b",
                "network": "https://api.engineyard.com/networks/4f339c81-a713-4a98-9d87-43252eb35d65",
                "primary": true
              }
            ]
          }