Openstack reseller API

This page contains all endpoints for the openstack reseller API.

Every call requires your API Key to be sent via the X-Reseller-Api-Key header. A 401 UNAUTHORIZED status code will be sent back if credentials are missing.

We added example requests to get the servers details of a user by only having the user’s email. In these requests, the service used are keystone and nova, which services types are “identity” and “compute” respectively.

At the end of this document, we added the generic request so you can use it for any openstack service.

Note

If you’re not sure which service/path you will need, check the official openstack api endpoint, then get the name of the service you want to use. After doing this, search the service type of the service you want to use and use it as the service in these requests.

Warning

Only the GET method is authorized.

GET /reseller/identity/v3/users?name=email

Returns an openstack user. The email in this endpoint must be URI encoded, i.e, if the email is test@ormuco.com, it should be sent as test%40ormuco.com.

Query Parameters:
 
  • name – URI encoded email.
Status Codes:

Example Response

{
    "users": [
        {
        "email": "test@ormuco.com",
        "id": "c5fe95145fs6zdgchc2f44e47f91e08f",
        "name": "test@ormuco.com",
        "domain_id": "101e5ad2cc4z421eaed8a96b59c361be",
        "enabled": true,
        "default_project_id": "19e316e051a841ef972876cd39590fe9",
        "password_expires_at": null,
        "options": {},
        "links": {
            "self": "https://API_URL:SERVICE_PORT/v3/users/
                     c5fe95145fs6zdgchc2f44e47f91e08f"
        }
        }
    ],
    "links": {
        "next": null,
        "self": "https://API_URL:SERVICE_PORT/v3/users?name=
                 test@ormuco.com&all_tenants=True",
        "previous": null
    }
}
GET /reseller/identity/v3/services/

Returns a list of all of available openstack services to interact with. API_ENDPOINT stands for your api end point. The service name for the reseller API is the type returned here, i.e, if you want to interact with magnum, the service name is container-infra.

Status Codes:

Example Response

