Addresses API


Destroy an address

DELETE /addresses/:address

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_address_request",
              "id": "43d579ca-f871-4384-8b31-fde32f9d9824",
              "created_at": "2017-02-22T17:04:26+00:00",
              "started_at": "2017-02-22T17:04:26+00:00",
              "finished_at": "2017-02-22T17:04:26+00:00",
              "message": null,
              "request_status": "Finished: Deprovision address request (43d579ca-f871-4384-8b31-fde32f9d9824) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:04:26+00:00",
              "read_channel": null,
              "stage": "address.cleanup",
              "dependencies": "https://api.engineyard.com/requests/43d579ca-f871-4384-8b31-fde32f9d9824/dependencies",
              "stages": "https://api.engineyard.com/requests/43d579ca-f871-4384-8b31-fde32f9d9824/stages",
              "account": "https://api.engineyard.com/accounts/6877bd53-e2fd-4662-ab0f-32f1d140be48",
              "requester": "https://api.engineyard.com/requests/43d579ca-f871-4384-8b31-fde32f9d9824/requester",
              "messages": "https://api.engineyard.com/requests/43d579ca-f871-4384-8b31-fde32f9d9824/messages",
              "callback_url": "https://api.engineyard.com/requests/43d579ca-f871-4384-8b31-fde32f9d9824/callback",
              "progress": false,
              "resource": false
            }
          }
            
          








Create a address

POST /addresses

Parameters

provider
required: false
Provider to create address with

Request

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

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "address_provision",
              "id": "5896ca68-76b2-467f-9582-c03703fa70a2",
              "created_at": "2017-02-22T17:03:00+00:00",
              "started_at": "2017-02-22T17:03:00+00:00",
              "finished_at": "2017-02-22T17:03:00+00:00",
              "message": null,
              "request_status": "Finished: Address provision (5896ca68-76b2-467f-9582-c03703fa70a2) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:03:00+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/5896ca68-76b2-467f-9582-c03703fa70a2/dependencies",
              "stages": "https://api.engineyard.com/requests/5896ca68-76b2-467f-9582-c03703fa70a2/stages",
              "account": "https://api.engineyard.com/accounts/c1588ff4-a0e7-4f8f-9b2f-2f8e83f4ad3e",
              "requester": "https://api.engineyard.com/requests/5896ca68-76b2-467f-9582-c03703fa70a2/requester",
              "messages": "https://api.engineyard.com/requests/5896ca68-76b2-467f-9582-c03703fa70a2/messages",
              "callback_url": "https://api.engineyard.com/requests/5896ca68-76b2-467f-9582-c03703fa70a2/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/1"
            }
          }
            
          








Show a address

GET /addresses/:address

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "address": {
              "id": 2,
              "created_at": "2017-02-22T17:03:14+00:00",
              "ip_address": "966.229.688.817",
              "location": "us-east-2",
              "provider": "https://api.engineyard.com/providers/2",
              "provisioned_id": "966.229.688.817",
              "server": null,
              "updated_at": "2017-02-22T17:03:14+00:00"
            }
          }
            
          








Detach a address

PUT /addresses/:address/detach

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "detach_address",
              "id": "ec521e8d-5238-4bc2-baed-c744caeeb28e",
              "created_at": "2017-02-22T17:04:18+00:00",
              "started_at": "2017-02-22T17:04:18+00:00",
              "finished_at": "2017-02-22T17:04:18+00:00",
              "message": null,
              "request_status": "Finished: Detach address (ec521e8d-5238-4bc2-baed-c744caeeb28e) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:04:18+00:00",
              "read_channel": null,
              "stage": "update",
              "dependencies": "https://api.engineyard.com/requests/ec521e8d-5238-4bc2-baed-c744caeeb28e/dependencies",
              "stages": "https://api.engineyard.com/requests/ec521e8d-5238-4bc2-baed-c744caeeb28e/stages",
              "account": "https://api.engineyard.com/accounts/527fb87a-3f5c-4bff-8f38-1e76698fc736",
              "requester": "https://api.engineyard.com/requests/ec521e8d-5238-4bc2-baed-c744caeeb28e/requester",
              "messages": "https://api.engineyard.com/requests/ec521e8d-5238-4bc2-baed-c744caeeb28e/messages",
              "callback_url": "https://api.engineyard.com/requests/ec521e8d-5238-4bc2-baed-c744caeeb28e/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/12"
            }
          }
            
          








