NAV Navbar
shell
  • Introduction
  • Authentication
  • User
  • Token
  • Locations
  • VM
  • Block Storage
  • Object Storage
  • Private networks
  • Floating IP
  • Network Load Balancer
  • Parameters
  • Billing
  • Payment
  • Pricing
  • Charging
  • Managed Services
  • Introduction

    Welcome to the warren.io API! You can use our API to create and manage compute and storage resources like Virtual Machines and Object Storage buckets.

    Authentication

    To authorize, use this code:

    # With shell, you can just pass the correct header with each request
    curl "api_endpoint_here"
      -H "apikey: meowmeowmeow"
    

    Make sure to replace meowmeowmeow with your API key.

    API of warren.io uses tokens to allow access to the API. You can register a new API token at our user interface.

    API token must be included in all API requests to the server in a header that looks like the following:

    apikey: meowmeowmeow

    User

    Get User Info

    curl "https://api.warren.io/v1/user-resource/user" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "cookie_id": "61b0378574974ae88dbfec0feb9917bc",
        "id": 8,
        "last_activity": "2018-02-22 14:18:47",
        "name": "user@example.com",
        "profile": null,
        "profile_data": {
            "avatar": "https://s.gravatar.com/avatar/bbb?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsv.png",
            "created_at": "2018-10-25 11:02:59",
            "email": "user@example.com",
            "first_name": "Cloudia",
            "id": 22,
            "last_name": "Iaas",
            "personal_id_number": "123456",
            "phone_number": "+111111111",
            "updated_at": "2021-05-18 11:07:00",
            "user_id": 8
        },
        "state": {}
    }
    

    Authenticated user can request data-model for themselves

    HTTP Request

    GET https://api.warren.io/v1/user-resource/user

    Modify Profile Info

    curl "https://api.warren.io/v1/user-resource/user/profile" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "first_name=Cloudia" \
        -d "last_name=Iaas" \
        -d "phone_number=+98765" \
        -d "personal_id_number=123456"
    

    The above command returns JSON structured like this:

    {
        "avatar": "https://s.gravatar.com/avatar/bbb?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsv.png",
        "created_at": "2018-10-25 11:02:59",
        "email": "user@example.com",
        "first_name": "Cloudia",
        "id": 22,
        "last_name": "Iaas",
        "personal_id_number": "123456",
        "phone_number": "+98765",
        "updated_at": "2021-05-18 11:07:00",
        "user_id": 8
    }
    

    Authenticated user can modify their own profile data

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/user/profile

    Form Parameters

    Parameter Type Description
    first_name String optional First name
    last_name String optional Last name
    phone_number String optional Phone number in any format
    personal_id_number String optional Personal identity number, usually issued by the state

    Token

    Delete Token

    curl "https://api.warren.io/v1/user-resource/token" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "token_id=0"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "Failed to delete kong token."
        }
    }
    

    Delete API token

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/token

    Form Parameters

    Parameter Default Type
    token_id A Whole number

    Update Token

    curl "https://api.warren.io/v1/user-resource/token" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "description=Description changed" \
        -d "restricted=false" \
        -d "token_id=3"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "Failed to update token."
        }
    }
    

    Update API token options.

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/token

    Form Parameters

    Parameter Default Type
    billing_account_id 0 A Whole number
    description Basic text / string value
    restricted Providing any value will set this to true
    token_id A Whole number

    Create Token

    curl "https://api.warren.io/v1/user-resource/token" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "description=Token Description" \
        -d "restricted=true" \
        -d "billing_account_id=6"
    

    The above command returns JSON structured like this:

    [
        {
            "billing_account_id": 0,
            "consumer_id": "9b68f9e5-34a5-41bb-8938-944c17e38723",
            "created_at": "2018-02-21 14:00:07",
            "description": "hea token",
            "id": 2,
            "kong_id": "a7540e94-bc84-4f18-a391-002c9b31eb34",
            "restricted": false,
            "token": "vYNKd8VWHg583sTkAZ8vKbyVtyXWILXn",
            "updated_at": null,
            "user_id": 8
        },
        {
            "billing_account_id": 6,
            "consumer_id": "9b68f9e5-34a5-41bb-8938-944c17e38723",
            "created_at": "2018-02-22 14:24:02",
            "description": "Token Description",
            "id": 7,
            "kong_id": "1dd6f9f7-f679-4ad0-a44d-9343c37a7dfb",
            "restricted": true,
            "token": "PS2vfOCKuU52be83QZhMMndqOusfFkHr",
            "updated_at": null,
            "user_id": 8
        }
    ]
    

    Create new token and register it at API Gateway

    HTTP Request

    POST https://api.warren.io/v1/user-resource/token

    Form Parameters

    Parameter Default Type
    billing_account_id 0 A Whole number
    description Basic text / string value
    restricted Accepts a true or false value

    List Tokens

    curl "https://api.warren.io/v1/user-resource/token/list" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "billing_account_id": 0,
            "consumer_id": "9b68f9e5-34a5-41bb-8938-944c17e38723",
            "created_at": "2018-02-21 14:00:07",
            "description": "hea token",
            "id": 2,
            "kong_id": "a7540e94-bc84-4f18-a391-002c9b31eb34",
            "restricted": false,
            "token": "vYNKd8VWHg583sTkAZ8vKbyVtyXWILXn",
            "updated_at": null,
            "user_id": 8
        },
        {
            "billing_account_id": 6,
            "consumer_id": "9b68f9e5-34a5-41bb-8938-944c17e38723",
            "created_at": "2018-02-22 14:24:02",
            "description": "Token Description",
            "id": 7,
            "kong_id": "1dd6f9f7-f679-4ad0-a44d-9343c37a7dfb",
            "restricted": true,
            "token": "PS2vfOCKuU52be83QZhMMndqOusfFkHr",
            "updated_at": null,
            "user_id": 8
        }
    ]
    

    List user API tokens

    HTTP Request

    GET https://api.warren.io/v1/user-resource/token/list

    Locations

    List Locations

    curl "https://api.warren.io/v1/config/locations" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "display_name": "Cycletown",
            "is_default": true,
            "is_preferred": false,
            "description": "The original location",
            "order_nr": 1,
            "slug": "cyc01",
            "country_code": "est"
        },
        {
            "display_name": "Busburg",
            "is_default": false,
            "is_preferred": true,
            "description": "Secondary location",
            "order_nr": 2,
            "slug": "bus02",
            "country_code": "est"
        }
    ]
    

    Locations are different data centres or resource pools where virtual machines can be hosted. By default API calls manage resources in the "is_default": true location. To access a specific location, its slug must be used in the API URL right after version number: v1/{slug}/. In the following example Cycletown location is used if no location is specified.

    Slug URL Location
    https://api.warren.io/v1/user-resource/vm Cycletown (default)
    cyc01 https://api.warren.io/v1/cyc01/user-resource/vm Cycletown
    bus02 https://api.warren.io/v1/bus02/user-resource/vm Busburg

    To get a full list of all location-specific resources, all locations must be queried. There is no API endpoint that would return virtual machines from all locations.

    Location specific API endpoints

    Resource URL
    Virtual Machines https://api.warren.io/v1/{slug}/user-resource/vm
    https://api.warren.io/v1/{slug}/user-resource/billing_resources
    https://api.warren.io/v1/{slug}/user-resource/resource_billing
    Floating IPs https://api.warren.io/v1/{slug}/network/ip_addresses

    HTTP Request

    GET https://api.warren.io/v1/config/locations

    VM

    Delete VM

    curl "https://api.warren.io/v1/user-resource/vm" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "uuid=aaaaaaaa-0000-bbbb-1111-cccccccccccc"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "No such virtual machine exists. aaaaaaaa-0000-bbbb-1111-cccccccccccc"
        }
    }
    

    #location-specific

    Delete virtual machine

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/vm

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    Get VM Info

    curl "https://api.warren.io/v1/user-resource/vm?uuid=f80b1d62-ffe4-43ef-9210-60f05445456a" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "backup": true,
        "billing_account": 6,
        "created_at": "2018-02-22 11:10:17",
        "description": "",
        "designated_pool_name": "General purpose",
        "designated_pool_uuid": "d2fc6881-9316-46d7-b515-b6cddaeee927", 
        "hostname": "hostname",
        "id": 7,
        "mac": "52:54:00:6c:6a:ac",
        "memory": 2048,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.123.8.223",
        "public_ipv6": "2a05:1cc0:10:30::80:fffe",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 11:10:37.793878",
                "id": 5,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a"
            }
        ],
        "tags": null,
        "updated_at": "2018-02-22 13:48:21",
        "user_id": 8,
        "username": "example",
        "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
        "vcpu": 2
    }
    

    #location-specific

    Get virtual machine data

    HTTP Request

    GET https://api.warren.io/v1/user-resource/vm

    Query Parameters

    Parameter Default Type
    uuid Basic text / string value

    Change Password

    curl "https://api.warren.io/v1/user-resource/vm/user" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46" \
        -d "username=example" \
        -d "password=Password1234"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    #location-specific

    Set a new password for an existing user on the virtual machine. The VM must be running, otherwise the password cannot be changed and an error will be returned.

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/vm/user

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    username Basic text / string value
    password Basic text / string value

    Modify VM

    curl "https://api.warren.io/v1/user-resource/vm" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46" \
        -d "name=web-server" \
        -d "vcpu=4" \
        -d "ram=2048"
    

    The above command returns JSON structured like this:

    {
      "backup": true,
      "billing_account": 129188,
      "created_at": "2021-03-01 13:42:03",
      "description": "ubuntu-from-snap",
      "hostname": "ubuntu-from-snap",
      "mac": "52:54:00:ee:81:fb",
      "memory": 2048,
      "name": "web-server",
      "os_name": "ubuntu",
      "os_version": "20.04",
      "private_ipv4": "10.1.29.54",
      "public_ipv6": "2a05:1cc0:10:30::80:fffe",
      "status": "stopped",
      "storage": [
        {
          "created_at": "2021-03-01 13:42:05",
          "name": "vda",
          "pool": "n/a",
          "primary": true,
          "replica": [],
          "shared": false,
          "size": 40,
          "type": "n/a",
          "user_id": 29,
          "uuid": "aa546efe-8c33-480f-91a6-9e7e58b9d80a"
        }
      ],
      "updated_at": "2022-05-26 12:53:41",
      "user_id": 29,
      "username": "example",
      "uuid": "49c039db-7bcd-4f20-9358-88c4618c547a",
      "vcpu": 4
    }
    

    #location-specific

    Currently only name, vcpu and ram can be changed. Do note that vcpu and ram can only be changed when the machine is in stopped state.

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/vm

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    name Basic text / string value
    ram A Whole number
    vcpu A Whole number

    Create VM

    curl "https://api.warren.io/v1/user-resource/vm" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "name=Ubuntu-16-04" \
        -d "os_name=ubuntu" \
        -d "os_version=16.04" \
        -d "disks=20" \
        -d "vcpu=2" \
        -d "ram=2048" \
        -d "designated_pool_uuid=d2fc6881-9316-46d7-b515-b6cddaeee927" \
        -d "username=example" \
        -d "password=Password123" \
        -d "billing_account_id=6" \
        -d "network_uuid=50341410-9e88-4af2-a21e-b8c898e33e52" \
        -d 'cloud_init={"runcmd": ["/firstboot"], "write_files": [{"path": "/firstboot", "content": "IyEvYmluL2Jhc2gKZWNobyBOb3cgQm9vdGluZwoK", "permissions": "0755", "encoding": "b64"}]}'
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 6,
        "created_at": "2018-02-22 14:24:03",
        "description": "",
        "designated_pool_name": "General purpose", 
        "designated_pool_uuid": "d2fc6881-9316-46d7-b515-b6cddaeee927",
        "hostname": "hostname",
        "id": 10,
        "mac": "52:54:00:a2:52:6a",
        "memory": 2048,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.123.8.223",
        "public_ipv6": "2a05:1cc0:10:30::80:fffe",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 14:24:13.766985",
                "id": 8,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "fc880f74-cf03-4a7a-93da-74c506157023"
            }
        ],
        "tags": null,
        "updated_at": "2018-02-22 14:24:13",
        "user_id": 8,
        "username": "example",
        "uuid": "fc880f74-cf03-4a7a-93da-74c506157023",
        "vcpu": 2
    }
    

    #location-specific

    Create a new virtual machine. billing_account_id is optional if using an API token that is restricted to one billing account.

    Specify source_uuid (VM UUID) and source_replica (snapshot or backup UUID) to create the new virtual machine as a copy of an existing backup or snapshot.

    Specify disk_uuid to use an existing unattached disk as the boot disk for the new VM. In this case disks parameter has no effect and should be left empty.

    If a VM without public IPv4 address is needed, set reserve_public_ip to False. Specify network_uuid to create the VM in the given network. If the value is emtpy the VM is created in the default network.

    VMs are initialised with cloud-init, it is possible to add custom cloud-init configuration to cloud_init parameter as JSON, currently runcmd and write_files are supported. See cloud-init documentation for more information.

    The designated_pool_uuid parameter allows to choose a server class that the VM will be hosted on. See also List VM resource pools

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm

    Form Parameters

    Parameter Default Type
    backup False Accepts a true or false value
    billing_account_id 0 A Whole number
    description Basic text / string value
    designated_pool_uuid Resource pool to allocate this VM into.
    disks Basic text / string value
    name Basic text / string value
    os_name Basic text / string value
    os_version Basic text / string value
    password Basic text / string value
    public_key Basic text / string value
    ram A Whole number
    source_replica Basic text / string value
    source_uuid A Universally Unique IDentifier
    username Basic text / string value
    vcpu A Whole number
    reserve_public_ip True Accepts a true or false value
    network_uuid Network uuid
    cloud_init JSON
    disk_uuid A Universally Unique IDentifier

    List VM resource pools

    curl "https://api.warren.io/v1/user-resource/host_pool/list" \
        -X GET \
        -H "apikey: meowmeowmeow"
    

    The above command returns JSON structured like this:

    [
      {
        "created_at": "2022-12-28 13:50:52",
        "description": "A server class for a wide range of purposes",
        "is_default_designated": true,
        "name": "General",
        "updated_at": "2023-02-21 08:17:13",
        "uuid": "4820b11f-82c9-4313-a1ef-14d6039981db"
      },
      {
        "created_at": "2022-12-28 13:50:52",
        "description": "another fine server class",
        "is_default_designated": false,
        "name": "Performance",
        "updated_at": "2023-02-22 21:21:13",
        "uuid": "d2fc6881-9316-46d7-b515-b6cddaeee927"
      }
    ]
    

    #location-specific

    Get a list of pools available for running compute resources.

    HTTP Request

    GET https://api.warren.io/v1/user-resource/host_pool/list

    Reinstall VM

    curl "https://api.warren.io/v1/user-resource/vm/reinstall" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46" \
        -d "os_name=ubuntu" \
        -d "os_version=22.04-lts" \
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 129072,
        "created_at": "2018-12-18 13:30:59",
        "description": "newbuntu",
        "hostname": "newbuntu",
        "mac": "52:54:00:45:e2:40",
        "memory": 2048,
        "name": "web-server",
        "os_name": "ubuntu",
        "os_version": "22.04-lts",
        "private_ipv4": "10.1.8.254",
        "public_ipv6": "2a05:1cc0:10:30::80:fff8",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-12-18 13:32:33.082406",
                "id": 1120,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [
                    {
                        "created_at": "2018-12-21 14:05:35.509898",
                        "id": 866,
                        "master_id": 1120,
                        "master_uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46",
                        "pool": "",
                        "size": 20,
                        "type": "snapshot",
                        "updated_at": null,
                        "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb462018-12-21-14-05-33"
                    }
                ],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46"
            }
        ],
        "updated_at": "2018-12-21 14:19:14",
        "user_id": 8,
        "username": "user",
        "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46",
        "vcpu": 4
    }
    

    #location-specific

    Discard virtual machine's current storage state and overwrite it with an OS base image. os_name and os_version are optional, the default is to reinstall the same OS version that the VM currently has.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/reinstall

    Form Parameters

    Parameter Default Type
    os_name VM os_name Basic text / string value
    os_version VM os_version Basic text / string value
    uuid A Universally Unique IDentifier

    Toggle Auto Backup

    curl "https://api.warren.io/v1/user-resource/vm/backup" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=f80b1d62-ffe4-43ef-9210-60f05445456a"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 6,
        "created_at": "2018-02-22 11:10:17",
        "description": "",
        "hostname": "hostname",
        "id": 7,
        "mac": "52:54:00:6c:6a:ac",
        "memory": 2048,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 11:10:37.793878",
                "id": 5,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a"
            }
        ],
        "tags": null,
        "updated_at": "2018-02-22 14:24:14",
        "user_id": 8,
        "username": "example",
        "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
        "vcpu": 2
    }
    

    #location-specific

    Toggle automatic backups for virtual machine

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/backup

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    Clone VM

    curl "https://api.warren.io/v1/user-resource/vm/clone" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=f80b1d62-ffe4-43ef-9210-60f05445456a" \
        -d "name=Name of the Clone"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 6,
        "created_at": "2018-02-22 14:24:30",
        "description": "",
        "hostname": "hostname",
        "id": 11,
        "mac": "52:54:00:59:44:d1",
        "memory": 2048,
        "name": "Name of the Clone",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.123.8.223",
        "public_ipv6": "2a05:1cc0:10:30::80:fffe",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 14:24:30.312877",
                "id": 9,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43"
            }
        ],
        "tags": null,
        "updated_at": null,
        "user_id": 8,
        "username": "example",
        "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43",
        "vcpu": 2
    }
    

    #location-specific

    Clone existing virtual machine

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/clone

    Form Parameters

    Parameter Default Type
    name Basic text / string value
    uuid A Universally Unique IDentifier

    Release Public IP

    curl "https://api.warren.io/v1/user-resource/vm/ip/public" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 6,
        "created_at": "2018-02-22 14:24:03",
        "description": "",
        "hostname": "hostname",
        "id": 10,
        "mac": "52:54:00:a2:52:6a",
        "memory": 2048,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.1.14.253",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 14:24:13.766985",
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "fc880f74-cf03-4a7a-93da-74c506157023"
            }
        ],
        "updated_at": "2018-02-22 14:24:13",
        "user_id": 8,
        "username": "example",
        "uuid": "fc880f74-cf03-4a7a-93da-74c506157023",
        "vcpu": 2
    }
    

    #location-specific

    DEPRECATED, see Floating IP for the updated API.

    Release a virtual machine's public IPv4 address. The address will remain reserved for the user.

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/vm/ip/public

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    Reserve Public IP

    curl "https://api.warren.io/v1/user-resource/vm/ip/public" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 6,
        "created_at": "2018-02-22 14:24:03",
        "description": "",
        "hostname": "hostname",
        "id": 10,
        "mac": "52:54:00:a2:52:6a",
        "memory": 2048,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.1.14.253",
        "status": "running",
        "storage": [
            {
                "created_at": "2018-02-22 14:24:13.766985",
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "fc880f74-cf03-4a7a-93da-74c506157023"
            }
        ],
        "updated_at": "2018-02-22 14:24:13",
        "user_id": 8,
        "username": "example",
        "uuid": "fc880f74-cf03-4a7a-93da-74c506157023",
        "vcpu": 2
    }
    

    #location-specific

    DEPRECATED, see Floating IP for the updated API. This endpoint reserves a new IP address but does not return it in the response.

    Reserve and assign a public IP address for a virtual machine.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/ip/public

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    List VMs

    curl "https://api.warren.io/v1/user-resource/vm/list" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 14:24:30",
            "description": "",
            "hostname": "hostname",
            "id": 11,
            "mac": "52:54:00:59:44:d1",
            "memory": 2048,
            "name": "Name of the Clone",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "10.1.14.251",
            "public_ipv6": "2a05:1cc0:10:30::80:fffe",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 14:24:30.312877",
                    "id": 9,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43"
                }
            ],
            "tags": null,
            "updated_at": null,
            "user_id": 8,
            "username": "example",
            "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 14:24:03",
            "description": "",
            "hostname": "hostname",
            "id": 10,
            "mac": "52:54:00:a2:52:6a",
            "memory": 2048,
            "name": "Ubuntu-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "10.1.14.253",
            "public_ipv6": "2a05:1cc0:10:30::80:fffb",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 14:24:13.766985",
                    "id": 8,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "fc880f74-cf03-4a7a-93da-74c506157023"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 14:24:13",
            "user_id": 8,
            "username": "example",
            "uuid": "fc880f74-cf03-4a7a-93da-74c506157023",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 11:29:30",
            "description": "",
            "hostname": "hostname",
            "id": 8,
            "mac": "52:54:00:20:e4:ac",
            "memory": 2048,
            "name": "Ubuntu-3-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "10.1.14.252",
            "public_ipv6": "2a05:1cc0:10:30::80:fffa",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 11:29:41.098793",
                    "id": 6,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "dab38e6e-b5bf-41c5-9baa-be1f2ec47931"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 11:29:41",
            "user_id": 8,
            "username": "example",
            "uuid": "dab38e6e-b5bf-41c5-9baa-be1f2ec47931",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 11:10:17",
            "description": "",
            "hostname": "hostname",
            "id": 7,
            "mac": "52:54:00:6c:6a:ac",
            "memory": 2048,
            "name": "Ubuntu-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "10.1.14.250",
            "public_ipv6": "2a05:1cc0:10:30::80:fff8",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 11:10:37.793878",
                    "id": 5,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 14:24:14",
            "user_id": 8,
            "username": "example",
            "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 09:50:26",
            "description": "",
            "hostname": "hostname",
            "id": 6,
            "mac": "52:54:00:d4:ba:a3",
            "memory": 2048,
            "name": "DEBUGXYZ-2-buntu",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "10.1.14.249",
            "public_ipv6": "2a05:1cc0:10:30::80:fff7",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 09:50:37.638670",
                    "id": 4,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "e624e5cb-e0f9-4b59-8686-0a4c829027c6"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 09:50:37",
            "user_id": 8,
            "username": "example",
            "uuid": "e624e5cb-e0f9-4b59-8686-0a4c829027c6",
            "vcpu": 2
        }
    ]
    

    #location-specific

    Get virtual machine list

    HTTP Request

    GET https://api.warren.io/v1/user-resource/vm/list

    Rebuild from Replica

    curl "https://api.warren.io/v1/user-resource/vm/rebuild" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb46" \
        -d "replica_uuid=5aea1842-895f-4bd3-8bd6-e37b2282fb462018-12-21-14-05-33"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 129072,
        "created_at": "2018-12-18 13:30:59",
        "description": "6\u20ac",
        "hostname": "hostname",
        "id": 1263,
        "mac": "52:54:00:45:e2:40",
        "memory": 2048,
        "name": "web-server",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.1.8.254",
        "public_ipv6": "2a05:1cc0:10:30::80:fff8",
        "status": "stopped",
        "storage": [
            {
                "created_at": "2018-12-18 13:32:33.082406",
                "id": 1120,
                "name": "sda",
                "pool": "default2",
                "primary": true,
                "replica": [
                    {
                        "created_at": "2018-12-21 14:05:35.509898",
                        "id": 866,
                        "master_id": 1120,
                        "master_uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46",
                        "pool": "",
                        "size": 20,
                        "type": "snapshot",
                        "updated_at": null,
                        "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb462018-12-21-14-05-33"
                    }
                ],
                "shared": false,
                "size": 20,
                "type": "block",
                "updated_at": null,
                "user_id": 8,
                "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46"
            }
        ],
        "tags": null,
        "updated_at": "2018-12-21 14:19:14",
        "user_id": 8,
        "username": "user",
        "uuid": "5aea1842-895f-4bd3-8bd6-e37b2282fb46",
        "vcpu": 4
    }
    

    #location-specific

    Discard virtual machine's current storage state and restore it from the specified replica.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/rebuild

    Form Parameters

    Parameter Default Type
    replica_uuid Basic text / string value
    uuid A Universally Unique IDentifier

    Delete Replica

    curl "https://api.warren.io/v1/user-resource/vm/replica" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "replica_uuid=val"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    #location-specific

    Delete replica by uuid

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/vm/replica

    Form Parameters

    Parameter Default Type
    replica_uuid Basic text / string value

    List Replicas

    curl "https://api.warren.io/v1/user-resource/vm/replica?uuid=f80b1d62-ffe4-43ef-9210-60f05445456a" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    []
    

    #location-specific

    Get virtual machine storage replica list

    HTTP Request

    GET https://api.warren.io/v1/user-resource/vm/replica

    Query Parameters

    Parameter Default Type
    r_type snapshot Basic text / string value
    uuid A Universally Unique IDentifier

    Create Replica

    curl "https://api.warren.io/v1/user-resource/vm/replica" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=f80b1d62-ffe4-43ef-9210-60f05445456a"
    

    The above command returns JSON structured like this:

    {
        "created_at": "2018-02-22 11:10:37",
        "id": 5,
        "name": "sda",
        "pool": "default2",
        "primary": true,
        "replica": [
            {
                "created_at": "2018-02-22 14:24:51.886326",
                "id": 5,
                "master_id": 5,
                "master_uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
                "pool": "",
                "size": 60,
                "type": "snapshot",
                "updated_at": null,
                "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a2018-02-22-14-24-32"
            }
        ],
        "shared": false,
        "size": 20,
        "type": "block",
        "updated_at": null,
        "user_id": 8,
        "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a"
    }
    

    #location-specific

    Create replica from block storage

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/replica

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    Start VM

    curl "https://api.warren.io/v1/user-resource/vm/start" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=aaaaaaaa-0000-bbbb-1111-cccccccccccc"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "No such virtual machine exists. aaaaaaaa-0000-bbbb-1111-cccccccccccc"
        }
    }
    

    #location-specific

    Start virtual machine

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/start

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier

    Stop VM

    curl "https://api.warren.io/v1/user-resource/vm/stop" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb"
    

    The above command returns JSON structured like this:

    {
        "backup": false,
        "billing_account": 129072,
        "created_at": "2018-11-08 14:57:47",
        "description": "",
        "hostname": "hostname",
        "id": 232,
        "mac": "52:54:00:18:db:d6",
        "memory": 4096,
        "name": "Ubuntu-16-04",
        "os_name": "ubuntu",
        "os_version": "16.04",
        "private_ipv4": "10.1.8.248",
        "public_ipv6": "2a05:1cc0:10:30::80:fff5",
        "status": "stopped",
        "storage": [
            {
                "created_at": "2018-11-08 14:58:19.237160",
                "primary": true,
                "type": "block",
                "name": "sda",
                "uuid": "5052bf02-044a-4d35-a803-d6b156f84beb",
                "updated_at": null,
                "shared": false,
                "pool": "default2",
                "size": 20,
                "user_id": 8,
                "id": 214,
                "replica": []
            }
        ],
        "tags": null,
        "updated_at": "2019-04-24 09:30:05",
        "user_id": 8,
        "username": "user",
        "uuid": "5052bf02-044a-4d35-a803-d6b156f84beb",
        "vcpu": 4
    }
    

    #location-specific

    Stop a virtual machine. By default, tries to stop the VM gracefully via ACPI shutdown signal, this gives the OS the opportunity to do a proper shutdown. If, for some reason, the OS does not respond to a normal shutdown signal, an optional force=True parameter can be specified. This will "pull the plug" immediately, it is the physical equivalent of cutting the power supply to a machine. This has the potential danger of leaving behind corrupt data on the VM, so use it with caution.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/stop

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    force False Accepts a true or false value

    Boot VM in rescue mode

    curl "https://api.warren.io/v1/user-resource/vm/rescue_start" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb"
    

    #location-specific

    Launches the VM with a “live” OS image attached and used for booting. The rescue mode is enabled only for the current launch. Next time this VM is started it will follow a normal routine.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/rescue_start

    Form Parameters

    Parameter Default Type
    uuid Unique identifier of virtual machine

    Add Disk

    curl "https://api.warren.io/v1/user-resource/vm/storage" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb" \
        -d "size_gb=50"
    

    The above command returns JSON structured like this:

    {
        "created_at": "2019-08-14 13:57:44",
        "name": "vdc",
        "pool": "default",
        "primary": false,
        "replica": [],
        "shared": false,
        "size": 50,
        "type": "block",
        "uuid": "3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    }
    

    #location-specific

    Create and add a disk device of specified capacity to a virtual machine.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/storage

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    size_gb A Whole number

    Modify Disk

    curl "https://api.warren.io/v1/user-resource/vm/storage" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb" \
        -d "disk_uuid=3d91aa31-16ec-44ee-b8b3-22a0bda6559e" \
        -d "size_gb=60"
    

    The above command returns JSON structured like this:

    {
        "created_at": "2019-08-14 13:57:44",
        "name": "vdc",
        "pool": "default",
        "primary": false,
        "replica": [],
        "shared": false,
        "size": 60,
        "type": "block",
        "updated_at": "2019-08-14 13:58:44",
        "uuid": "3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    }
    

    #location-specific

    Modify virtual machine disk with the specified capacity. New disk size cannot be smaller than current size.

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/vm/storage

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier (VM)
    disk_uuid A Universally Unique IDentifier (storage)
    size_gb A Whole number

    Delete Attached Disk

    curl "https://api.warren.io/v1/user-resource/vm/storage" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb" \
        -d "storage_uuid=3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    #location-specific

    Disconnects and completely removes a disk device from a virtual machine. Data on that disk will be irrecoverably lost. Primary/boot disks cannot be deleted. Both VM UUID and disk UUID must be provided.

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/vm/storage

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    storage_uuid A Universally Unique IDentifier

    Block Storage

    These operations manage Virtual Machine disks.

    Create Disk

    curl "https://api.warren.io/v1/storage/disks" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=129673" \
        -d "size_gb=50" \
        -d "source_image_type=EMPTY"
    

    The above command returns JSON structured like this:

    {
        "uuid": "05a61876-86f3-4b05-b0ec-53ee6fa03ced",
        "status": "Active",
        "user_id": 28,
        "billing_account_id": 129673,
        "size_gb": 50,
        "source_image_type": "EMPTY",
        "created_at": "2022-09-01T12:03:14.355+0000",
        "updated_at": "2022-09-01T12:03:14.355+0000"
    }
    

    #location-specific

    Creates a new block storage aka disk. It can be initiated as an empty disk, or it can be a copy of an OS base image, an existing disk or a snapshot. If source_image is set then the new image will be a copy of the image referred here. source_image is required if source_image_type is something else than EMPTY. For OS_BASE it must be something like ubuntu_20.04. For DISK or SNAPSHOT it is the UUID of the respective resource.

    HTTP Request

    POST https://api.warren.io/v1/storage/disks

    Form Parameters

    Parameter Type Description
    size_gb String optional Size of disk in GiB. Required if size is not apparent from source image.
    billing_account_id Integer optional Required if using a global API token.
    source_image_type String optional One of OS_BASE, DISK, SNAPSHOT or EMPTY (default).
    source_image String optional Reference to an image that will be copied.

    Get Disk

    curl "https://api.warren.io/v1/storage/disks/cef3a629-89b0-40ec-986b-4b6e831f9b64" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64",
        "status": "Active",
        "snapshots": [
            {
                "uuid": "8ae9b8e2-54b5-4163-b692-1327ec39ce35",
                "sizeGb": 20,
                "created_at": "2022-09-02T01:31:51.065+0000",
                "disk_uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64"
            },
            {
                "uuid": "48365c53-6e92-48b3-ad7e-d70794399872",
                "sizeGb": 30,
                "created_at": "2022-08-30T01:31:45.625+0000",
                "disk_uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64"
            }
        ],
        "user_id": 28,
        "billing_account_id": 129552,
        "size_gb": 30,
        "source_image_type": "OS_BASE",
        "source_image": "ubuntu_20.04",
        "created_at": "2022-08-25T09:26:21.171+0000",
        "updated_at": "2022-08-25T09:26:32.857+0000"
    }
    

    #location-specific

    Get one disk.

    HTTP Request

    GET https://api.warren.io/v1/storage/disks/{disk_uuid}

    Path Parameters

    Parameter Type Description
    disk_uuid UUID Defines which disk to retrieve

    List Disks

    curl "https://api.warren.io/v1/storage/disks" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "uuid": "05a61876-86f3-4b05-b0ec-53ee6fa03ced",
            "status": "Active",
            "snapshots": [],
            "user_id": 28,
            "billing_account_id": 129072,
            "size_gb": 50,
            "source_image_type": "EMPTY",
            "created_at": "2022-09-01T12:03:14.355+0000",
            "updated_at": "2022-09-01T12:03:14.355+0000"
        },
        {
            "uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64",
            "status": "Active",
            "snapshots": [
                {
                    "uuid": "8ae9b8e2-54b5-4163-b692-1327ec39ce35",
                    "sizeGb": 20,
                    "created_at": "2022-09-02T01:31:51.065+0000",
                    "disk_uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64"
                },
                {
                    "uuid": "48365c53-6e92-48b3-ad7e-d70794399872",
                    "sizeGb": 30,
                    "created_at": "2022-08-30T01:31:45.625+0000",
                    "disk_uuid": "cef3a629-89b0-40ec-986b-4b6e831f9b64"
                }
            ],
            "user_id": 28,
            "billing_account_id": 129552,
            "size_gb": 30,
            "source_image_type": "OS_BASE",
            "source_image": "ubuntu_20.04",
            "created_at": "2022-08-25T09:26:21.171+0000",
            "updated_at": "2022-08-25T09:26:32.857+0000"
        }
    ]
    

    #location-specific

    List user's disks.

    HTTP Request

    GET https://api.warren.io/v1/storage/disks

    Modify Disk Info

    curl "https://api.warren.io/v1/storage/disks/05a61876-86f3-4b05-b0ec-53ee6fa03ced" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "billing_account_id=129072"
    

    The above command returns JSON structured like this:

    {
        "uuid": "05a61876-86f3-4b05-b0ec-53ee6fa03ced",
        "status": "Active",
        "user_id": 28,
        "billing_account_id": 129072,
        "size_gb": 50,
        "source_image_type": "EMPTY",
        "created_at": "2022-09-01T12:03:14.355+0000",
        "updated_at": "2022-09-01T12:03:14.355+0000"
    }
    

    #location-specific

    Modify a disk's billing account.

    HTTP Request

    PATCH https://api.warren.io/v1/storage/disks/{disk_uuid}

    Path Parameters

    Parameter Type Description
    disk_uuid UUID Defines which disk to modify

    Form Parameters

    Parameter Type Description
    billing_account_id Integer ID of a billing account.

    Delete Disk

    curl "https://api.warren.io/v1/storage/disks/cef3a629-89b0-40ec-986b-4b6e831f9b64" \
        -H "apikey: meowmeowmeow" \
        -X DELETE
    

    The above command returns HTTP status 204 No Content

    #location-specific

    Delete a disk and all its snapshots. All its data will be lost irrecoverably.

    HTTP Request

    DELETE https://api.warren.io/v1/storage/disks/{disk_uuid}

    Path Parameters

    Parameter Type Description
    disk_uuid UUID Defines which disk to delete

    Attach Disk

    curl "https://api.warren.io/v1/user-resource/vm/storage/attach" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb" \
        -d "storage_uuid=3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    

    The above command returns JSON structured like this:

    {
        "created_at": "2022-09-08 14:20:16",
        "name": "vdb",
        "primary": false,
        "replica": [],
        "size": 15,
        "user_id": 28,
        "uuid": "3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    }
    

    #location-specific

    Attaches a disk to a virtual machine.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/storage/attach

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    storage_uuid A Universally Unique IDentifier

    Detach Disk

    curl "https://api.warren.io/v1/user-resource/vm/storage/detach" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "uuid=5052bf02-044a-4d35-a803-d6b156f84beb" \
        -d "storage_uuid=3d91aa31-16ec-44ee-b8b3-22a0bda6559e"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    #location-specific

    Detaches a disk from a virtual machine.

    HTTP Request

    POST https://api.warren.io/v1/user-resource/vm/storage/detach

    Form Parameters

    Parameter Default Type
    uuid A Universally Unique IDentifier
    storage_uuid A Universally Unique IDentifier

    Object Storage

    S3 API Info

    curl "https://api.warren.io/v1/storage/api/s3" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
      "url": "https://s3.warren.io:8080/"
    }
    

    Returns S3 API URL.

    HTTP Request

    GET https://api.warren.io/v1/storage/api/s3

    Create Bucket

    curl --location --request PUT "https://api.warren.io/v1/storage/bucket" \
        -H "apikey: meowmeowmeow" \
        -d "name=pang1" \
        -d "billing_account_id=12345"
    

    The above command returns JSON structured like this:

    {
      "name": "pang1",
      "size_bytes": 0,
      "billing_account_id": 129093,
      "num_objects": 0,
      "created_at": "2021-01-22T12:57:13.808+0000",
      "modified_at": "2021-01-22T14:57:13.694+0000",
      "is_suspended": false
    }
    

    Create an S3 object storage bucket. Bucket names must be globally unique across all users.

    HTTP Request

    PUT https://api.warren.io/v1/storage/bucket

    Form Parameters

    Parameter Type Description
    name String Bucket name, must conform to S3 bucket naming rules.
    billing_account_id Integer optional Required if using a global API token.

    Modify Bucket

    curl "https://api.warren.io/v1/storage/bucket" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -d "name=pang1" \
        -d "billing_account_id=129072"
    

    The above command returns JSON structured like this:

    {
      "name": "pang1",
      "size_bytes": 3425,
      "billing_account_id": 129072,
      "num_objects": 1,
      "created_at": "2021-01-22T12:57:13.808+0000",
      "modified_at": "2021-01-22T14:57:13.694+0000",
      "is_suspended": false
    }
    

    Modify a bucket's billing account.

    HTTP Request

    PATCH https://api.warren.io/v1/storage/bucket

    Form Parameters

    Parameter Type Description
    name String Defines which bucket to modify.
    billing_account_id Integer ID of a billing account.

    Delete Bucket

    curl "https://api.warren.io/v1/storage/bucket" \
        -H "apikey: meowmeowmeow" \
        -d "name=pang1" \
        -X DELETE
    

    The above command returns HTTP status 204 No Content

    Delete an S3 object storage bucket. Only empty buckets can be deleted via this API.

    HTTP Request

    DELETE https://api.warren.io/v1/storage/bucket

    Query Parameters

    Parameter Type Description
    name String Defines which bucket to delete.

    Get Bucket

    curl "https://api.warren.io/v1/storage/bucket?name=bucket_name" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
      "billing_account_id": 129093,
      "name": "pang1",
      "num_objects": 5,
      "size_bytes": 3189211059,
      "created_at": "2021-01-22T12:57:13.808+0000",
      "modified_at": "2021-01-22T14:57:13.694+0000",
      "is_suspended": false
    }
    

    Get bucket information.

    HTTP Request

    GET https://api.warren.io/v1/storage/bucket

    Query Parameters

    Parameter Type Description
    name String Defines which bucket to retrieve.

    List Buckets

    curl "https://api.warren.io/v1/storage/bucket/list" \
        -H "apikey: meowmeowmeow" \
        -d "billing_account_id=129072" \
        -X GET
    

    The above command returns JSON structured like this:

    [
      {
        "billing_account_id": 7,
        "name": "asi",
        "num_objects": 0,
        "size_bytes": 0,
        "created_at": "2021-01-22T13:10:09.190+0000",
        "modified_at": "2021-01-21T16:14:06.651+0000",
        "is_suspended": false
      },
      {
        "billing_account_id": 129093,
        "name": "pang1",
        "num_objects": 5,
        "size_bytes": 3189211059,
        "created_at": "2021-01-22T13:10:09.190+0000",
        "modified_at": "2021-01-21T16:14:06.651+0000",
        "is_suspended": false
      },
      {
        "billing_account_id": 7,
        "name": "pang2",
        "num_objects": 1,
        "size_bytes": 1587609600,
        "created_at": "2021-01-22T13:10:09.190+0000",
        "modified_at": "2021-01-21T16:14:06.651+0000",
        "is_suspended": false
      },
      {
        "billing_account_id": 7,
        "name": "pang3",
        "num_objects": 0,
        "size_bytes": 0,
        "created_at": "2021-01-22T13:10:09.190+0000",
        "modified_at": "2021-01-21T16:14:06.651+0000",
        "is_suspended": false
      },
      {
        "billing_account_id": 7,
        "name": "porgandid",
        "num_objects": 0,
        "size_bytes": 0,
        "created_at": "2021-01-22T13:10:09.190+0000",
        "modified_at": "2021-01-21T16:14:06.651+0000",
        "is_suspended": false
      }
    ]
    

    List user's buckets. Optionally filter the list by billing account.

    HTTP Request

    GET https://api.warren.io/v1/storage/bucket/list

    Query Parameters

    Parameter Type Description
    billing_account_id Integer optional If specified then only buckets with this billing account are returned.

    Get S3 user

    curl "https://api.warren.io/v1/storage/user" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
      "caps": [],
      "displayName": "user+test@example.com",
      "email": "",
      "maxBuckets": 1000,
      "s3Credentials": [
        {
          "accessKey": "ES1R...1N",
          "secretKey": "bwtl...LU",
          "userId": "user+test@example.com"
        },
        {
          "accessKey": "H2MZ...0A",
          "secretKey": "X8Pb...1j",
          "userId": "user+test@example.com"
        },
        {
          "accessKey": "I16N...0T",
          "secretKey": "bdwq...cn",
          "userId": "user+test@example.com"
        },
        {
          "accessKey": "V5G9...6P",
          "secretKey": "WnNy...C5",
          "userId": "user+test@example.com"
        }
      ],
      "subusers": [],
      "suspended": 0,
      "swiftCredentials": [],
      "userId": "user+test@example.com"
    }
    

    Get S3 user info, including their access and secret keys. User and keys will be generated, if they do not exist already.

    HTTP Request

    GET https://api.warren.io/v1/storage/user

    Delete key

    curl "https://api.warren.io/v1/storage/user/keys" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "access_key=I16N8YDF6A6FX8ILP30T"
    

    The above command returns JSON structured like this:

    
    

    Delete an S3 key.

    HTTP Request

    DELETE https://api.warren.io/v1/storage/user/keys

    Form Parameters

    Parameter Type Description
    access_key String Defines which key to delete.

    Get keys

    curl "https://api.warren.io/v1/storage/user/keys" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
      {
        "accessKey": "ES1R...1N",
        "secretKey": "bwtl...LU",
        "userId": "user+test@example.com"
      },
      {
        "accessKey": "H2MZ...0A",
        "secretKey": "X8Pb...1j",
        "userId": "user+test@example.com"
      },
      {
        "accessKey": "V5G9...6P",
        "secretKey": "WnNy...C5",
        "userId": "user+test@example.com"
      }
    ]
    

    Returns all user keys.

    HTTP Request

    GET https://api.warren.io/v1/storage/user/keys

    Generate key

    curl "https://api.warren.io/v1/storage/user/keys" \
        -H "apikey: meowmeowmeow" \
        -X POST
    

    The above command returns JSON structured like this:

    [
      {
        "accessKey": "44PW...BC",
        "secretKey": "etxH...O1",
        "userId": "user+test@example.com"
      },
      {
        "accessKey": "ES1R...1N",
        "secretKey": "bwtl...LU",
        "userId": "user+test@example.com"
      },
      {
        "accessKey": "H2MZ...0A",
        "secretKey": "X8Pb...1j",
        "userId": "user+test@example.com"
      },
      {
        "accessKey": "V5G9...6P",
        "secretKey": "WnNy...C5",
        "userId": "user+test@example.com"
      }
    ]
    

    Generate a new S3 key pair. Returns the list of all keys.

    HTTP Request

    POST https://api.warren.io/v1/storage/user/keys

    Private networks

    Get network data

    curl "https://api.warren.io/v1/network/network/50341410-9e88-4af2-a21e-b8c898e33e51" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json"'
    

    The above command returns JSON structured like this:

    {
        "vlan_id": 104,
        "subnet": "10.1.104.0/24",
        "subnet_ipv6": "2a05:1cc0:10:30::40:0/112",
        "name": "Default network",
        "created_at": "2021-06-29 08:22:52",
        "updated_at": "2021-06-29 08:22:52",
        "uuid": "2e8cd389-27fe-45ce-a63d-d536068659e5",
        "type": "private",
        "is_default": true,
        "vm_uuids": ["17fb7d63-7489-4468-bd98-8ca67bf5ef6d", "c3126bc4-d6f0-4c46-8bde-f310449a35e8"],
        "resources_count": 2
    }
    

    #location-specific

    Get network data

    HTTP Request

    GET https://api.warren.io/v1/network/network/{network_uuid}

    Path Parameters

    Parameter Default Type
    network_uuid UUID

    List Networks

    curl "https://api.warren.io/v1/network/networks" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "vlan_id": 965,
            "subnet": "10.4.200.0/24",
            "subnet_ipv6": "2a05:1cc0:10:30::40:0/112",
            "name": "Private network B",
            "created_at": "2021-06-10 09:57:59",
            "updated_at": "2021-06-10 09:57:59",
            "uuid": "4e5eadd3-8b11-4c34-812a-2cf97120b628",
            "type": "private",
            "is_default": false,
            "vm_uuids": [
                "755a023f-dccc-4b8b-b23d-c95fe962983e"
            ],
            "resources_count": 1
        },
        {
            "vlan_id": 104,
            "subnet": "10.1.104.0/24",
            "subnet_ipv6": "2a05:1cc0:10:30::41:0/112",
             "name": "Privat network - default",
            "created_at": "2021-06-29 08:22:52",
            "updated_at": "2021-06-29 08:22:52",
            "uuid": "2e8cd389-27fe-45ce-a63d-d536068659e5",
            "type": "private",
            "is_default": true,
            "vm_uuids": [
                "45f13d58-2464-4d40-a1d0-d1b7cabc8f54",
                "7c02ce9a-3d53-4565-898e-62a8ecf1d42f"
            ],
            "resources_count": 2
        }
    ]
    

    #location-specific

    List user networks with resources.

    HTTP Request

    GET https://api.warren.io/v1/network/networks

    Create or get default network

    curl "https://api.warren.io/v1/network/network?name=network3" \
        -H "apikey: meowmeowmeow" \
        -X POST
    

    The above command returns JSON structured like this:

    {
        "vlan_id": 104,
        "subnet": "10.1.104.0/24",
        "subnet_ipv6": "2a05:1cc0:10:30::40:0/112",
         "name": "network3",
        "created_at": "2021-06-29 08:22:52",
        "updated_at": "2021-06-29 08:22:52",
        "uuid": "2e8cd389-27fe-45ce-a63d-d536068659e5",
        "type": "private",
        "is_default": true,
        "vm_uuids": [],
        "resources_count": 0
    }
    

    #location-specific

    If the network name is not specified the default network is returned if exists. Otherwise the default network is created with name 'Default network'. If name is given the new network is created with this name. If the created network is the first network of the user it is set as default.

    HTTP Request

    POST https://api.warren.io/v1/network/network?name=MyNetwork

    Request parameters

    Parameter Required Type
    name 0 Basic text / string value

    Delete network

    curl "https://api.warren.io/v1/network/network/4e5eadd3-8b11-4c34-812a-2cf97120b628" \
        -H "apikey: meowmeowmeow" \
        -H "Content-Type: application/json" \
        -X DELETE' 
    

    The above command returns an empty response

    #location-specific

    Delete network. The network can be deleted if it does not contain any resources and it is not default.

    HTTP Request

    DELETE https://api.warren.io/v1/network/network/{network_uuid}

    Path Parameters

    Parameter Required Type
    network_uuid 1 UUID

    Change network to default

    curl "https://api.warren.io/v1/network/network/4e5eadd3-8b11-4c34-812a-2cf97120b628/default" \
        -H "apikey: meowmeowmeow" \
        -H "Content-Type: application/json" \
        -X PUT' 
    

    The above command returns JSON structured like this:

    {
        "vlan_id": 104,
        "subnet": "10.1.104.0/24",
        "subnet_ipv6": "2a05:1cc0:10:30::40:0/112",
        "name": "network3",
        "created_at": "2021-06-29 08:22:52",
        "updated_at": "2021-06-29 08:22:52",
        "uuid": "4e5eadd3-8b11-4c34-812a-2cf97120b628",
        "type": "private",
        "is_default": true,
        "vm_uuids": ["2e8cd389-27fe-45ce-a63d-d536068659e5"],
        "resources_count": 1
    }
    

    #location-specific

    Change network to default. The network is change to the default network for the future resources. The other private networks will be changed to non default.

    HTTP Request

    PUT https://api.warren.io/v1/network/network/{network_uuid}/default

    Path Parameters

    Parameter Required Type
    network_uuid 1 UUID

    Change network name

    curl "https://api.warren.io/v1/network/network/4e5eadd3-8b11-4c34-812a-2cf97120b628t" \
        -H "apikey: meowmeowmeow" \
        -H "Content-Type: application/json" \
        --data '{"name":"My new network name"}' \
        -X PATCH' 
    

    The above command returns JSON structured like this:

    {
        "vlan_id": 104,
        "subnet": "10.1.104.0/24",
        "subnet_ipv6": "2a05:1cc0:10:30::40:0/112",
        "name": "My new network name",
        "created_at": "2021-06-29 08:22:52",
        "updated_at": "2021-06-29 08:22:52",
        "uuid": "4e5eadd3-8b11-4c34-812a-2cf97120b628",
        "type": "private",
        "is_default": true,
        "vm_uuids": ["2e8cd389-27fe-45ce-a63d-d536068659e5"],
        "resources_count": 1
    }
    

    #location-specific

    Change network name.

    HTTP Request

    PATCH https://api.warren.io/v1/network/network/{network_uuid}

    Path Parameters

    Parameter Required Type
    network_uuid 1 UUID

    Request json body

    Parameter Required Type
    name 0 Basic text / string value

    Floating IP

    Create Floating IP

    curl "https://api.warren.io/v1/network/ip_addresses" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json" \
        --data '{"name": "my_ip", "billing_account_id": 2}'
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "address": "1.1.1.1",
      "user_id": 666,
      "billing_account_id": 2,
      "type": "public",
      "network_id": null,
      "name": "my_ip",
      "enabled": true,
      "created_at": "2019-10-31 10:52:19",
      "updated_at": "2019-11-01 10:22:19",
      "is_deleted": false,
      "is_virtual": false,
      "assigned_to": null
    }
    

    #location-specific

    Create new floating IP

    HTTP Request

    POST https://api.warren.io/v1/network/ip_addresses/

    Request json body

    Parameter Required Type
    billing_account_id 1 A Whole number
    name 0 Basic text / string value

    List Floating IPs

    curl "https://api.warren.io/v1/network/ip_addresses?billing_account_id=1" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "id": 1,
            "address": "1.1.1.1",
            "user_id": 666,
            "billing_account_id": 1,
            "type": "public",
            "network_id": null,
            "name": "My First Ip",
            "enabled": true,
            "created_at": "2019-10-31 10:52:19",
            "updated_at": "2019-11-01 10:22:19",
            "is_deleted": false,
            "is_virtual": false,
            "assigned_to": "88e5a11b-9c89-4986-99c7-90d43499317c",
            "assigned_to_resource_type": "virtual_machine",
            "assigned_to_private_ip": "10.1.2.3"
          },
          {
            "id": 2,
            "address": "2.2.2.2",
            "user_id": 666,
            "billing_account_id": 1,
            "type": "public",
            "network_id": null,
            "name": "dns: A test.example.com",
            "enabled": true,
            "created_at": "2019-10-31 10:52:19",
            "updated_at": "2019-11-01 10:22:19",
            "is_deleted": false,
            "is_virtual": false,
            "assigned_to": "c267e447-1ad3-43b2-ae41-ac7ad823fc6c",
            "assigned_to_resource_type": "service",
            "assigned_to_private_ip": "10.1.2.4"
        }
    ]
    

    #location-specific

    List floating IPs. Can be filtered by billing_account_id and vm_uuid, if necessary.

    HTTP Request

    GET https://api.warren.io/v1/network/ip_addresses

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number
    vm_uuid A Universally Unique IDentifier

    Get Floating IP

    curl "https://api.warren.io/v1/network/ip_addresses/1.1.1.1" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "id": 1,
        "address": "1.1.1.1",
        "user_id": 666,
        "billing_account_id": 1,
        "type": "public",
        "network_id": null,
        "name": "My First Ip",
        "enabled": true,
        "created_at": "2019-10-31 10:52:19",
        "updated_at": "2019-11-01 10:22:19",
        "is_deleted": false,
        "is_virtual": false,
        "assigned_to": "88e5a11b-9c89-4986-99c7-90d43499317c",
        "assigned_to_resource_type": "virtual_machine",
        "assigned_to_private_ip": "10.1.2.4"
      }
    

    #location-specific

    Get floating IP

    HTTP Request

    GET https://api.warren.io/v1/network/ip_addresses/{public_ipv4_address}

    Update Floating IP

    curl "https://api.warren.io/v1/network/ip_addresses/1.1.1.1" \
        -H "apikey: meowmeowmeow" \
        -H "Content-Type: application/json" \
        -X PATCH \
        --data '{"name": "my_ip", billing_account_id": 2}' 
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "address": "1.1.1.1",
      "user_id": 666,
      "billing_account_id": 2,
      "type": "public",
      "network_id": null,
      "name": "my_ip",
      "enabled": true,
      "created_at": "2019-10-31 10:52:19",
      "updated_at": "2019-11-01 10:22:19",
      "is_deleted": false,
      "is_virtual": false,
      "assigned_to": null
    }
    

    #location-specific

    Update floating IP

    HTTP Request

    PATCH https://api.warren.io/v1/network/ip_addresses/{public_ipv4_address}

    Request json body

    Parameter Required Type
    billing_account_id 0 A Whole number
    name 0 Basic text / string value

    Delete Floating IP

    curl "https://api.warren.io/v1/ip_addresses/1.1.1.1" \
        -H "apikey: meowmeowmeow" \
        -X DELETE
    

    The above command returns like this:

    <Response body is empty>
    
    Response code: 200;
    

    #location-specific

    Delete floating IP

    HTTP Request

    DELETE https://api.warren.io/v1/network/ip_addresses/{public_ipv4_address}

    Assign Floating IP

    curl "https://api.warren.io/v1/network/ip_addresses/1.1.1.1/assign" \
        -H "apikey: meowmeowmeow" \
        -H "Content-Type: application/json" \
        -X POST \
        --data '{"vm_uuid": "88e5a11b-9c89-4986-99c7-90d43499317c"}' 
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "address": "1.1.1.1",
      "user_id": 666,
      "billing_account_id": 2,
      "type": "public",
      "network_id": null,
      "name": "my_ip",
      "enabled": true,
      "created_at": "2019-10-31 10:52:19",
      "updated_at": "2019-11-01 10:22:19",
      "assigned_to": "88e5a11b-9c89-4986-99c7-90d43499317c",
      "assigned_to_resource_type": "service",
      "assigned_to_private_ip": "10.1.2.4"
    
    }
    

    #location-specific

    Assign floating IP

    HTTP Request

    POST https://api.warren.io/v1/network/ip_addresses/{public_ipv4_address}/assign

    Un-assign Floating IP

    curl "https://api.warren.io/v1/network/ip_addresses/1.1.1.1/unassign" \
        -H "apikey: meowmeowmeow" \
        -X POST 
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "address": "1.1.1.1",
      "user_id": 666,
      "billing_account_id": 2,
      "type": "public",
      "network_id": null,
      "name": "my_ip",
      "enabled": true,
      "created_at": "2019-10-31 10:52:19",
      "updated_at": "2019-11-01 10:22:19",
      "is_deleted": false,
      "is_virtual": false,
      "unassigned_at": "2021-12-06 13:03:33",
      "uuid": "e44f151c-3916-4bd8-ab6e-592ca982dc63",
      "assigned_to": null
    }
    

    #location-specific

    Un-assign floating IP

    HTTP Request

    POST https://api.warren.io/v1/network/ip_addresses/{public_ipv4_address}/unassign

    Network Load Balancer

    List user load balancers

    curl "https://api.warren.io/v1/network/load_balancers?all=false" \
        -H "apikey: meowmeowmeow" \
        -X GET 
    

    The above command returns JSON structured like this:

    [
      {
        "uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
        "network_uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
        "user_id": 268,
        "billing_account_id": 130157,
        "created_at": "2022-07-12 14:21:06",
        "updated_at": "2022-07-12 14:21:06",
        "is_deleted": false,
        "private_address": "10.112.231.192",
        "forwarding_rules": [
          {
            "uuid": "b3f28feb-c91e-4601-a6b6-267fa98dc121"
            "protocol": "TCP",
            "created_at": "2022-07-12 14:21:06",
            "source_port": 8080,
            "target_port": 8080,
            "settings": {
              "connection_limit": 10000,
              "session_persistence": "SOURCE_IP"
            }
          }
        ],
        "targets": [
          {
            "created_at": "2022-07-12 14:21:06",
            "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
            "target_type": "vm",
            "target_ip_address": "10.61.10.2"
          }
        ]
      }
    ]
    

    #location-specific

    Get list of load balancers owned by user.

    HTTP Request

    GET https://api.warren.io/v1/network/load_balancers

    Query Parameters

    Parameter Default Type
    all false Boolean

    Create load balancer

    curl "https://api.warren.io/v1/network/load_balancers?all=false" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json" \
        --data 
        '{
        "display_name": "my LB"
        "billing_account_id": 130157,
        "network_uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
        "reserve_public_ip" : "true",
        "rules": [
            {
                "source_port": 8080,
                "target_port": 80
            }
        ],
        "targets": [
            {
                "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
                "target_type": "vm"
            },
            {
                "target_uuid": "e9717243-59df-4847-bd50-dca5b090432b",
                "target_type": "vm"
            }
        ]
    }'
    

    The above command returns JSON structured like this:

      {
      "uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "display_name": "my LB",
      "network_uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "user_id": 268,
      "billing_account_id": 130157,
      "created_at": "2022-07-12 14:21:06",
      "updated_at": "2022-07-12 14:21:06",
      "is_deleted": false,
      "private_address": "10.112.231.192",
      "forwarding_rules": [
        {
          "uuid": "b3f28feb-c91e-4601-a6b6-267fa98dc121"
          "protocol": "TCP",
          "created_at": "2022-07-12 14:21:06",
          "source_port": 8080,
          "target_port": 8080,
          "settings": {
            "connection_limit": 10000,
            "session_persistence": "SOURCE_IP"
          }
        }
      ],
      "targets": [
        {
          "created_at": "2022-07-12 14:21:06",
          "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
          "target_type": "vm",
          "target_ip_address": "10.61.10.2"
        }
      ]
    }
    

    #location-specific

    Create new load balancer

    HTTP Request

    POST https://api.warren.io/v1/network/load_balancers

    Request json body

    Parameter Required Type
    display_name 0 Basic text / string value
    billing_account_id 0 A Whole number
    network_uuid 0 Basic text / string value
    reserve_public_ip 0 Boolean
    rules 0 JSON
    targets 0 JSON

    Rename load balancer

    curl "https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43" \
        -H "apikey: meowmeowmeow" \
        -X PATCH \
        -H "Content-Type: application/json" \
        --data 
        '{
            "display_name": "my new LB Name"
        }'
    

    The above command returns JSON structured like this:

      {
      "uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "display_name": "my new LB Name",
      "network_uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "user_id": 268,
      "billing_account_id": 130157,
      "created_at": "2022-07-12 14:21:06",
      "updated_at": "2022-07-12 14:21:06",
      "is_deleted": false,
      "private_address": "10.112.231.192",
      "forwarding_rules": [
        {
          "uuid": "b3f28feb-c91e-4601-a6b6-267fa98dc121"
          "protocol": "TCP",
          "created_at": "2022-07-12 14:21:06",
          "source_port": 8080,
          "target_port": 8080,
          "settings": {
            "connection_limit": 10000,
            "session_persistence": "SOURCE_IP"
          }
        }
      ],
      "targets": [
        {
          "created_at": "2022-07-12 14:21:06",
          "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
          "target_type": "vm",
          "target_ip_address": "10.61.10.2"
        }
      ]
    }
    

    #location-specific

    Rename load balancer

    HTTP Request

    PATCH https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43

    Request json body

    Parameter Required Type
    display_name 1 Basic text / string value

    Delete load balancer

    curl "https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    <Response body is empty>
    
    Response code: 200;
    

    #location-specific

    Delete load balancer

    HTTP Request

    DELETE https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43

    Add load balancer target

    curl "https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/targets" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json" \
        --data 
        '{
          "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
          "target_type": "vm",
        }'
    
    

    The above command returns JSON structured like this:

        {
          "created_at": "2022-07-12 14:21:06",
          "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
          "target_type": "vm",
          "target_ip_address": "10.61.10.2"
        }
    

    #location-specific

    Add new target to load balancer

    HTTP Request

    POST https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/targets

    Request json body

    Parameter Required Type
    target_uuid 1 Basic text / string value
    target_type 1 Basic text / string value
    curl "https://api.warren.io/v1/network/load_balancers/<LB_UUID>/targets/<TARGET_UUID>" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    <Response body is empty>
    
    Response code: 200;
    

    #location-specific

    Unlink target from load balancer

    HTTP Request

    DELETE https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/targets/145cc106-e067-419a-85fd-333ded30f169

    Add load balancer forwarding rule

    curl "https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/forwarding_rules" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json" \
        --data 
        '{
          "source_port": 8080,
          "target_port": 80,
        }'
    
    

    The above command returns JSON structured like this:

    {
        "source_port": 8080,
        "target_port": 80
    }
    

    #location-specific

    Add new port forwarding rule to load balancer

    HTTP Request

    POST https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/forwarding_rules

    Request json body

    Parameter Required Type
    source_port 1 Basic text / string value
    target_port 1 Basic text / string value

    Drop load balancer rule

    curl "https://api.warren.io/v1/network/load_balancers/<LB_UUID>/forwarding_rules/<RULE_UUID>" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -H "Content-Type: application/json"
    

    The above command returns JSON structured like this:

    <Response body is empty>
    
    Response code: 200;
    

    #location-specific

    Drop port rule from load balancer

    HTTP Request

    DELETE https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/forwarding_rules/145cc106-e067-419a-85fd-333ded30f169

    Change billing account on load balancer

    curl "https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/billing_account" \
        -H "apikey: meowmeowmeow" \
        -X PUT \
        -H "Content-Type: application/json" \
        --data 
        '{
            "set_id": 123456
        }'
    

    The above command returns JSON structured like this:

      {
      "uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "display_name": "my new LB Name",
      "network_uuid": "438ac62f-e97b-4ef0-8940-507b9e94af43",
      "user_id": 268,
      "billing_account_id": 123456,
      "created_at": "2022-07-12 14:21:06",
      "updated_at": "2022-07-12 14:21:06",
      "is_deleted": false,
      "private_address": "10.112.231.192",
      "forwarding_rules": [
        {
          "uuid": "b3f28feb-c91e-4601-a6b6-267fa98dc121"
          "protocol": "TCP",
          "created_at": "2022-07-12 14:21:06",
          "source_port": 8080,
          "target_port": 8080,
          "settings": {
            "connection_limit": 10000,
            "session_persistence": "SOURCE_IP"
          }
        }
      ],
      "targets": [
        {
          "created_at": "2022-07-12 14:21:06",
          "target_uuid": "145cc106-e067-419a-85fd-333ded30f169",
          "target_type": "vm",
          "target_ip_address": "10.61.10.2"
        }
      ]
    }
    

    #location-specific

    Change Billing Account that load balancer is assigned to.

    HTTP Request

    PUT https://api.warren.io/v1/network/load_balancers/438ac62f-e97b-4ef0-8940-507b9e94af43/billing_account

    Request json body

    Parameter Required Type
    set_id 1 A Whole number

    Path parameters

    Parameter Required Type
    lb_uuid 1 Basic text / string

    Parameters

    VM parameters

    curl "https://api.warren.io/v1/api/parameters/vm" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "constraint": "range",
            "description": "Size of main storage in gigabytes.",
            "mandatory": true,
            "max": 240,
            "min": 20,
            "parameter": "disks",
            "type": "integer"
        },
        {
            "constraint": "regexp",
            "description": "Name of the VM",
            "expression": "^[0-9a-zA-Z][-0-9a-zA-Z]{2,}[0-9a-zA-Z]$",
            "mandatory": true,
            "parameter": "name",
            "type": "string"
        },
        {
            "constraint": "enum",
            "description": "OS name of VM base image.",
            "mandatory": true,
            "parameter": "os_name",
            "type": "string",
            "values": [
                "centos",
                "ubuntu",
                "windows",
                "debian"
            ]
        },
        {
            "constraint": "enum",
            "description": "OS version of VM base image.",
            "limited_by": "os_name",
            "limits": [
                {
                    "os_name": "centos",
                    "values": [
                        "7.3.1611",
                        "6.9.1611"
                    ]
                },
                {
                    "os_name": "ubuntu",
                    "values": [
                        "16.04"
                    ]
                },
                {
                    "os_name": "windows",
                    "values": [
                        "2016"
                    ]
                },
                {
                    "os_name": "debian",
                    "values": [
                        "9.1"
                    ]
                }
            ],
            "mandatory": true,
            "parameter": "os_version",
            "type": "string"
        },
        {
            "constraint": "regexp",
            "description": "Password for logging in to the VM.",
            "expression": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}$",
            "mandatory": true,
            "parameter": "password",
            "type": "string"
        },
        {
            "constraint": "range",
            "description": "Amount of RAM.",
            "limited_by": "os_name",
            "limits": [
                {
                    "min": 1024,
                    "os_name": "windows"
                }
            ],
            "mandatory": true,
            "max": 65536,
            "min": 512,
            "parameter": "ram",
            "type": "integer"
        },
        {
            "constraint": "regexp",
            "description": "Username for logging in to the VM.",
            "expression": "^(?=.{1,30}$)[a-zA-Z_][0-9a-zA-Z_-]*$",
            "limited_by": "os_name",
            "limits": [
                {
                    "mandatory": false,
                    "os_name": "windows"
                }
            ],
            "mandatory": true,
            "parameter": "username",
            "type": "string"
        },
        {
            "constraint": "range",
            "description": "Number of CPUs.",
            "limited_by": "os_name",
            "limits": [
                {
                    "min": 2,
                    "os_name": "windows"
                }
            ],
            "mandatory": true,
            "max": 16,
            "min": 1,
            "parameter": "vcpu",
            "type": "integer"
        }
    ]
    

    Describes VM creation parameters and their expected and allowed values.

    HTTP Request

    GET https://api.warren.io/v1/api/parameters/vm

    VM images list

    curl "https://api.warren.io/v1/config/vm_images" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
      {
        "os_name": "almalinux",
        "display_name": "Almalinux",
        "ui_position": 1,
        "is_default": true,
        "is_app_catalog": false,
        "icon": "...",
        "versions": [
          {
            "os_version": "8",
            "display_name": "8",
            "published": true
          }
        ]
      },
      {
        "os_name": "centos",
        "display_name": "Centos",
        "ui_position": 2,
        "is_default": false,
        "is_app_catalog": true,
        "icon": "....",
        "versions": [
          {
            "os_version": "7.3.1611",
            "display_name": "7.3.1611",
            "published": true
          },
          {
            "os_version": "7.6",
            "display_name": "7.6",
            "published": true
          },
          {
            "os_version": "8.2",
            "display_name": "8.2",
            "published": true
          }
        ]
      }
    ]
    

    Returns list of VM images and corresponding versions for the platform Compute section.

    HTTP GET Request

    GET https://api.warren.io/v1/config/vm_images

    Get Plain OS images

    curl "https://api.warren.io/v1/config/vm_images/plain_os" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
      {
        "os_name": "almalinux",
        "display_name": "Almalinux",
        "ui_position": 1,
        "is_default": true,
        "is_app_catalog": false,
        "icon": "...",
        "versions": [
          {
            "os_version": "8",
            "display_name": "8",
            "published": true
          }
        ]
      }
    ]
    

    Returns list of plain Virtual Machines images and corresponding versions for the platform Compute section.

    HTTP GET Request

    GET https://api.warren.io/v1/config/vm_images/plain_os

    Get App Catalog images

    curl "https://api.warren.io/v1/config/vm_images/app_catalog" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
      {
        "os_name": "centos",
        "display_name": "Centos",
        "ui_position": 2,
        "is_default": false,
        "is_app_catalog": true,
        "icon": "....",
        "versions": [
          {
            "os_version": "7.3.1611",
            "display_name": "7.3.1611",
            "published": true
          },
          {
            "os_version": "7.6",
            "display_name": "7.6",
            "published": true
          },
          {
            "os_version": "8.2",
            "display_name": "8.2",
            "published": true
          }
        ]
      }
    ]
    

    Returns list of App Catalog images and corresponding versions for the platform Compute section.

    HTTP GET Request

    GET https://api.warren.io/v1/config/vm_images/app_catalog

    Billing

    List Billing Account's Resources

    curl "https://api.warren.io/v1/user-resource/billing_resources?id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 09:50:26",
            "description": "",
            "hostname": "hostname",
            "hypervisor_id": null,
            "id": 6,
            "mac": "52:54:00:d4:ba:a3",
            "memory": 2048,
            "name": "DEBUGXYZ-2-buntu",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "",
            "public_ipv4": "80.64.107.54",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 09:50:37.638670",
                    "id": 4,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "public_ipv4": null,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "e624e5cb-e0f9-4b59-8686-0a4c829027c6"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 09:50:37",
            "user_id": 8,
            "username": "example",
            "uuid": "e624e5cb-e0f9-4b59-8686-0a4c829027c6",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 11:29:30",
            "description": "",
            "hostname": "hostname",
            "hypervisor_id": null,
            "id": 8,
            "mac": "52:54:00:20:e4:ac",
            "memory": 2048,
            "name": "Ubuntu-3-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "",
            "public_ipv4": "80.64.107.52",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 11:29:41.098793",
                    "id": 6,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "public_ipv4": null,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "dab38e6e-b5bf-41c5-9baa-be1f2ec47931"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 11:29:41",
            "user_id": 8,
            "username": "example",
            "uuid": "dab38e6e-b5bf-41c5-9baa-be1f2ec47931",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 14:24:03",
            "description": "",
            "hostname": "hostname",
            "hypervisor_id": null,
            "id": 10,
            "mac": "52:54:00:a2:52:6a",
            "memory": 2048,
            "name": "Ubuntu-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "",
            "public_ipv4": "80.64.107.50",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 14:24:13.766985",
                    "id": 8,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "public_ipv4": null,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "fc880f74-cf03-4a7a-93da-74c506157023"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 14:24:13",
            "user_id": 8,
            "username": "example",
            "uuid": "fc880f74-cf03-4a7a-93da-74c506157023",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 11:10:17",
            "description": "",
            "hostname": "hostname",
            "hypervisor_id": null,
            "id": 7,
            "mac": "52:54:00:6c:6a:ac",
            "memory": 2048,
            "name": "Ubuntu-16-04",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "",
            "public_ipv4": null,
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 11:10:37.793878",
                    "id": 5,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "public_ipv4": null,
                    "replica": [
                        {
                            "created_at": "2018-02-22 14:24:51.886326",
                            "id": 5,
                            "master_id": 5,
                            "master_uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
                            "pool": "",
                            "size": 60,
                            "type": "snapshot",
                            "updated_at": null,
                            "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a2018-02-22-14-24-32"
                        }
                    ],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a"
                }
            ],
            "tags": null,
            "updated_at": "2018-02-22 14:24:14",
            "user_id": 8,
            "username": "example",
            "uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
            "vcpu": 2
        },
        {
            "backup": false,
            "billing_account": 6,
            "created_at": "2018-02-22 14:24:30",
            "description": "",
            "hostname": "hostname",
            "hypervisor_id": null,
            "id": 11,
            "mac": "52:54:00:59:44:d1",
            "memory": 2048,
            "name": "Name of the Clone",
            "os_name": "ubuntu",
            "os_version": "16.04",
            "private_ipv4": "",
            "public_ipv4": "80.64.107.49",
            "status": "running",
            "storage": [
                {
                    "created_at": "2018-02-22 14:24:30.312877",
                    "id": 9,
                    "name": "sda",
                    "pool": "default2",
                    "primary": true,
                    "public_ipv4": null,
                    "replica": [],
                    "shared": false,
                    "size": 20,
                    "type": "block",
                    "updated_at": null,
                    "user_id": 8,
                    "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43"
                }
            ],
            "tags": null,
            "updated_at": null,
            "user_id": 8,
            "username": "example",
            "uuid": "d582f16a-013b-4a23-8463-c66bbbc96c43",
            "vcpu": 2
        }
    ]
    

    #location-specific

    Get all resources actively associated with billing account

    HTTP Request

    GET https://api.warren.io/v1/user-resource/billing_resources

    Query Parameters

    Parameter Default Type
    id A Whole number
    resource_type vm Basic text / string value

    Set Resource Billing Conf

    curl "https://api.warren.io/v1/user-resource/resource_billing" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=0" \
        -d "uuid=aaaaaaaa-0000-bbbb-1111-cccccccccccc"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "No such virtual machine exists. aaaaaaaa-0000-bbbb-1111-cccccccccccc"
        }
    }
    

    #location-specific

    Associate resource with billing account

    HTTP Request

    POST https://api.warren.io/v1/user-resource/resource_billing

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number
    resource_type vm Basic text / string value
    uuid A Universally Unique IDentifier

    Payment

    Delete billing account

    curl "https://api.warren.io/v1/payment/billing_account" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "billing_account_id=0"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "Error": "Provided billing account is incorrect."
        }
    }
    

    Delete a billing account.

    HTTP Request

    DELETE https://api.warren.io/v1/payment/billing_account

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Billing account details

    curl "https://api.warren.io/v1/payment/billing_account?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "additional_data": "{\"link_methods\": [\"duitku::FT\", \"duitku::M1\"]}",
        "address_line1": "Puiestee",
        "allow_debt": false,
        "can_pay": true,
        "city": "K\u00fcla",
        "company_name": "Firma",
        "company_reg_code": "232",
        "company_vat_number": "235235",
        "country": "EE",
        "county": "Moldaavia",
        "created": 1519219377,
        "credit_amount": 2.0,
        "discount_percentage": 0,
        "email": "user@example.com",
        "id": 6,
        "is_active": true,
        "is_default": false,
        "is_deleted": false,
        "is_recurring_payment_enabled": false,
        "paying_by_invoice": false,
        "post_index": "314243123",
        "primary_card": {
            "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
            "expire_month": 12,
            "expire_year": 2034,
            "last4": "1111",
            "card_type": "visa",
            "card_holder": "user",
            "type": "creditcard",
            "processor_data": {
                "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                "object": "payment_method",
                "billing_details": {
                    "address": {
                        "city": null,
                        "country": null,
                        "line1": null,
                        "line2": null,
                        "postal_code": null,
                        "state": null
                    },
                    "email": null,
                    "name": "user",
                    "phone": null
                },
                "card": {
                    "brand": "visa",
                    "checks": {
                        "address_line1_check": null,
                        "address_postal_code_check": null,
                        "cvc_check": "pass"
                    },
                    "country": "US",
                    "exp_month": 12,
                    "exp_year": 2034,
                    "fingerprint": "10npANzhhIy41fnM",
                    "funding": "unknown",
                    "generated_from": null,
                    "last4": "1111",
                    "three_d_secure_usage": {
                        "supported": true
                    },
                    "wallet": null
                },
                "created": 1573631069,
                "customer": "cus_G4iqivJ6hBw24n",
                "livemode": false,
                "metadata": {
                },
                "type": "card"
            },
            "is_verified": true
        },
        "recurring_payment_amount": 52,
        "recurring_payment_threshold": 55,
        "referral_share_code": "yfsx0q",
        "reseller": "Warren",
        "restriction_level": "FROZEN",
        "running_totals": {
            "credit_amount": 0,
            "credit_available": 2.0,
            "discount_amount": 0,
            "ongoing": 0,
            "subtotal": 0,
            "total": 0,
            "vat_tax": 0
        },
        "send_invoice_email": true,
        "site": "warren",
        "suspend_reason": "",
        "title": "konto",
        "unpaid_amount": 0,
        "user_id": 8,
        "vat_percentage": 20
    }
    

    Get billing account's detailed data.

    HTTP Request

    GET https://api.warren.io/v1/payment/billing_account

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Update billing account

    curl "https://api.warren.io/v1/payment/billing_account" \
        -H "apikey: meowmeowmeow" \
        -X PUT \
        -d "billing_account_id=0"
    

    The above command returns JSON structured like this:

    {
        "additional_data": "{\"link_methods\": [\"duitku::FT\", \"duitku::M1\"]}",
        "address_line1": "Puiestee",
        "allow_debt": false,
        "can_pay": true,
        "city": "K\u00fcla",
        "company_name": "Firma",
        "company_reg_code": "232",
        "company_vat_number": "235235",
        "country": "EE",
        "county": "Moldaavia",
        "created": 1519219377,
        "credit_amount": 2.0,
        "discount_percentage": 0,
        "email": "user@example.com",
        "id": 6,
        "is_active": true,
        "is_default": false,
        "is_deleted": false,
        "is_recurring_payment_enabled": false,
        "paying_by_invoice": false,
        "post_index": "314243123",
        "primary_card": {
            "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
            "expire_month": 12,
            "expire_year": 2034,
            "last4": "1111",
            "card_type": "visa",
            "card_holder": "user",
            "type": "creditcard",
            "processor_data": {
                "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                "object": "payment_method",
                "billing_details": {
                    "address": {
                        "city": null,
                        "country": null,
                        "line1": null,
                        "line2": null,
                        "postal_code": null,
                        "state": null
                    },
                    "email": null,
                    "name": "user",
                    "phone": null
                },
                "card": {
                    "brand": "visa",
                    "checks": {
                        "address_line1_check": null,
                        "address_postal_code_check": null,
                        "cvc_check": "pass"
                    },
                    "country": "US",
                    "exp_month": 12,
                    "exp_year": 2034,
                    "fingerprint": "10npANzhhIy41fnM",
                    "funding": "unknown",
                    "generated_from": null,
                    "last4": "1111",
                    "three_d_secure_usage": {
                        "supported": true
                    },
                    "wallet": null
                },
                "created": 1573631069,
                "customer": "cus_G4iqivJ6hBw24n",
                "livemode": false,
                "metadata": {
                },
                "type": "card"
            },
            "is_verified": true
        },
        "recurring_payment_amount": 52,
        "recurring_payment_threshold": 55,
        "referral_share_code": "yfsx0q",
        "reseller": "Warren",
        "restriction_level": "FROZEN",
        "running_totals": {
            "credit_amount": 0,
            "credit_available": 2.0,
            "discount_amount": 0,
            "ongoing": 0,
            "subtotal": 0,
            "total": 0,
            "vat_tax": 0
        },
        "send_invoice_email": true,
        "site": "warren",
        "suspend_reason": "",
        "title": "konto",
        "unpaid_amount": 0,
        "user_id": 8,
        "vat_percentage": 20
    }
    

    Update billing account's data. All existing data fields that billing account already has, must be passed along also. Otherwise this data will be deleted (PS! e-mail field can't be deleted). Exception is recurring payment conf, this is handled by another endpoint.

    HTTP Request

    PUT https://api.warren.io/v1/payment/billing_account

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Configure recurring payment

    curl "https://api.warren.io/v1/payment/billing_account/6/recurring_payment" \
        -H "apikey: meowmeowmeow" \
        -X PUT \
        -d "is_recurring_payment_enabled=True" \
        -d "recurring_payment_amount=52" \
        -d "recurring_payment_threshold=55"
    

    The above command returns JSON structured like this:

    {
        "payment_report": {
            "triggered": true,
            "errors": []
        },
        "account": {
            "additional_data": "{\"link_methods\": [\"duitku::FT\", \"duitku::M1\"]}",
            "address_line1": "Puiestee",
            "allow_debt": false,
            "can_pay": true,
            "city": "K\u00fcla",
            "company_name": "Firma",
            "company_reg_code": "232",
            "company_vat_number": "235235",
            "country": "EE",
            "county": "Moldaavia",
            "created": 1519219377,
            "credit_amount": 2.0,
            "discount_percentage": 0,
            "email": "user@example.com",
            "id": 6,
            "is_active": true,
            "is_default": false,
            "is_deleted": false,
            "is_recurring_payment_enabled": false,
            "paying_by_invoice": false,
            "post_index": "314243123",
            "primary_card": {
                "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                "expire_month": 12,
                "expire_year": 2034,
                "last4": "1111",
                "card_type": "visa",
                "card_holder": "user",
                "type": "creditcard",
                "processor_data": {
                    "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                    "object": "payment_method",
                    "billing_details": {
                        "address": {
                            "city": null,
                            "country": null,
                            "line1": null,
                            "line2": null,
                            "postal_code": null,
                            "state": null
                        },
                        "email": null,
                        "name": "user",
                        "phone": null
                    },
                    "card": {
                        "brand": "visa",
                        "checks": {
                            "address_line1_check": null,
                            "address_postal_code_check": null,
                            "cvc_check": "pass"
                        },
                        "country": "US",
                        "exp_month": 12,
                        "exp_year": 2034,
                        "fingerprint": "10npANzhhIy41fnM",
                        "funding": "unknown",
                        "generated_from": null,
                        "last4": "1111",
                        "three_d_secure_usage": {
                            "supported": true
                        },
                        "wallet": null
                    },
                    "created": 1573631069,
                    "customer": "cus_G4iqivJ6hBw24n",
                    "livemode": false,
                    "metadata": {
                    },
                    "type": "card"
                },
                "is_verified": true
            },
            "recurring_payment_amount": 52,
            "recurring_payment_threshold": 55,
            "referral_share_code": "yfsx0q",
            "reseller": "Warren",
            "restriction_level": "FROZEN",
            "running_totals": {
                "credit_amount": 0,
                "credit_available": 2.0,
                "discount_amount": 0,
                "ongoing": 0,
                "subtotal": 0,
                "total": 0,
                "vat_tax": 0
            },
            "send_invoice_email": true,
            "site": "warren",
            "suspend_reason": "",
            "title": "konto",
            "unpaid_amount": 0,
            "user_id": 8,
            "vat_percentage": 20
        }
    }
    

    Configuring recurring payment for a billing account. Account needs to have a payment method that is capable of automated payments (e.g. credit card). When billing account running_totals.ongoing value goes below recurring_payment_threshold then an automatic top up for recurring_payment_amount is made with billing account's default payment method. It might happen that after configuration change ongoing is already below threshold, in that case payment is done immediately. In this case payment_report.triggered=true in the response.

    HTTP Request

    PUT https://api.warren.io/v1/payment/billing_account/{billing_account_id}/recurring_payment

    Form Parameters

    Parameter Default Type
    is_recurring_payment_enabled Boolean
    recurring_payment_amount Number
    recurring_payment_threshold Number

    List billing accounts

    curl "https://api.warren.io/v1/payment/billing_account/list" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "additional_data": "{\"link_methods\": [\"duitku::FT\", \"duitku::M1\"]}",
            "address_line1": "Puiestee",
            "allow_debt": false,
            "can_pay": true,
            "city": "K\u00fcla",
            "company_name": "Firma",
            "company_reg_code": "232",
            "company_vat_number": "235235",
            "country": "EE",
            "county": "Moldaavia",
            "created": 1519219377,
            "credit_amount": 2.0,
            "discount_percentage": 0,
            "email": "user@example.com",
            "id": 6,
            "is_active": true,
            "is_default": false,
            "is_deleted": false,
            "is_recurring_payment_enabled": false,
            "paying_by_invoice": false,
            "post_index": "314243123",
            "primary_card": {
                "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                "expire_month": 12,
                "expire_year": 2034,
                "last4": "1111",
                "card_type": "visa",
                "card_holder": "user",
                "type": "creditcard",
                "processor_data": {
                    "id": "pm_1FeGWfE0TT1OxJzqBulNx0KD",
                    "object": "payment_method",
                    "billing_details": {
                        "address": {
                            "city": null,
                            "country": null,
                            "line1": null,
                            "line2": null,
                            "postal_code": null,
                            "state": null
                        },
                        "email": null,
                        "name": "user",
                        "phone": null
                    },
                    "card": {
                        "brand": "visa",
                        "checks": {
                            "address_line1_check": null,
                            "address_postal_code_check": null,
                            "cvc_check": "pass"
                        },
                        "country": "US",
                        "exp_month": 12,
                        "exp_year": 2034,
                        "fingerprint": "10npANzhhIy41fnM",
                        "funding": "unknown",
                        "generated_from": null,
                        "last4": "1111",
                        "three_d_secure_usage": {
                            "supported": true
                        },
                        "wallet": null
                    },
                    "created": 1573631069,
                    "customer": "cus_G4iqivJ6hBw24n",
                    "livemode": false,
                    "metadata": {
                    },
                    "type": "card"
                },
                "is_verified": true
            },
            "recurring_payment_amount": 52,
            "recurring_payment_threshold": 55,
            "referral_share_code": "yfsx0q",
            "reseller": "Warren",
            "restriction_level": "FROZEN",
            "running_totals": {
                "credit_amount": 0,
                "credit_available": 2.0,
                "discount_amount": 0,
                "ongoing": 0,
                "subtotal": 0,
                "total": 0,
                "vat_tax": 0
            },
            "send_invoice_email": true,
            "site": "warren",
            "suspend_reason": "",
            "title": "konto",
            "unpaid_amount": 0,
            "user_id": 8,
            "vat_percentage": 20
        }
    ]
    

    List billing accounts attached to user. Additionally 'show_shadow' attribute may be added (any value) to get also deleted accounts

    HTTP Request

    GET https://api.warren.io/v1/payment/billing_account/list

    Set default billing account

    curl "https://api.warren.io/v1/payment/billing_account/set_default" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=129072"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Set billing account as default account.

    HTTP Request

    POST https://api.warren.io/v1/payment/billing_account/set_default

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Get unpaid amount

    curl "https://api.warren.io/v1/payment/billing_account/unpaid_amount?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "message": 59.96
    }
    

    Get billing account's unpaid total amount (with VAT included). This is unpaid amount of all invoices who's status is not 'paid'.

    HTTP Request

    GET https://api.warren.io/v1/payment/billing_account/unpaid_amount

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Apply for invoice paying

    curl "https://api.warren.io/v1/payment/apply_for_invoice_payment" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=6"
    

    The above command returns newly created payment object data in JSON structured like this:

    {
        "is_verified": False,
        "billing_account_id": 6,
        "identifier": "N/A",
        "additional_data": "{'type': 'paying_by_invoice', 'client': {}, 'card_type': 'By invoice', 'card_holder': 'user@example.com', 'expire_month': '12', 'id': 'N/A', 'expire_year': '2099'}",
        "billing_account_processor_identifier_id": 1,
        "is_primary": True,
        "valid_thru": 4102358400,
        "id": 1,
        "created": 1578582147,
        "is_deleted": False
    }
    

    Apply for 'paying by invoice' payment method. Billing account will then have a new payment object that uses 'invoice' payment method. Method will be in unverified state until admin verifies it.

    HTTP Request

    POST https://api.warren.io/v1/payment/apply_for_invoice_payment

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Remove credit card

    curl "https://api.warren.io/v1/payment/card" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -d "payment_object_id=0"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Remove credit card.

    HTTP Request

    DELETE https://api.warren.io/v1/payment/card

    Form Parameters

    Parameter Default Type
    payment_object_id A Whole number

    Credit card details

    curl "https://api.warren.io/v1/payment/card?payment_object_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "additional_data": "{\"id\": \"pay_e566cf1e776c91857c5d55c0\", \"type\": \"creditcard\", \"client\": {\"id\": \"client_57b586239757f585c569\", \"email\": \"user@example.com\", \"description\": null, \"app_id\": null, \"updated_at\": 1507032614, \"created_at\": 1507032614, \"payment\": [\"pay_d2338c36103cd678b657c852\", \"pay_876184a6380bdb25b2a617c2\", \"pay_92572e33a6cf41be8a0ba811\", \"pay_ff5129221ed980d5ced974c3\", \"pay_f0da159c756fcdb8d2f8fa77\", \"pay_80f3731cff7b0157185a314a\", \"pay_948ede1174fa52d79e72b7a9\", \"pay_8c3735b74d9649d2f742e77a\", \"pay_44a5f1d83299ef5488e83b88\", \"pay_77c695e0c85c1a87046cf90d\", \"pay_e0e496b06f7c706ce9f2c21f\", \"pay_bd68fca53a2b7ce493e77f7b\", \"pay_2ecd6ea760e6d0b4b6604d5c\", \"pay_693029dd67472dec44d08320\", \"pay_bcd100532afcac9207c327c3\", \"pay_ea5613ace7154061d95ba76f\", \"pay_d72aa93d0143f1b8d7ffa119\", \"pay_caec3bf657e124e01de21411\", \"pay_ac3756da59891e9986371ae5\", \"pay_6838cf521becb9c290a22264\", \"pay_5344aeabbf04ef507df2d545\", \"pay_1ef76358a95d797cf6741438\", \"pay_7662a834fa17f3dbc7ecced3\", \"pay_e566cf1e776c91857c5d55c0\"], \"subscription\": null}, \"card_type\": \"visa\", \"country\": \"DE\", \"expire_month\": \"12\", \"expire_year\": \"2029\", \"card_holder\": \"Inimene\", \"last4\": \"1111\", \"updated_at\": 1519219380, \"created_at\": 1519219378, \"app_id\": null, \"is_recurring\": true, \"is_usable_for_preauthorization\": true, \"code\": null, \"account\": null, \"holder\": null}",
        "billing_account_id": 6,
        "billing_account_processor_identifier_id": 6,
        "created": 1519219380,
        "id": 6,
        "identifier": "pay_e566cf1e776c91857c5d55c0",
        "is_primary": true,
        "is_verified": true,
        "valid_thru": 1893369600
    }
    

    Get payment method details.

    HTTP Request

    GET https://api.warren.io/v1/payment/card

    Query Parameters

    Parameter Default Type
    payment_object_id A Whole number

    Add credit card

    curl "https://api.warren.io/v1/payment/card" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=0" \
        -d "token=val"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "consumer::resource_forbidden": {
                "msg": "Consumer not allowed to access resource.",
                "subtype": "resource_forbidden",
                "type": "consumer"
            }
        }
    }
    

    Add new credit card. Possible to add primary and secodary (failover) card.

    Steps involved when add a new card: - attach payment object to the billing account (credit card) - check payment object validity

    HTTP Request

    POST https://api.warren.io/v1/payment/card

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number
    token Basic text / string value

    List credit cards

    curl "https://api.warren.io/v1/payment/card/list?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "additional_data": "{\"id\": \"pay_e566cf1e776c91857c5d55c0\", \"type\": \"creditcard\", \"client\": {\"id\": \"client_57b586239757f585c569\", \"email\": \"user@example.com\", \"description\": null, \"app_id\": null, \"updated_at\": 1507032614, \"created_at\": 1507032614, \"payment\": [\"pay_d2338c36103cd678b657c852\", \"pay_876184a6380bdb25b2a617c2\", \"pay_92572e33a6cf41be8a0ba811\", \"pay_ff5129221ed980d5ced974c3\", \"pay_f0da159c756fcdb8d2f8fa77\", \"pay_80f3731cff7b0157185a314a\", \"pay_948ede1174fa52d79e72b7a9\", \"pay_8c3735b74d9649d2f742e77a\", \"pay_44a5f1d83299ef5488e83b88\", \"pay_77c695e0c85c1a87046cf90d\", \"pay_e0e496b06f7c706ce9f2c21f\", \"pay_bd68fca53a2b7ce493e77f7b\", \"pay_2ecd6ea760e6d0b4b6604d5c\", \"pay_693029dd67472dec44d08320\", \"pay_bcd100532afcac9207c327c3\", \"pay_ea5613ace7154061d95ba76f\", \"pay_d72aa93d0143f1b8d7ffa119\", \"pay_caec3bf657e124e01de21411\", \"pay_ac3756da59891e9986371ae5\", \"pay_6838cf521becb9c290a22264\", \"pay_5344aeabbf04ef507df2d545\", \"pay_1ef76358a95d797cf6741438\", \"pay_7662a834fa17f3dbc7ecced3\", \"pay_e566cf1e776c91857c5d55c0\"], \"subscription\": null}, \"card_type\": \"visa\", \"country\": \"DE\", \"expire_month\": \"12\", \"expire_year\": \"2029\", \"card_holder\": \"Inimene\", \"last4\": \"1111\", \"updated_at\": 1519219380, \"created_at\": 1519219378, \"app_id\": null, \"is_recurring\": true, \"is_usable_for_preauthorization\": true, \"code\": null, \"account\": null, \"holder\": null}",
            "billing_account_id": 6,
            "billing_account_processor_identifier_id": 6,
            "created": 1519219380,
            "id": 6,
            "identifier": "pay_e566cf1e776c91857c5d55c0",
            "is_primary": true,
            "is_verified": true,
            "valid_thru": 1893369600
        }
    ]
    

    Get list of credit cards attached to billing account.

    HTTP Request

    GET https://api.warren.io/v1/payment/card/list

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Set card as primary

    curl "https://api.warren.io/v1/payment/card/set_primary" \
        -H "apikey: meowmeowmeow" \
        -X PUT \
        -d "payment_object_id=6"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Set credit card specified by id as 'primary'. Throws exception if specified card is not validated. Unmarks previous 'primary' card.

    HTTP Request

    PUT https://api.warren.io/v1/payment/card/set_primary

    Form Parameters

    Parameter Default Type
    payment_object_id A Whole number

    List credit

    curl "https://api.warren.io/v1/payment/credit/list?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "amount": -3.44,
            "billing_account_id": 129072,
            "created": 1543627933,
            "description": "Invoice payment",
            "id": 32
        },
        {
            "amount": -0.15,
            "billing_account_id": 129072,
            "created": 1539162090,
            "description": "Invoice payment",
            "id": 21
        },
        {
            "amount": -2.64,
            "billing_account_id": 129072,
            "created": 1539092800,
            "description": "Invoice payment",
            "id": 20
        },
        {
            "amount": -3.77,
            "billing_account_id": 129072,
            "created": 1538357520,
            "description": "Invoice payment",
            "id": 12
        },
        {
            "amount": 10.0,
            "billing_account_id": 129072,
            "created": 1537363992,
            "description": "First billing account",
            "id": 1
        }
    ]
    

    Show data about billing account's credit amount and individual records.

    HTTP Request

    GET https://api.warren.io/v1/payment/credit/list

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Buy credit

    curl "https://api.warren.io/v1/credit/buy" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=1"
        -d "payment_object_id=5"
        -d "amount=100.00"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Buy credit for a billing account, using specified credit card.

    HTTP Request

    POST https://api.warren.io/v1/payment/credit/buy

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number
    payment_object_id A Whole number
    amount Decimal number

    Request invoice for credit top up

    curl "https://api.warren.io/v1/credit/request_invoice" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=1"
        -d "amount=100.00"
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Request invoice for credit top up using manual bank transfer. Invoice will be generated with specified amount and sent to billing account's e-mail address.

    HTTP Request

    POST https://api.warren.io/v1/payment/credit/request_invoice

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number
    amount Decimal number

    Invoice details

    curl "https://api.warren.io/v1/payment/invoice?invoice_id=1" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
        "billing_account_id": 6,
        "created": 1519309247,
        "discount_percentage": 10,
        "due_date": 1520432447,
        "id": 1,
        "padded_id": "001",
        "period_end": 1519862400,
        "period_start": 1517443200,
        "records_list": [
            {
                "amount": 0.02602,
                "created": 1519309247,
                "descr": "TODO",
                "id": 1,
                "invoice_id": 1,
                "item_price": 0.02602,
                "location_slug": "tll",
                "name": "DEBUGXYZ-buntu, 2 CPUs, 2 GB RAM, null GB disk",
                "qty": 1,
                "qty_unit": "h"
            },
            {
                "amount": 0.87927,
                "created": 1519309247,
                "descr": "TODO",
                "id": 2,
                "invoice_id": 1,
                "item_price": 0.04187,
                "location_slug": "tll",
                "name": "buntu-b-Parool123, 4 CPUs, 1 GB RAM, 30 GB disk",
                "qty": 21,
                "qty_unit": "h"
            },
            {
                "amount": 0.08646,
                "created": 1519309247,
                "descr": "TODO",
                "id": 3,
                "invoice_id": 1,
                "item_price": 0.02882,
                "location_slug": "tll",
                "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                "qty": 3,
                "qty_unit": "h"
            },
            {
                "amount": 0.1441,
                "created": 1519309247,
                "descr": "TODO",
                "id": 4,
                "invoice_id": 1,
                "item_price": 0.02882,
                "location_slug": "tll",
                "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk",
                "qty": 5,
                "qty_unit": "h"
            },
            {
                "amount": 0.08646,
                "created": 1519309247,
                "descr": "TODO",
                "id": 5,
                "invoice_id": 1,
                "item_price": 0.02882,
                "location_slug": "tll",
                "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                "qty": 3,
                "qty_unit": "h"
            }
        ],
        "status": 10,
        "totals": {
            "subtotal": 1.23,
            "discount_amount": 0.12,
            "credit": -0.10,
            "vat_tax": 0.2,
            "total": 1.21
        },
        "transaction_list": [
            {
                "additional_data": "{\"id\": \"tran_707a24d54b2432688c2e2a68b12a\", \"amount\": 147, \"origin_amount\": 147, \"status\": \"closed\", \"description\": \"Pay reminder for invoice #1: 'Invoice <nr>'\", \"livemode\": false, \"refunds\": null, \"client\": {\"id\": \"client_57b586239757f585c569\", \"email\": \"user@example.com\", \"description\": null, \"app_id\": null, \"updated_at\": 1507032614, \"created_at\": 1507032614, \"payment\": [\"pay_d2338c36103cd678b657c852\", \"pay_876184a6380bdb25b2a617c2\", \"pay_92572e33a6cf41be8a0ba811\", \"pay_ff5129221ed980d5ced974c3\", \"pay_f0da159c756fcdb8d2f8fa77\", \"pay_80f3731cff7b0157185a314a\", \"pay_948ede1174fa52d79e72b7a9\", \"pay_8c3735b74d9649d2f742e77a\", \"pay_44a5f1d83299ef5488e83b88\", \"pay_77c695e0c85c1a87046cf90d\", \"pay_e0e496b06f7c706ce9f2c21f\", \"pay_bd68fca53a2b7ce493e77f7b\", \"pay_2ecd6ea760e6d0b4b6604d5c\", \"pay_693029dd67472dec44d08320\", \"pay_bcd100532afcac9207c327c3\", \"pay_ea5613ace7154061d95ba76f\", \"pay_d72aa93d0143f1b8d7ffa119\", \"pay_caec3bf657e124e01de21411\", \"pay_ac3756da59891e9986371ae5\", \"pay_6838cf521becb9c290a22264\", \"pay_5344aeabbf04ef507df2d545\", \"pay_1ef76358a95d797cf6741438\", \"pay_7662a834fa17f3dbc7ecced3\", \"pay_e566cf1e776c91857c5d55c0\", \"pay_c4c936c9bbbe12d9e481cad5\"], \"subscription\": null}, \"currency\": \"EUR\", \"created_at\": 1519309499, \"updated_at\": 1519309499, \"response_code\": 20000, \"short_id\": \"0000.9999.0000\", \"is_fraud\": false, \"invoices\": [], \"app_id\": null, \"preauthorization\": null, \"fees\": [], \"payment\": {\"id\": \"pay_e566cf1e776c91857c5d55c0\", \"type\": \"creditcard\", \"client\": \"client_57b586239757f585c569\", \"card_type\": \"visa\", \"country\": \"DE\", \"expire_month\": \"12\", \"expire_year\": \"2029\", \"card_holder\": \"Inimene\", \"last4\": \"1111\", \"updated_at\": 1519219380, \"created_at\": 1519219378, \"app_id\": null, \"is_recurring\": true, \"is_usable_for_preauthorization\": true, \"code\": null, \"account\": null, \"holder\": null}, \"mandate_reference\": null, \"is_refundable\": true, \"is_markable_as_fraud\": true}",
                "amount": 1.21,
                "created": 1519309499,
                "id": 1,
                "identifier": "tran_707a24d54b2432688c2e2a68b12a",
                "payment_object_id": 6
            }
        ],
        "vat_percentage": 20
    }
    

    Get invoice details.

    Invoice Status Code Description
    5 Unpaid
    10 Paid

    HTTP Request

    GET https://api.warren.io/v1/payment/invoice

    Query Parameters

    Parameter Default Type
    invoice_id A Whole number

    List invoices

    curl "https://api.warren.io/v1/payment/invoice/list?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
            "billing_account_id": 6,
            "created": 1520341071,
            "discount_percentage": 0,
            "due_date": 1521541071,
            "id": 3782543,
            "padded_id": "003782543",
            "period_end": 1522540800,
            "period_start": 1519862400,
            "records_list": [
                {
                    "amount": 0.3696,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 67,
                    "invoice_id": 3782543,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 132,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.3696,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 68,
                    "invoice_id": 3782543,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 132,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.3696,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 69,
                    "invoice_id": 3782543,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 132,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.3696,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 70,
                    "invoice_id": 3782543,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 132,
                    "qty_unit": "h"
                },
                {
                    "amount": 1.1088,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 71,
                    "invoice_id": 3782543,
                    "item_price": 0.0084,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, snapshots",
                    "qty": 132,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.3696,
                    "created": 1520341071,
                    "descr": "TODO",
                    "id": 72,
                    "invoice_id": 3782543,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 132,
                    "qty_unit": "h"
                }
            ],
            "status": 5,
            "totals": {
                "subtotal": 2.96,
                "discount_amount": 0.0,
                "credit": 0.0,
                "vat_tax": 0.59,
                "total": 3.55
            },
            "transaction_list": [],
            "vat_percentage": 20
        },
        {
            "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
            "billing_account_id": 6,
            "created": 1520341040,
            "discount_percentage": 0,
            "due_date": 1521541040,
            "id": 3782542,
            "padded_id": "003782542",
            "period_end": 1519862400,
            "period_start": 1517443200,
            "records_list": [
                {
                    "amount": 0.02602,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 54,
                    "invoice_id": 3782542,
                    "item_price": 0.02602,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-buntu, 2 CPUs, 2 GB RAM, null GB disk",
                    "qty": 1,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.87927,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 55,
                    "invoice_id": 3782542,
                    "item_price": 0.04187,
                    "location_slug": "tll",
                    "name": "buntu-b-Parool123, 4 CPUs, 1 GB RAM, 30 GB disk",
                    "qty": 21,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.0348,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 56,
                    "invoice_id": 3782542,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 57,
                    "invoice_id": 3782542,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.12126,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 58,
                    "invoice_id": 3782542,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 143,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 59,
                    "invoice_id": 3782542,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.1789,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 60,
                    "invoice_id": 3782542,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 145,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 61,
                    "invoice_id": 3782542,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.12126,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 62,
                    "invoice_id": 3782542,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 143,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 63,
                    "invoice_id": 3782542,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 1.2936,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 64,
                    "invoice_id": 3782542,
                    "item_price": 0.0084,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, snapshots",
                    "qty": 154,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.0348,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 65,
                    "invoice_id": 3782542,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1520341040,
                    "descr": "TODO",
                    "id": 66,
                    "invoice_id": 3782542,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                }
            ],
            "status": 5,
            "totals": {
                "subtotal": 22.89,
                "discount_amount": 0.0,
                "credit": 0.0,
                "vat_tax": 4.58,
                "total": 27.47
            },
            "transaction_list": [],
            "vat_percentage": 20
        },
        {
            "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
            "billing_account_id": 6,
            "created": 1520241350,
            "discount_percentage": 0,
            "due_date": 1521441350,
            "id": 3782541,
            "name": "Invoice",
            "padded_id": "003782541",
            "period_end": 1522540800,
            "period_start": 1519862400,
            "records_list": [
                {
                    "amount": 0.294,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 48,
                    "invoice_id": 3782541,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 105,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.294,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 49,
                    "invoice_id": 3782541,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 105,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.294,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 50,
                    "invoice_id": 3782541,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 105,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.294,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 51,
                    "invoice_id": 3782541,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 105,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.882,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 52,
                    "invoice_id": 3782541,
                    "item_price": 0.0084,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, snapshots",
                    "qty": 105,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.294,
                    "created": 1520241350,
                    "descr": "TODO",
                    "id": 53,
                    "invoice_id": 3782541,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 105,
                    "qty_unit": "h"
                }
            ],
            "status": 5,
            "totals": {
                "subtotal": 2.36,
                "discount_amount": 0.0,
                "credit": 0.0,
                "vat_tax": 0.47,
                "total": 2.83
            },
            "transaction_list": [],
            "vat_percentage": 20
        },
        {
            "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
            "billing_account_id": 6,
            "created": 1519867923,
            "discount_percentage": 0,
            "due_date": 1521067923,
            "id": 6,
            "name": "Invoice <nr>",
            "padded_id": "006",
            "period_end": 1519862400,
            "period_start": 1517443200,
            "records_list": [
                {
                    "amount": 4.0348,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 16,
                    "invoice_id": 6,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 17,
                    "invoice_id": 6,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Name of the Clone, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.0348,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 18,
                    "invoice_id": 6,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 19,
                    "invoice_id": 6,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.0348,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 20,
                    "invoice_id": 6,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 21,
                    "invoice_id": 6,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.12126,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 22,
                    "invoice_id": 6,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 143,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 23,
                    "invoice_id": 6,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                },
                {
                    "amount": 1.2936,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 24,
                    "invoice_id": 6,
                    "item_price": 0.0084,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, snapshots",
                    "qty": 154,
                    "qty_unit": "h"
                },
                {
                    "amount": 4.0348,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 25,
                    "invoice_id": 6,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 140,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.0392,
                    "created": 1519867923,
                    "descr": "TODO",
                    "id": 26,
                    "invoice_id": 6,
                    "item_price": 0.0028,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk, stopped",
                    "qty": 14,
                    "qty_unit": "h"
                }
            ],
            "status": 5,
            "totals": {
                "subtotal": 21.76,
                "discount_amount": 0.0,
                "credit": 0.0,
                "vat_tax": 4.35,
                "total": 26.11
            },
            "transaction_list": [],
            "vat_percentage": 20
        },
        {
            "account_snapshot": "{\"address_line1\": \"Puiestee\", \"address_line2\": null, \"city\": \"K\\u00fcla\", \"company_name\": \"Firma\", \"company_reg_code\": \"232\", \"company_vat_number\": \"235235\", \"country\": \"EE\", \"county\": \"Moldaavia\", \"created\": 1519219377, \"credit_amount\": 0, \"email\": \"user@example.com\", \"id\": 6, \"is_deleted\": false, \"post_index\": \"314243123\", \"title\": \"konto\", \"user_id\": 8}",
            "billing_account_id": 6,
            "created": 1519309247,
            "discount_percentage": 0,
            "due_date": 1520509247,
            "id": 1,
            "name": "Invoice <nr>",
            "padded_id": "001",
            "period_end": 1519862400,
            "period_start": 1517443200,
            "records_list": [
                {
                    "amount": 0.02602,
                    "created": 1519309247,
                    "descr": "TODO",
                    "id": 1,
                    "invoice_id": 1,
                    "item_price": 0.02602,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-buntu, 2 CPUs, 2 GB RAM, null GB disk",
                    "qty": 1,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.87927,
                    "created": 1519309247,
                    "descr": "TODO",
                    "id": 2,
                    "invoice_id": 1,
                    "item_price": 0.04187,
                    "location_slug": "tll",
                    "name": "buntu-b-Parool123, 4 CPUs, 1 GB RAM, 30 GB disk",
                    "qty": 21,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.08646,
                    "created": 1519309247,
                    "descr": "TODO",
                    "id": 3,
                    "invoice_id": 1,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-3-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 3,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.1441,
                    "created": 1519309247,
                    "descr": "TODO",
                    "id": 4,
                    "invoice_id": 1,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "DEBUGXYZ-2-buntu, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 5,
                    "qty_unit": "h"
                },
                {
                    "amount": 0.08646,
                    "created": 1519309247,
                    "descr": "TODO",
                    "id": 5,
                    "invoice_id": 1,
                    "item_price": 0.02882,
                    "location_slug": "tll",
                    "name": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
                    "qty": 3,
                    "qty_unit": "h"
                }
            ],
            "status": 10,
            "totals": {
                "subtotal": 1.23,
                "discount_amount": 0.0,
                "credit": 0.0,
                "vat_tax": 0.25,
                "total": 1.48
            },
            "transaction_list": [
                {
                    "additional_data": "{\"id\": \"tran_707a24d54b2432688c2e2a68b12a\", \"amount\": 147, \"origin_amount\": 147, \"status\": \"closed\", \"description\": \"Pay reminder for invoice #1: 'Invoice <nr>'\", \"livemode\": false, \"refunds\": null, \"client\": {\"id\": \"client_57b586239757f585c569\", \"email\": \"user@example.com\", \"description\": null, \"app_id\": null, \"updated_at\": 1507032614, \"created_at\": 1507032614, \"payment\": [\"pay_d2338c36103cd678b657c852\", \"pay_876184a6380bdb25b2a617c2\", \"pay_92572e33a6cf41be8a0ba811\", \"pay_ff5129221ed980d5ced974c3\", \"pay_f0da159c756fcdb8d2f8fa77\", \"pay_80f3731cff7b0157185a314a\", \"pay_948ede1174fa52d79e72b7a9\", \"pay_8c3735b74d9649d2f742e77a\", \"pay_44a5f1d83299ef5488e83b88\", \"pay_77c695e0c85c1a87046cf90d\", \"pay_e0e496b06f7c706ce9f2c21f\", \"pay_bd68fca53a2b7ce493e77f7b\", \"pay_2ecd6ea760e6d0b4b6604d5c\", \"pay_693029dd67472dec44d08320\", \"pay_bcd100532afcac9207c327c3\", \"pay_ea5613ace7154061d95ba76f\", \"pay_d72aa93d0143f1b8d7ffa119\", \"pay_caec3bf657e124e01de21411\", \"pay_ac3756da59891e9986371ae5\", \"pay_6838cf521becb9c290a22264\", \"pay_5344aeabbf04ef507df2d545\", \"pay_1ef76358a95d797cf6741438\", \"pay_7662a834fa17f3dbc7ecced3\", \"pay_e566cf1e776c91857c5d55c0\", \"pay_c4c936c9bbbe12d9e481cad5\"], \"subscription\": null}, \"currency\": \"EUR\", \"created_at\": 1519309499, \"updated_at\": 1519309499, \"response_code\": 20000, \"short_id\": \"0000.9999.0000\", \"is_fraud\": false, \"invoices\": [], \"app_id\": null, \"preauthorization\": null, \"fees\": [], \"payment\": {\"id\": \"pay_e566cf1e776c91857c5d55c0\", \"type\": \"creditcard\", \"client\": \"client_57b586239757f585c569\", \"card_type\": \"visa\", \"country\": \"DE\", \"expire_month\": \"12\", \"expire_year\": \"2029\", \"card_holder\": \"Inimene\", \"last4\": \"1111\", \"updated_at\": 1519219380, \"created_at\": 1519219378, \"app_id\": null, \"is_recurring\": true, \"is_usable_for_preauthorization\": true, \"code\": null, \"account\": null, \"holder\": null}, \"mandate_reference\": null, \"is_refundable\": true, \"is_markable_as_fraud\": true}",
                    "amount": 1.48,
                    "created": 1519309499,
                    "id": 1,
                    "identifier": "tran_707a24d54b2432688c2e2a68b12a",
                    "payment_object_id": 6
                }
            ],
            "vat_percentage": 20
        }
    ]
    

    List billing account's invoices.

    HTTP Request

    GET https://api.warren.io/v1/payment/invoice/list

    Query Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Pay all

    curl "https://api.warren.io/v1/payment/pay_all" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=0"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "consumer::resource_forbidden": {
                "msg": "Consumer not allowed to access resource.",
                "subtype": "resource_forbidden",
                "type": "consumer"
            }
        }
    }
    

    Pay all billing account's unpaid invoices. Pays oldest invoices first.

    HTTP Request

    POST https://api.warren.io/v1/payment/pay_all

    Form Parameters

    Parameter Default Type
    billing_account_id A Whole number

    Pay amount

    curl "https://api.warren.io/v1/payment/pay_amount" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "billing_account_id=6" \
        -d "amount=10"
    

    The above command returns JSON structured like this:

    {
        "amount_left": 0.0,
        "amount_used": 10.0,
        "error_log": "",
        "message": "All amount were used. Invoices (#6) were paid fully or partially.",
        "paid_invoices": [
            6
        ],
        "success": true
    }
    

    Pay the amount specified with parameters. Pays billing account's oldest unpaid invoices first.

    HTTP Request

    POST https://api.warren.io/v1/payment/pay_amount

    Form Parameters

    Parameter Default Type
    amount A decimal number
    billing_account_id A Whole number

    Pay invoice

    curl "https://api.warren.io/v1/payment/pay_invoice" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -d "invoice_id=0"
    

    The above command returns JSON structured like this:

    {
        "errors": {
            "consumer::resource_forbidden": {
                "msg": "Consumer not allowed to access resource.",
                "subtype": "resource_forbidden",
                "type": "consumer"
            }
        }
    }
    

    Pay invoice specified by id.

    HTTP Request

    POST https://api.warren.io/v1/payment/pay_invoice

    Form Parameters

    Parameter Default Type
    invoice_id A Whole number

    Active campaigns status

    curl "https://api.warren.io/v1/payment/has_active_campaigns" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "success": true
    }
    

    Check if there are any active campaigns

    HTTP Request

    GET https://api.warren.io/v1/payment/has_active_campaigns

    Pricing

    Pricing policy

    curl "https://api.warren.io/v1/pricing/policy" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "policy": [
            {
                "numCpus": 1,
                "policyId": 1001,
                "price": 0.00521,
                "resourceType": "CPU",
                "serviceNameUserFriendly": "1 CPU"
            },
            {
                "megsRam": 512,
                "policyId": 1010,
                "price": 0.001645,
                "resourceType": "RAM",
                "serviceNameUserFriendly": "0.5 GB RAM"
            },
            {
                "megsRam": 1024,
                "policyId": 1011,
                "price": 0.00329,
                "resourceType": "RAM",
                "serviceNameUserFriendly": "1 GB RAM"
            },
            {
                "policyId": 1021,
                "price": 3.42e-05,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "backup",
                "serviceNameUserFriendly": "Backup"
            },
            {
                "policyId": 1022,
                "price": 0.0001,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "snapshot",
                "serviceNameUserFriendly": "Snapshot"
            },
            {
                "policyId": 1023,
                "price": 0.0001,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "main",
                "serviceNameUserFriendly": "Storage"
            },
            {
                "policyId": 1030,
                "price": 0.00548,
                "resourceType": "LICENSE",
                "serviceNameInUptime": "windows",
                "serviceNameUserFriendly": "Windows license per core per hour"
            },
            {
                "policyId": 1040,
                "price": 3.42e-05,
                "resourceType": "OBJECT_STORAGE",
                "serviceNameInUptime": "object_storage",
                "serviceNameUserFriendly": "Object storage per gigabyte per hour"
            }
        ]
    }
    

    Policy that describes how resources are priced.

    HTTP Request

    GET https://api.warren.io/v1/pricing/policy

    Google Tag Manager Key

    curl "https://api.warren.io/v1/config/ui/gtm_key" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    {
        "gtm_key": "ABC-DEF1234"
    }
    

    Google Tag Manager Key

    HTTP Request

    PUT https://api.warren.io/v1/config/ui/gtm_key?gtm_key=CBA-76543XY

    curl "https://api.warren.io/v1/config/ui/gtm_key?gtm_key=CBA-76543XY" \
        -H "apikey: meowmeowmeow" \
        -X PUT
    

    The above command returns JSON structured like this:

    {
        "gtm_key": "CBA-76543XY"
    }
    

    Replaces Google Tag Manager Key, also quotes with quotes ABC-DEF1234 is stroed as "ABC-DEF1234"

    HTTP Request

    PUT https://api.warren.io/v1/config/ui/gtm_key?gtm_key=CBA-76543XY

    Charging

    Get Resource Usage

    curl "https://api.warren.io/v1/charging/usage?billing_account_id=6" \
        -H "apikey: meowmeowmeow" \
        -X GET
    

    The above command returns JSON structured like this:

    [
        {
            "billing_account_id": 6,
            "configurations": [
                {
                    "cpus": 2,
                    "disk_size_GB": 20,
                    "os_name": "ubuntu",
                    "ram_MB": 2048,
                    "vm_name": "Ubuntu-16-04"
                },
                {
                    "cpus": 2,
                    "disk_size_GB": null,
                    "os_name": null,
                    "ram_MB": 2048,
                    "vm_name": "Ubuntu-16-04"
                }
            ],
            "cost": 0.08646,
            "description": "Ubuntu-16-04, 2 CPUs, 2 GB RAM, 20 GB disk",
            "hours": 3.0,
            "owner_uuid": "f80b1d62-ffe4-43ef-9210-60f05445456a",
            "price": 0.02882,
            "price_unit": "h",
            "uptime_types": [
                "VM_COMPUTE",
                "VM_RUNNING",
                "MAIN_STORAGE"
            ],
            "user_id": 8
        }
    ]
    

    Resources, prices and costs for the specified billing account, for the current month.

    HTTP Request

    GET https://api.warren.io/v1/charging/usage

    Query Parameters

    Parameter Default Type
    billing_account_id integer

    Managed Services

    Create Service Package

    curl "https://api.warren.io/v1/user-resource/service/package" \
        -H "apikey: meowmeowmeow" \
        -X POST \
        -H "Content-Type: application/json" \
        --data 
        '{
            "billing_account_id": 12,
            "service": "postgresql",
            "version": "14.0",
            "display_name": "My Postgre Service 14.0",
            "vm_cpu": 2,
            "vm_ram": 4096,
            "vm_disk_gb": 40,
            "package_parameters": "{\"location\":\"dc1\"}",
            "is_multi_node": True
        }'
    

    The above command returns JSON structured like this:

    {
        "billing_account_id": 12,
        "created_at": "2022-01-04 14:05:25",
        "display_name": "My Postgre Service 14.0",
        "is_deleted": false,
        "is_multi_node": true,
        "prices": [{
                "priceMultiplier": 3.0,
                "resourceType": "CPU"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "RAM"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "main"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "block"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "snapshot"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "backup"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "OBJECT_STORAGE"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "LICENSE",
                "serviceNameInUptime": "windows"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "UNASSIGNED_FLOATING_IP"
            }
        ],
        "properties": {
            "service_ip": "10.2.3.45",
            "location": "jkt01",
            "sql_user": "wadmin",
            "port": 5432
        },
        "resources": [{
                "resource_allocation": {
                    "address": "10.2.3.45"
                },
                "resource_id": "ac08237a-09e6-4c57-add2-d182925ef505",
                "resource_location": "jkt01",
                "resource_type": "virtual_ip"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "d1e6aa96-fa18-468f-9813-121415c063dd",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "abb0ab92-cffa-4c93-a7a1-f0d5cb796099",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "a64b3522-7fb8-4d1b-a3a7-143d282d707d",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "b13d0cff-0a4f-4701-a73f-98d63e157343",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }
        ],
        "service": "postgresql",
        "status": "active",
        "updated_at": "2022-01-04 14:10:34",
        "user_id": 55,
        "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546",
        "version": "14.0"
    }
    

    Creates a new managed service package. The package can be either single or multi node (availability depends on the service type)

    HTTP Request

    POST https://api.warren.io/v1/user-resource/service/package

    Request json body

    Parameter Required Type
    billing_account_id 1 A Whole number
    service 1 Basic text / string value
    version 1 Basic text / string value
    display_name 1 Basic text / string value
    vm_cpu 1 A Whole number
    vm_ram 1 A Whole number
    vm_disk_gb 1 A Whole number
    package_parameters 0 JSON
    is_multi_node 0 Boolean

    List Service Packages

    curl "https://api.warren.io/v1/user-resource/service/packages" \
        -H "apikey: meowmeowmeow" \
        -X GET \
        -H "Content-Type: application/json" 
    
    

    The above command returns JSON structured like this:

    [{
            "billing_account_id": 12,
            "created_at": "2022-01-04 14:19:51",
            "display_name": "Maria5",
            "is_deleted": false,
            "is_multi_node": false,
            "prices": [{
                    "priceMultiplier": 3.0,
                    "resourceType": "CPU"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "RAM"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "main"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "block"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "snapshot"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "backup"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "OBJECT_STORAGE"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "LICENSE",
                    "serviceNameInUptime": "windows"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "UNASSIGNED_FLOATING_IP"
                }
            ],
            "properties": {
                "service_ip": "10.2.112.44",
                "location": "jkt01",
                "sql_user": "wadmin",
                "port": 3306
            },
            "resources": [{
                    "resource_allocation": {
                        "memory": 1024,
                        "vcpu": 1,
                        "status": "running",
                        "storage": [{
                                "primary": true,
                                "size": 30,
                                "uuid": "40745556-7e2a-4a16-b055-ecececfb6c57",
                                "replica": []
                            }
                        ]
                    },
                    "resource_id": "c910e5bf-908b-4dd7-b71b-f0449c509c95",
                    "resource_location": "jkt01",
                    "resource_type": "vm"
                }
            ],
            "service": "mariadb",
            "status": "active",
            "updated_at": "2022-01-04 14:22:33",
            "user_id": 55,
            "uuid": "82d820e9-8ccb-4b7b-90cd-166e3f550851",
            "version": "10.5"
        }, {
            "billing_account_id": 12,
            "created_at": "2022-01-04 14:05:25",
            "display_name": "My Postgre Service 14.0",
            "is_deleted": false,
            "is_multi_node": true,
            "prices": [{
                    "priceMultiplier": 3.0,
                    "resourceType": "CPU"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "RAM"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "main"
                }, {
                    "priceMultiplier": 3.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "block"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "snapshot"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "STORAGE",
                    "serviceNameInUptime": "backup"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "OBJECT_STORAGE"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "LICENSE",
                    "serviceNameInUptime": "windows"
                }, {
                    "priceMultiplier": 0.0,
                    "resourceType": "UNASSIGNED_FLOATING_IP"
                }
            ],
            "properties": {
                "service_ip": "10.2.3.45",
                "location": "jkt01",
                "sql_user": "wadmin",
                "port": 5432
            },
            "resources": [{
                    "resource_allocation": {
                        "address": "10.2.112.45"
                    },
                    "resource_id": "ac08237a-09e6-4c57-add2-d182925ef505",
                    "resource_location": "jkt01",
                    "resource_type": "virtual_ip"
                }, {
                    "resource_allocation": {
                        "memory": 1024,
                        "vcpu": 1,
                        "status": "running",
                        "storage": [{
                                "primary": true,
                                "size": 30,
                                "uuid": "d1e6aa96-fa18-468f-9813-121415c063dd",
                                "replica": []
                            }
                        ]
                    },
                    "resource_id": "abb0ab92-cffa-4c93-a7a1-f0d5cb796099",
                    "resource_location": "jkt01",
                    "resource_type": "vm"
                }, {
                    "resource_allocation": {
                        "memory": 1024,
                        "vcpu": 1,
                        "status": "running",
                        "storage": [{
                                "primary": true,
                                "size": 30,
                                "uuid": "a64b3522-7fb8-4d1b-a3a7-143d282d707d",
                                "replica": []
                            }
                        ]
                    },
                    "resource_id": "b13d0cff-0a4f-4701-a73f-98d63e157343",
                    "resource_location": "jkt01",
                    "resource_type": "vm"
                }
            ],
            "service": "postgresql",
            "status": "active",
            "updated_at": "2022-01-04 14:10:34",
            "user_id": 55,
            "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546",
            "version": "14.0"
        }
    ]
    

    Lists service packages of the given user.

    HTTP Request

    GET https://api.warren.io/v1/user-resource/service/packages

    Get Service Package

    curl "https://api.warren.io/v1/user-resource/service/package/40745556-7e2a-4a16-b055-ecececfb6c57" \
        -H "apikey: meowmeowmeow" \
        -X GET \
        -H "Content-Type: application/json" 
    
    

    The above command returns JSON structured like this:

    {
        "billing_account_id": 12,
        "created_at": "2022-01-04 14:05:25",
        "display_name": "My Postgre Service 14.0",
        "is_deleted": false,
        "is_multi_node": true,
        "prices": [{
                "priceMultiplier": 3.0,
                "resourceType": "CPU"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "RAM"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "main"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "block"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "snapshot"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "backup"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "OBJECT_STORAGE"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "LICENSE",
                "serviceNameInUptime": "windows"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "UNASSIGNED_FLOATING_IP"
            }
        ],
        "properties": {
            "service_ip": "10.2.3.45",
            "location": "jkt01",
            "sql_user": "wadmin",
            "port": 5432
        },
        "resources": [{
                "resource_allocation": {
                    "address": "10.2.3.45"
                },
                "resource_id": "ac08237a-09e6-4c57-add2-d182925ef505",
                "resource_location": "jkt01",
                "resource_type": "virtual_ip"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "d1e6aa96-fa18-468f-9813-121415c063dd",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "abb0ab92-cffa-4c93-a7a1-f0d5cb796099",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "a64b3522-7fb8-4d1b-a3a7-143d282d707d",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "b13d0cff-0a4f-4701-a73f-98d63e157343",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }
        ],
        "service": "postgresql",
        "status": "active",
        "updated_at": "2022-01-04 14:10:34",
        "user_id": 55,
        "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546",
        "version": "14.0"
    }
    

    Returns a service package data

    HTTP Request

    GET https://api.warren.io/v1/user-resource/service/package/{service_package_uuid}

    Update Service Package metadata

    curl "https://api.warren.io/v1/user-resource/service/package/40745556-7e2a-4a16-b055-ecececfb6c57" \
        -H "apikey: meowmeowmeow" \
        -X GET \
        -H "Content-Type: application/json",
        --data 
        '{
            "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546", 
            "billing_account_id": 13,  
            "display_name": "New name"
        }'
    
    

    The above command returns JSON structured like this:

    {
        "billing_account_id": 13,
        "created_at": "2022-01-04 14:05:25",
        "display_name": "New name",
        "is_deleted": false,
        "is_multi_node": true,
        "prices": [{
                "priceMultiplier": 3.0,
                "resourceType": "CPU"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "RAM"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "main"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "block"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "snapshot"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "backup"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "OBJECT_STORAGE"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "LICENSE",
                "serviceNameInUptime": "windows"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "UNASSIGNED_FLOATING_IP"
            }
        ],
        "properties": {
            "service_ip": "10.2.3.45",
            "location": "jkt01",
            "sql_user": "wadmin",
            "port": 5432
        },
        "resources": [{
                "resource_allocation": {
                    "address": "10.2.3.45"
                },
                "resource_id": "ac08237a-09e6-4c57-add2-d182925ef505",
                "resource_location": "jkt01",
                "resource_type": "virtual_ip"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "d1e6aa96-fa18-468f-9813-121415c063dd",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "abb0ab92-cffa-4c93-a7a1-f0d5cb796099",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }, {
                "resource_allocation": {
                    "memory": 1024,
                    "vcpu": 1,
                    "status": "running",
                    "storage": [{
                            "primary": true,
                            "size": 30,
                            "uuid": "a64b3522-7fb8-4d1b-a3a7-143d282d707d",
                            "replica": []
                        }
                    ]
                },
                "resource_id": "b13d0cff-0a4f-4701-a73f-98d63e157343",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }
        ],
        "service": "postgresql",
        "status": "active",
        "updated_at": "2022-01-04 14:10:34",
        "user_id": 55,
        "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546",
        "version": "14.0"
    }
    

    Updates service package display name and billing account

    HTTP Request

    PATCH https://api.warren.io/v1/user-resource/service/package/{service_package_uuid}

    Request json body

    Parameter Required Type
    billing_account_id 0 A Whole number
    display_name 0 Basic text / string value

    Get Service secrets

    curl "https://api.warren.io/v1/user-resource/service/package/40745556-7e2a-4a16-b055-ecececfb6c57/secrets" \
        -H "apikey: meowmeowmeow" \
        -X GET \
        -H "Content-Type: application/json" 
    
    

    The above command returns JSON structured like this:

    {"sql_pass": "MKL-TosvErik"}
    

    Returns the service secrets

    HTTP Request

    GET https://api.warren.io/v1/user-resource/service/package/{service_package_uuid}/secrets

    Delete Service Package

    curl "https://api.warren.io/v1/user-resource/service/package/40745556-7e2a-4a16-b055-ecececfb6c57" \
        -H "apikey: meowmeowmeow" \
        -X DELETE \
        -H "Content-Type: application/json" 
    
    

    The above command returns JSON structured like this:

    {
        "billing_account_id": 12,
        "created_at": "2022-01-04 14:05:25",
        "display_name": "My Postgre Service 14.0",
        "deleted_at": "2022-01-04 14:48:43",
        "is_deleted": true,
        "is_multi_node": true,
        "prices": [{
                "priceMultiplier": 3.0,
                "resourceType": "CPU"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "RAM"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "main"
            }, {
                "priceMultiplier": 3.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "block"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "snapshot"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "STORAGE",
                "serviceNameInUptime": "backup"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "OBJECT_STORAGE"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "LICENSE",
                "serviceNameInUptime": "windows"
            }, {
                "priceMultiplier": 0.0,
                "resourceType": "UNASSIGNED_FLOATING_IP"
            }
        ],
        "properties": {
            "service_ip": "10.2.3.45",
            "location": "jkt01",
            "sql_user": "wadmin",
            "port": 5432
        },
        "resources": [{
                "resource_allocation": {},
                "resource_id": "ac08237a-09e6-4c57-add2-d182925ef505",
                "resource_location": "jkt01",
                "resource_type": "virtual_ip"
            }, {
                "resource_allocation": {},
                "resource_id": "abb0ab92-cffa-4c93-a7a1-f0d5cb796099",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }, {
                "resource_allocation": {},
                "resource_id": "b13d0cff-0a4f-4701-a73f-98d63e157343",
                "resource_location": "jkt01",
                "resource_type": "vm"
            }
        ],
        "service": "postgresql",
        "status": "deleted",
        "updated_at": "2022-01-04 14:10:34",
        "user_id": 55,
        "uuid": "71cddf54-35ed-4f6e-bdf7-d344bbf0a546",
        "version": "14.0"
    }
    

    Deletes a service package data and resources

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/service/package/{service_package_uuid}

    Get whitelist addresses

    curl -X GET "https://api.warren.io/v1/user-resource/service/package/7d353c9d-ea50-4516-a752-898b81ff0ef7/whitelist_addresses \
      -H "apikey: meowmeowmeow"
    

    The above command returns JSON structured like this:

    [
        "10.123.8.0/24",
        "176.112.157.203"
    ]
    

    Whitelist prescribes a set of addresses that are allowed to make connections to Service host(s). An empty whitelist implies no restrictions, i.e. all source addresses are allowed.

    #location-specific

    HTTP Request

    GET https://api.warren.io/v1/user-resource/service/package/{service_uuid}/whitelist_addresses

    Add whitelist entry

    curl -X POST 'https://api.warren.io/v1/user-resource/service/package/7d353c9d-ea50-4516-a752-898b81ff0ef7/whitelist_addresses' \
        --header 'apikey: meowmeowmeow' \
        --data 'ip_address=1.2.3.0/24'  
    

    The above command returns JSON structured like this:

    [
        "176.112.157.203", 
        "1.2.3.0/24"
    ]
    

    Add address or subnet block entry to the whitelist of given Service. The response will reflect new state of the whitelist.

    #location-specific

    HTTP Request

    POST https://api.warren.io/v1/user-resource/service/package/{service_uuid}/whitelist_addresses

    Form parameters

    Parameter Type Description
    ip_address string IP address or subnet prefix in CIDR notation.

    Delete whitelist entry

    curl -X DELETE 'https://api.warren.io/v1/user-resource/service/package/7d353c9d-ea50-4516-a752-898b81ff0ef7/whitelist_addresses' \
        --header 'apikey: meowmeowmeow' \
        --data 'ip_address=1.2.3.0/24'  
    

    The above command returns JSON structured like this:

    [
        "176.112.157.203"
    ]
    

    Delete an entry from whitelist of given Service. The response will reflect new state of the whitelist.

    #location-specific

    HTTP Request

    DELETE https://api.warren.io/v1/user-resource/service/package/{service_uuid}/whitelist_addresses

    Form parameters

    Parameter Type Description
    ip_address string IP address or subnet prefix in CIDR notation.