Chapter 2. Getting Started

This section is intended to help users get started on using the API. It assumes that the MidoNet Management REST API host is known. This host is represented as example.org in this document. The following GET request to the base URL of the API reveals the locations of the available resources :

GET /
Host: example.org
Accept: application/vnd.org.midonet.Application-v5+json

The request above may yield the following output :

HTTP/1.1 200 OK
Content-Type: application/vnd.org.midonet.Application-v5+json
{
  "uri":"http://example.com/midonet-api/",
  "version":"v5.0",
  "bgpNetworkTemplate":"http://example.com/midonet-api/bgp_networks/{id}",
  "bgpPeerTemplate":"http://example.com/midonet-api/bgp_peers/{id}",
  "bridges":"http://example.com/midonet-api/bridges",
  "bridgeTemplate":"http://example.com/midonet-api/bridges/{id}",
  "chains":"http://example.com/midonet-api/chains",
  "chainTemplate":"http://example.com/midonet-api/chains/{id}",
  "healthMonitors":"http://example.com/midonet-api/health_monitors",
  "healthMonitorTemplate":"http://example.com/midonet-api/health_monitors/{id}",
  "hosts":"http://example.com/midonet-api/hosts",
  "hostTemplate":"http://example.com/midonet-api/hosts/{id}",
  "ipAddrGroups":"http://example.com/midonet-api/ip_addr_groups",
  "ipAddrGroupTemplate":"http://example.com/midonet-api/ip_addr_groups/{id}",
  "l2insertions":"http://example.com/midonet-api/l2insertions",
  "l2InsertionTemplate":"http://example.com/midonet-api/l2insertions/{id}",
  "loadBalancers":"http://example.com/midonet-api/load_balancers",
  "loadBalancerTemplate":"http://example.com/midonet-api/load_balancers/{id}",
  "mirrors":"http://example.com/midonet-api/mirrors",
  "mirrorTemplate":"http://example.com/midonet-api/mirrors/{id}",
  "neutron":"http://example.com/midonet-api/neutron",
  "poolMembers":"http://example.com/midonet-api/pool_members",
  "poolMemberTemplate":"http://example.com/midonet-api/pool_members/{id}",
  "pools":"http://example.com/midonet-api/pools",
  "poolTemplate":"http://example.com/midonet-api/pools/{id}",
  "portGroups":"http://example.com/midonet-api/port_groups",
  "portGroupTemplate":"http://example.com/midonet-api/port_groups/{id}",
  "ports":"http://example.com/midonet-api/ports",
  "portTemplate":"http://example.com/midonet-api/ports/{id}",
  "qosBwLimitRuleTemplate": "http://example.com/midonet-api/qos_bw_limit_rules/{id}",
  "qosDscpRuleTemplate": "http://example.com/midonet-api/qos_dscp_rules/{id}",
  "qosPolicies": "http://example.com/midonet-api/qos_policies"
  "qosPolicyTemplate": "http://example.com/midonet-api/qos_policies/{id}",
  "routers":"http://example.com/midonet-api/routers",
  "routerTemplate":"http://example.com/midonet-api/routers/{id}",
  "routeTemplate":"http://example.com/midonet-api/routes/{id}",
  "ruleTemplate":"http://example.com/midonet-api/rules/{id}",
  "systemState":"http://example.com/midonet-api/system_state",
  "tenants":"http://example.com/midonet-api/tenants",
  "tenantTemplate":"http://example.com/midonet-api/tenants/{id}",
  "traceRequests":"http://example.com/midonet-api/traces",
  "traceRequestTemplate":"http://example.com/midonet-api/traces/{id}",
  "tunnelZones":"http://example.com/midonet-api/tunnel_zones",
  "tunnelZoneTemplate":"http://example.com/midonet-api/tunnel_zones/{id}",
  "vips":"http://example.com/midonet-api/vips",
  "vipTemplate":"http://example.com/midonet-api/vips/{id}",
  "vteps":"http://example.com/midonet-api/vteps",
  "vtepTemplate":"http://example.com/midonet-api/vteps/{id}"
}

This reveals that users can access the router resources using the URI /routers. Host resources are accessible with the URI /hosts. The response also includes information about the API version. The URIs with {id} in them are uri-templates, and they are explained later in this document.

Questions? Discuss on Mailing Lists or Chat.
Found an error? Report a bug.