{
  "services": [
    {
      "description": "Openstack Container Service",
      "name": "magnum",
      "id": "026456d464e04873ba3dc2ab945decdc",
      "type": "container-infra",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 025456d464e04873ba3dc2ab945decdc"
      }
    },
    {
      "description": "Openstack Object Storage",
      "name": "swift",
      "id": "09f592702a4b4d368302c543af66e287",
      "type": "object-store",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 09f592702a4b4d368302c543af66e287"
      }
    },
    {
      "description": "OpenStack Metric Service",
      "name": "gnocchi",
      "id": "0c9b513ff14f4c0799e86a25d41b4750",
      "type": "metric",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 0c9b513ff14f4c0799e86a25d41b4750"
      }
    },
    {
      "description": "Sahara Data Processing",
      "name": "sahara",
      "id": "13469851919f487fa3ea714425dde3b4",
      "type": "data-processing",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 13469851919f487fa3ea714425dde3b4"
      }
    },
    {
      "description": "OpenStack Compute Service",
      "name": "nova",
      "id": "162e8e8bbcd34efe885bc2ae1e140281",
      "type": "compute",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 162e8e8bbcd34efe885bc2ae1e140281"
      }
    },
    {
      "description": "OpenStack Orchestration",
      "name": "heat",
      "id": "16832e63280343c6a9a0a07912c07061",
      "type": "orchestration",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 16832e63280343c6a9a0a07912c07061"
      }
    },
    {
      "description": "OpenStack High Availability",
      "name": "masakari",
      "id": "2733ae1381914e7287fcd475e44c705a",
      "type": "instance-ha",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 2733ae1381914e7287fcd475e44c705a"
      }
    },
    {
      "description": "Container Service",
      "name": "zun",
      "id": "42141e3013c748349c957fbf3a1eb564",
      "type": "container",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 42141e3013c748349c957fbf3a1eb564"
      }
    },
    {
      "description": "Openstack Image",
      "name": "glance",
      "id": "56bea4bb09174e9fa115718361410936",
      "type": "image",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 56bea4bb09174e9fa115718361410936"
      }
    },
    {
      "description": "OpenStack CloudFormation",
      "name": "heat-cfn",
      "id": "73489de41c8044c4b222ffeb94ea6f33",
      "type": "cloudformation",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 73489de41c8044c4b222ffeb94ea6f33"
      }
    },
    {
      "description": "Trove Database Service",
      "name": "trove",
      "id": "7fc0e30e03484f14b6691be9fccacf9b",
      "type": "database",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 7fc0e30e03484f14b6691be9fccacf9b"
      }
    },
    {
      "description": "Openstack Shared Filesystems",
      "name": "manila",
      "id": "7fdd04137f854b06931263628f1e7ae6",
      "type": "share",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 7fdd04137f854b06931263628f1e7ae6"
      }
    },
    {
      "description": "Openstack Freezer Backup Service",
      "name": "freezer",
      "id": "80547f3241b24e6b9f33ab8324a78bc1",
      "type": "backup",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 80547f3241b24e6b9f33ab8324a78bc1"
      }
    },
    {
      "description": "Openstack Block Storage",
      "name": "cinder",
      "id": "864ffa50680f4da5beed1d42cc89649f",
      "type": "volume",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 864ffa50680f4da5beed1d42cc89649f"
      }
    },
    {
      "description": "Function Service",
      "name": "qinling",
      "id": "8bd7c9ff692f453ebdef6c2befd745b0",
      "type": "function-engine",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 8bd7c9ff692f453ebdef6c2befd745b0"
      }
    },
    {
      "description": "Designate DNS Service",
      "name": "designate",
      "id": "8f09df08e0664fb68d76fa517f2d0f3d",
      "type": "dns",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 8f09df08e0664fb68d76fa517f2d0f3d"
      }
    },
    {
      "description": "Openstack Shared Filesystems",
      "name": "manilav2",
      "id": "92ad7ec8a6274300bb96ea18d7a136f4",
      "type": "sharev2",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 92ad7ec8a6274300bb96ea18d7a136f4"
      }
    },
    {
      "description": "Octavia Load Balancing Service",
      "name": "octavia",
      "id": "96a88d32e84f4cd3b689ff0cded31ad8",
      "type": "load-balancer",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 96a88d32e84f4cd3b689ff0cded31ad8"
      }
    },
    {
      "description": "Openstack Block Storage",
      "name": "cinderv3",
      "id": "981ec6e800a24e24a60013a214019aa4",
      "type": "volumev2 | volumev3",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 981ec6e800a24e24a60013a214019aa4"
      }
    },
    {
      "description": "OpenStack Compute Service (Legacy 2.0)",
      "name": "nova_legacy",
      "id": "a16103572d7e47a19d9abd2f0fc9e3a2",
      "type": "compute_legacy",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 a16103572d7e47a19d9abd2f0fc9e3a2"
      }
    },
    {
      "description": "Barbican Key Management Service",
      "name": "barbican",
      "id": "a933908b1ece4235b583514764f97ffa",
      "type": "key-manager",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 a933908b1ece4235b583514764f97ffa"
      }
    },
    {
      "description": "Openstack Workflow",
      "name": "mistral",
      "id": "abddaca4d2c74688a71af10c4da5ff51",
      "type": "workflowv2",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 abddaca4d2c74688a71af10c4da5ff51"
      }
    },
    {
      "description": "OpenStack Alarming Service",
      "name": "aodh",
      "id": "b33727b4577541078e4de1b2de1a3e7f",
      "type": "alarming",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 b33727b4577541078e4de1b2de1a3e7f"
      }
    },
    {
      "name": "keystone",
      "description": "Identity Service",
      "id": "b80816499d72442680906c84d53d975c",
      "type": "identity",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 b80816499d72442680906c84d53d975c"
      }
    },
    {
      "description": "Application Data Protection Service",
      "name": "karbor",
      "id": "c11b805ce9344956a8447e80ca2193db",
      "type": "data-protect",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 c11b805ce9344956a8447e80ca2193db"
      }
    },
    {
      "description": "Openstack Networking",
      "name": "neutron",
      "id": "df1798856ade4ec682127f10d03777da",
      "type": "network",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 df1798856ade4ec682127f10d03777da"
      }
    },
    {
      "description": "Openstack Block Storage",
      "name": "cinderv2 | cinderv3",
      "id": "e03a25c6af7f4f09a427036d73882d50",
      "type": "volumev3",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 e03a25c6af7f4f09a427036d73882d50"
      }
    },
    {
      "description": "Placement Service",
      "name": "placement",
      "id": "f1863b3d00864b1cbef13dacfc3b149c",
      "type": "placement",
      "enabled": true,
      "links": {
        "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services/
                 f1863b3d00864b1cbef13dacfc3b149c"
      }
    }
  ],
  "links": {
    "next": null,
    "self": "https://API_ENDPOINT:SERVICE_PORT/v3/services?all_tenants=
             True",
    "previous": null
  }
}
GET /reseller/compute/servers/detail?tenant_id=project_id&all_tenants=True

