Addresses API


Attach a address to a server

PUT /addresses/:address/attach

Parameters

server
required: false
Server to attach address to

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "server": 59
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "attach_address",
              "id": "a799f2ec-25d7-4cd5-87a3-402eef481354",
              "created_at": "2017-10-10T15:49:57+00:00",
              "started_at": "2017-10-10T15:49:57+00:00",
              "finished_at": "2017-10-10T15:49:58+00:00",
              "message": null,
              "request_status": "Finished: Attach address (a799f2ec-25d7-4cd5-87a3-402eef481354) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:49:58+00:00",
              "read_channel": null,
              "stage": "update",
              "dependencies": "https://api.engineyard.com/requests/a799f2ec-25d7-4cd5-87a3-402eef481354/dependencies",
              "stages": "https://api.engineyard.com/requests/a799f2ec-25d7-4cd5-87a3-402eef481354/stages",
              "account": "https://api.engineyard.com/accounts/29af0cdd-3f0a-485a-b7db-80c3ead4b061",
              "requester": "https://api.engineyard.com/requests/a799f2ec-25d7-4cd5-87a3-402eef481354/requester",
              "messages": "https://api.engineyard.com/requests/a799f2ec-25d7-4cd5-87a3-402eef481354/messages",
              "callback_url": "https://api.engineyard.com/requests/a799f2ec-25d7-4cd5-87a3-402eef481354/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/32"
            }
          }
            
          








Create a address

POST /addresses

Parameters

provider
required: false
Provider to create address with

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "provider": 178,
            "address": {
              "location": "us-west-2"
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "address_provision",
              "id": "ab3365e6-49e0-48a9-bfa9-4fe3a0958b69",
              "created_at": "2017-10-10T15:49:30+00:00",
              "started_at": "2017-10-10T15:49:30+00:00",
              "finished_at": "2017-10-10T15:49:31+00:00",
              "message": null,
              "request_status": "Finished: Address provision (ab3365e6-49e0-48a9-bfa9-4fe3a0958b69) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:49:31+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/ab3365e6-49e0-48a9-bfa9-4fe3a0958b69/dependencies",
              "stages": "https://api.engineyard.com/requests/ab3365e6-49e0-48a9-bfa9-4fe3a0958b69/stages",
              "account": "https://api.engineyard.com/accounts/ededb2f1-e5a0-4662-bb91-5791d19d05b9",
              "requester": "https://api.engineyard.com/requests/ab3365e6-49e0-48a9-bfa9-4fe3a0958b69/requester",
              "messages": "https://api.engineyard.com/requests/ab3365e6-49e0-48a9-bfa9-4fe3a0958b69/messages",
              "callback_url": "https://api.engineyard.com/requests/ab3365e6-49e0-48a9-bfa9-4fe3a0958b69/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/23"
            }
          }
            
          








Destroy an address

DELETE /addresses/:address

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_address_request",
              "id": "ddda2bf9-3f35-4a8f-8596-6856612d3caf",
              "created_at": "2017-10-10T15:50:16+00:00",
              "started_at": "2017-10-10T15:50:16+00:00",
              "finished_at": "2017-10-10T15:50:16+00:00",
              "message": null,
              "request_status": "Finished: Deprovision address request (ddda2bf9-3f35-4a8f-8596-6856612d3caf) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:50:16+00:00",
              "read_channel": null,
              "stage": "address.cleanup",
              "dependencies": "https://api.engineyard.com/requests/ddda2bf9-3f35-4a8f-8596-6856612d3caf/dependencies",
              "stages": "https://api.engineyard.com/requests/ddda2bf9-3f35-4a8f-8596-6856612d3caf/stages",
              "account": "https://api.engineyard.com/accounts/6d77840d-b077-4a79-bc36-d879a13afd99",
              "requester": "https://api.engineyard.com/requests/ddda2bf9-3f35-4a8f-8596-6856612d3caf/requester",
              "messages": "https://api.engineyard.com/requests/ddda2bf9-3f35-4a8f-8596-6856612d3caf/messages",
              "callback_url": "https://api.engineyard.com/requests/ddda2bf9-3f35-4a8f-8596-6856612d3caf/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Detach a address