List a provider's addresses

GET /providers/:provider/addresses

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "addresses": [
              {
                "id": 7,
                "created_at": "2017-02-22T17:03:38+00:00",
                "updated_at": "2017-02-22T17:03:38+00:00",
                "provisioned_id": "617.503.878.25",
                "ip_address": "617.503.878.25",
                "location": "ap-southeast-1",
                "provider": "https://api.engineyard.com/providers/5",
                "server": null
              },
              {
                "id": 8,
                "created_at": "2017-02-22T17:03:38+00:00",
                "updated_at": "2017-02-22T17:03:38+00:00",
                "provisioned_id": "64.978.471.24",
                "ip_address": "64.978.471.24",
                "location": "ap-southeast-1",
                "provider": "https://api.engineyard.com/providers/5",
                "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": 3,
                "created_at": "2017-02-22T17:03:22+00:00",
                "updated_at": "2017-02-22T17:03:22+00:00",
                "provisioned_id": "773.147.95.27",
                "ip_address": "773.147.95.27",
                "location": "ap-northeast-1",
                "provider": "https://api.engineyard.com/providers/3",
                "server": null
              },
              {
                "id": 4,
                "created_at": "2017-02-22T17:03:22+00:00",
                "updated_at": "2017-02-22T17:03:22+00:00",
                "provisioned_id": "246.464.461.811",
                "ip_address": "246.464.461.811",
                "location": "ap-northeast-1",
                "provider": "https://api.engineyard.com/providers/3",
                "server": null
              }
            ]
          }
            
          








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": 1
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "attach_address",
              "id": "73ad7521-cc3f-4cf8-bd26-d91a83a9aacd",
              "created_at": "2017-02-22T17:03:57+00:00",
              "started_at": "2017-02-22T17:03:57+00:00",
              "finished_at": "2017-02-22T17:03:57+00:00",
              "message": null,
              "request_status": "Finished: Attach address (73ad7521-cc3f-4cf8-bd26-d91a83a9aacd) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-02-22T17:03:57+00:00",
              "read_channel": null,
              "stage": "update",
              "dependencies": "https://api.engineyard.com/requests/73ad7521-cc3f-4cf8-bd26-d91a83a9aacd/dependencies",
              "stages": "https://api.engineyard.com/requests/73ad7521-cc3f-4cf8-bd26-d91a83a9aacd/stages",
              "account": "https://api.engineyard.com/accounts/5e9ea1bb-7e60-4a73-8de3-9432d47512d4",
              "requester": "https://api.engineyard.com/requests/73ad7521-cc3f-4cf8-bd26-d91a83a9aacd/requester",
              "messages": "https://api.engineyard.com/requests/73ad7521-cc3f-4cf8-bd26-d91a83a9aacd/messages",
              "callback_url": "https://api.engineyard.com/requests/73ad7521-cc3f-4cf8-bd26-d91a83a9aacd/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/addresses/10"
            }
          }
            
          








List an account's addresses

GET /accounts/:account/addresses

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "addresses": [
              {
                "id": 5,
                "created_at": "2017-02-22T17:03:30+00:00",
                "updated_at": "2017-02-22T17:03:30+00:00",
                "provisioned_id": "2.896.501.427",
                "ip_address": "2.896.501.427",
                "location": "us-west-1",
                "provider": "https://api.engineyard.com/providers/4",
                "server": null
              },
              {
                "id": 6,
                "created_at": "2017-02-22T17:03:30+00:00",
                "updated_at": "2017-02-22T17:03:30+00:00",
                "provisioned_id": "855.977.377.852",
                "ip_address": "855.977.377.852",
                "location": "us-west-1",
                "provider": "https://api.engineyard.com/providers/4",
                "server": null
              }
            ]
          }