Returns the list of servers asociated with a project.

Parameters:
  • project_id – Openstack project ID to get the servers from.

How to retreive openstack projects of a user

Status Codes:

Example Response

{
    "servers":[
        {
            "id":"2c1dae56-fb5a-4338-906e-fd514f02b4da",
            "name":"Documentation",
            "status":"ACTIVE",
            "tenant_id":"99e386g0z2a84bef972876cd49590fe9",
            "user_id":"c5fe95145fs6zdgchc2f44e47f91e08f",
            "metadata":{
                "baremetal":"false",
                "source_image":"9780e82d-51bc-4d35-b82c-3eb244141fe6",
                "isBootFromVolume":"false",
                "freezer":"false"
            },
            "hostId":"2596b9a77ca7e1d83a7f60e145dfdd7a713e05b51270fc716608adb1",
            "image":{
                "id":"9780e82d-51bc-4d35-b82c-3eb244141fe6",
                "links":[
                {
                    "rel":"bookmark",
                    "href":"https:/API_URL:8774/images/9780e82d-51bc-4d35-b82c-3eb244141fe6"
                }
                ]
            },
            "flavor":{
                "id":"103",
                "links":[
                {
                    "rel":"bookmark",
                    "href":"https:/API_URL:8774/flavors/103"
                }
                ]
            },
            "created":"2022-03-07T11:57:18Z",
            "updated":"2022-03-07T11:57:41Z",
            "addresses":{
                "default-network":[
                {
                    "version":4,
                    "addr":"192.168.3.71",
                    "OS-EXT-IPS:type":"fixed",
                    "OS-EXT-IPS-MAC:mac_addr":"fa:16:3e:38:6d:7f"
                },
                {
                    "version":4,
                    "addr":"111.111.111.213",
                    "OS-EXT-IPS:type":"floating",
                    "OS-EXT-IPS-MAC:mac_addr":"fa:16:7e:38:6d:1f"
                }
                ]
            },
            "accessIPv4":"",
            "accessIPv6":"",
            "links":[
                {
                "rel":"self",
                "href":"https:/API_URL:8774/v2.1/servers/2c1dae56-fb5a-4338-906e-fd554f02b4da"
                },
                {
                "rel":"bookmark",
                "href":"https:/API_URL:8774/servers/2c1dae56-fb5a-4338-906e-fd554f02b4da"
                }
            ],
            "OS-DCF:diskConfig":"MANUAL",
            "progress":0,
            "OS-EXT-AZ:availability_zone":"nova",
            "config_drive":"True",
            "key_name":"Jairo",
            "OS-SRV-USG:launched_at":"2022-03-07T11:57:41.000000",
            "OS-SRV-USG:terminated_at":null,
            "OS-EXT-SRV-ATTR:host":"compute013",
            "OS-EXT-SRV-ATTR:instance_name":"instance-000075fe",
            "OS-EXT-SRV-ATTR:hypervisor_hostname":"compute013.prd001.srv.lf.lat.ormuco.i3k",
            "OS-EXT-STS:task_state":null,
            "OS-EXT-STS:vm_state":"active",
            "OS-EXT-STS:power_state":1,
            "os-extended-volumes:volumes_attached":[
            ],
            "security_groups":[
                {
                "name":"default"
                }
            ]
        },
        {
            "id":"a6afa6a7-1edb-4efa-a769-97db7a759f3e",
            "name":"testaaaaa",
            "status":"ACTIVE",
            "tenant_id":"99e316e051a84bef972876cd49590fe9",
            "user_id":"c5fe95145fs6zdgchc2f44e47f91e08f",
            "metadata":{
                "baremetal":"false",
                "source_image":"fd9aa962-dc2c-4483-bda9-3effaf4dafc1",
                "isBootFromVolume":"false",
                "freezer":"false"
            },
            "hostId":"3aab1e15919c950e71a2c1cb465c56871e333200f04fc27cf0a6542f",
            "image":{
                "id":"fd9aa962-dc2c-4483-bda9-3effaf4dafc1",
                "links":[
                {
                    "rel":"bookmark",
                    "href":"https:/API_URL:8774/images/fd9aa962-dc2c-4483-bda9-3effaf4dafc1"
                }
                ]
            },
            "flavor":{
                "id":"102",
                "links":[
                {
                    "rel":"bookmark",
                    "href":"https:/API_URL:8774/flavors/102"
                }
                ]
            },
            "created":"2022-03-03T03:44:54Z",
            "updated":"2022-03-03T03:45:03Z",
            "addresses":{
                "default-network":[
                {
                    "version":4,
                    "addr":"192.168.3.18",
                    "OS-EXT-IPS:type":"fixed",
                    "OS-EXT-IPS-MAC:mac_addr":"fa:16:3e:28:1d:66"
                },
                {
                    "version":4,
                    "addr":"185.156.23.217",
                    "OS-EXT-IPS:type":"floating",
                    "OS-EXT-IPS-MAC:mac_addr":"fa:16:3e:28:1d:66"
                }
                ]
            },
            "accessIPv4":"",
            "accessIPv6":"",
            "links":[
                {
                "rel":"self",
                "href":"https:/API_URL:8774/v2.1/servers/a6afa6a7-1edb-4efa-a769-97db7a759f3e"
                },
                {
                "rel":"bookmark",
                "href":"https:/API_URL:8774/servers/a6afa6a7-1edb-4efa-a769-97db7a759f3e"
                }
            ],
            "OS-DCF:diskConfig":"MANUAL",
            "progress":0,
            "OS-EXT-AZ:availability_zone":"nova",
            "config_drive":"True",
            "key_name":"hclareth7",
            "OS-SRV-USG:launched_at":"2022-03-03T03:45:03.000000",
            "OS-SRV-USG:terminated_at":null,
            "OS-EXT-SRV-ATTR:host":"compute006",
            "OS-EXT-SRV-ATTR:instance_name":"instance-000075b9",
            "OS-EXT-SRV-ATTR:hypervisor_hostname":"compute006.prd001.srv.lf.lat.ormuco.i3k",
            "OS-EXT-STS:task_state":null,
            "OS-EXT-STS:vm_state":"active",
            "OS-EXT-STS:power_state":1,
            "os-extended-volumes:volumes_attached":[
            ],
            "security_groups":[
                {
                "name":"default"
                }
            ]
        }
    ],
    "servers_links":[
        {
            "rel":"next",
            "href":"https:/API_URL:8774/v2.1/servers/detail?all_tenants=True&limit=2&tenant_id=99e316e051a84bef972876cd49590fe9&marker=a6afa6a7-1edb-4efa-a769-97db7a759f3e"
        }
    ]
}
GET /reseller/identity/v3/users/(openstack_user_id)/projects