PUT /addresses/:address/detach

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "detach_address",
              "id": "a16a4d42-d068-4cb9-84a8-4ca24542a0ff",
              "created_at": "2017-10-10T15:50:13+00:00",
              "started_at": "2017-10-10T15:50:13+00:00",
              "finished_at": "2017-10-10T15:50:13+00:00",
              "message": null,
              "request_status": "Finished: Detach address (a16a4d42-d068-4cb9-84a8-4ca24542a0ff) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T15:50:13+00:00",
              "read_channel": null,
              "stage": "update",
              "dependencies": "https://api.engineyard.com/requests/a16a4d42-d068-4cb9-84a8-4ca24542a0ff/dependencies",
              "stages": "https://api.engineyard.com/requests/a16a4d42-d068-4cb9-84a8-4ca24542a0ff/stages",
              "account": "https://api.engineyard.com/accounts/d552d54e-0911-4a78-9da1-d14faefa5af2",
              "requester": "https://api.engineyard.com/requests/a16a4d42-d068-4cb9-84a8-4ca24542a0ff/requester",
              "messages": "https://api.engineyard.com/requests/a16a4d42-d068-4cb9-84a8-4ca24542a0ff/messages",
              "callback_url": "https://api.engineyard.com/requests/a16a4d42-d068-4cb9-84a8-4ca24542a0ff/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/34"
            }
          }
            
          








List a provider's addresses

GET /providers/:provider/addresses

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "addresses": [
              {
                "id": 29,
                "created_at": "2017-10-10T15:49:42+00:00",
                "updated_at": "2017-10-10T15:49:42+00:00",
                "provisioned_id": "710.503.489.985",
                "ip_address": "710.503.489.985",
                "location": "us-west-2",
                "provider": "https://api.engineyard.com/providers/182",
                "server": null
              },
              {
                "id": 30,
                "created_at": "2017-10-10T15:49:42+00:00",
                "updated_at": "2017-10-10T15:49:42+00:00",
                "provisioned_id": "222.351.688.779",
                "ip_address": "222.351.688.779",
                "location": "us-west-2",
                "provider": "https://api.engineyard.com/providers/182",
                "server": null
              }
            ]
          }
            
          








List all addresses

GET /addresses

Parameters

account
required: false
Account to which the addresses belong
provider
required: false
Provider to which the addresses belong

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "addresses": [
              {
                "id": 25,
                "created_at": "2017-10-10T15:49:36+00:00",
                "updated_at": "2017-10-10T15:49:36+00:00",
                "provisioned_id": "775.592.390.886",
                "ip_address": "775.592.390.886",
                "location": "us-west-2",
                "provider": "https://api.engineyard.com/providers/180",
                "server": null
              },
              {
                "id": 26,
                "created_at": "2017-10-10T15:49:36+00:00",
                "updated_at": "2017-10-10T15:49:36+00:00",
                "provisioned_id": "884.985.864.644",
                "ip_address": "884.985.864.644",
                "location": "us-west-2",
                "provider": "https://api.engineyard.com/providers/180",
                "server": null
              }
            ]
          }
            
          








List an account's addresses

GET /accounts/:account/addresses

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "addresses": [
              {
                "id": 27,
                "created_at": "2017-10-10T15:49:39+00:00",
                "updated_at": "2017-10-10T15:49:39+00:00",
                "provisioned_id": "301.906.458.161",
                "ip_address": "301.906.458.161",
                "location": "us-east-1",
                "provider": "https://api.engineyard.com/providers/181",
                "server": null
              },
              {
                "id": 28,
                "created_at": "2017-10-10T15:49:39+00:00",
                "updated_at": "2017-10-10T15:49:39+00:00",
                "provisioned_id": "657.502.77.863",
                "ip_address": "657.502.77.863",
                "location": "us-east-1",
                "provider": "https://api.engineyard.com/providers/181",
                "server": null
              }
            ]
          }
            
          








Show a address

GET /addresses/:address

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "address": {
              "id": 24,
              "created_at": "2017-10-10T15:49:33+00:00",
              "ip_address": "452.622.454.722",
              "location": "us-east-1",
              "provider": "https://api.engineyard.com/providers/179",
              "provisioned_id": "452.622.454.722",
              "server": null,
              "updated_at": "2017-10-10T15:49:33+00:00"
            }
          }