Home
Version 3
Space Quota Definitions API

Space Quota Definitions API

Creating a Space Quota Definition

POST /v2/space_quota_definitions

Fields

Name Description Default Valid Values Example Values
name The name for the Space Quota Definition.
  • gold_quota
non_basic_services_allowed If a space can have non basic services
  • true
  • false
total_services How many services a space can have.
  • 5
  • 201
total_routes How many routes a space can have.
  • 10
  • 23
memory_limit How much memory in megabytes a space can have.
  • 5120
  • 10024
instance_memory_limit The maximum amount of memory in megabytes an application instance can have. (-1 represents an unlimited amount) -1
  • -1
  • 10024
organization_guid The owning organization of the space quota
  • guid-86be55e7-d088-4671-985b-e1b3d36bd0c6

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzIiwiZW1haWwiOiJlbWFpbC0yM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMwfQ.ZRFWtq7oXgeqbb5ScIOfG4ZTY7VL748ngC9f6xx8SMs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/space_quota_definitions

Body

{
  "name": "gold_quota",
  "non_basic_services_allowed": true,
  "total_services": 5,
  "total_routes": 10,
  "memory_limit": 5120,
  "organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e"
}

cURL

curl "https://api.[your-domain.com]/v2/space_quota_definitions" -d '{
  "name": "gold_quota",
  "non_basic_services_allowed": true,
  "total_services": 5,
  "total_routes": 10,
  "memory_limit": 5120,
  "organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzIiwiZW1haWwiOiJlbWFpbC0yM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMwfQ.ZRFWtq7oXgeqbb5ScIOfG4ZTY7VL748ngC9f6xx8SMs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/space_quota_definitions/3bc6b272-3e5a-4d0a-bc66-47e160042819
X-VCAP-Request-ID: 40b790d8-a2ed-4814-a4e2-d58c432ef90d
Content-Length: 656
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "3bc6b272-3e5a-4d0a-bc66-47e160042819",
    "url": "/v2/space_quota_definitions/3bc6b272-3e5a-4d0a-bc66-47e160042819",
    "created_at": "2014-11-05T01:02:10+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "gold_quota",
    "organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e",
    "non_basic_services_allowed": true,
    "total_services": 5,
    "total_routes": 10,
    "memory_limit": 5120,
    "instance_memory_limit": -1,
    "organization_url": "/v2/organizations/8f3e0743-7c2a-43ce-9398-f89ad12f881e",
    "spaces_url": "/v2/space_quota_definitions/3bc6b272-3e5a-4d0a-bc66-47e160042819/spaces"
  }
}