Returns a list of the user in the current provider.

Parameters:
  • openstack_user_id – Openstack’s user ID to get the projects from.

How to get the openstack user using the email

Parameters:
  • openstack_user_id – Openstack’s user ID.
Status Codes:

Example Response

{
    "projects":
    [
        {
        "id": "5939f0s74z91h09c8e8a1733983817ea",
        "name": "Test documentation",
        "domain_id": "151e51d9cb4c42feaed8a26b59c331be",
        "description": "Test documentation Project",
        "enabled": true,
        "parent_id": "151e51d9cb4c42feaed8a26b59c331be",
        "is_domain": false,
        "tags": [],
        "options": {},
        "links": {
                "self": "https://API_URL:SERVICE_PORT/v3/projects/
                         5939a0574091409c9e8a8733983817ea"
            }
        },
        {
        "id": "87481d1fbe0147d2a3622bd94fd6605e",
        "name": "infrastructure-project",
        "domain_id": "101e58d9cbzc42fezbd8a96b59c361be",
        "description": "infrastructure Project",
        "enabled": true,
        "parent_id": "151e51d9cb4c42feaed8a26b59c331be",
        "is_domain": false,
        "tags": [],
        "options": {},
        "links": {
                "self": "https://API_URL:SERVICE_PORT/v3/projects/
                         8748ed1fbe0d47d2a3622bd91fd6605e"
            }
        },
        {
        "id": "983b4fb1a22e480vbb6e3d49f9c7559c",
        "name": "project_4-project",
        "domain_id": "151e51d9cb4c42feaed8a26b59c331be",
        "description": "project 4 Project",
        "enabled": true,
        "parent_id": "151e51d9cb4c42feaed8a26b59c331be",
        "is_domain": false,
        "tags": [],
        "options": {},
        "links": {
                "self": "https://API_URL:SERVICE_PORT/v3/projects/
                         983b4fb6722e480abb6e3d49f9c7559c"
            }
        },
        {
        "id": "99e386g0z2a84bef972876cd49590fe9",
        "name": "test@ormuco.com",
        "domain_id": "151e51d9cb4c42feaed8a26b59c331be",
        "description": "test@ormuco.com- Project",
        "enabled": true,
        "parent_id": "151e51d1cb4c42feaed8a26b59c331be",
        "is_domain": false,
        "tags": [],
        "options": {},
        "links": {
                "self": "https://API_URL:SERVICE_PORT/v3/projects/
                         99e316e051a84bef972876cd49590fe9"
            }
        }
    ],
    "links": {
        "next": null,
        "self": "https://API_URL:SERVICE_PORT/v3/users/
                 c5fe95145fs6zdgchc2f44e47f91e08f/projects?all_tenants=True",
        "previous": null
    }
}
GET /reseller/identity/v3/projects/(project_id)

Returns the details of a project.

Parameters:
  • project_id – Openstack project ID to get details from.

How to retreive openstack projects of a user

Status Codes:

Example Response

{
    "project": {
        "id": "99e386g0z2a84bef972",
        "name": "test@ormuco.com-",
        "domain_id": "151e51d9cb4c42feaed8a26b59c331be",
        "description": "test@ormuco.com- Project",
        "enabled": true,
        "parent_id": "151e51d9cb4c42feaed8a26b59c331be",
        "is_domain": false,
        "tags": [],
        "options": {},
        "links": {
        "self": "https://API_URL:SERVICE_PORT/v3/projects/"
                "99e386g0z2a84bef972"
        }
    }
}
GET /reseller/(service)/(path)

Returns the information of the requested Openstack service if it’s enabled. To know the service name you should use, please go to list avaiable openstack services

Parameters:
  • service – Openstack Service type (compute, network, volumev2 | volumev3, etc).
  • path – URL path of the request. (/flavors, /v2.0/floatingips, etc).
  • all_tenants – Url param query. If defined True returns the information of all users. Check if the requested service supports it.
Status Codes:

Example Request /reseller/compute/servers

Example Response

{
    "servers": [
        {
            "id": "1f102c09-12a7-395b-89a9-6136797c642e",
            "name": "instance-snapshot-test-01",
            "links": [
                {
                    "rel": "self",
                    "href": "https://API_ENDPOINT:SERVICE_PORT/v2.1/
                             servers/
                    1f102c09-12a7-395b-89a9-6136797c642e"
                },
                {
                    "rel": "bookmark",
                    "href": "https://API_ENDPOINT:SERVICE_PORT/servers/
                    1f102c09-12a7-395b-89a9-6136797c642e"
                }
            ]
        },
        {
            "id": "01457Cf2-be3c-6fa2-84a7-5255485218c1",
            "name": "SoftEther-VPN",
            "links": [
                {
                    "rel": "self",
                    "href": "https://API_ENDPOINT:SERVICE_PORT/v2.1/
                             servers/
                    01457Cf2-be3c-6fa2-84a7-5255485218c1"
                },
                {
                    "rel": "bookmark",
                    "href": "https://API_ENDPOINT:SERVICE_PORT/
                             servers/
                    01457Cf2-be3c-6fa2-84a7-5255485218c1"
                }
            ]
        }
    ]
}