Home
Version 3
Organization Quota Definitions API

Organization Quota Definitions API

Creating a Organization Quota Definition

POST /v2/quota_definitions

Fields

Name Description Default Valid Values Example Values
name The name for the Organization Quota Definition.
  • gold_quota
non_basic_services_allowed If an organization can have non basic services
  • true
  • false
total_services How many services an organization can have.
  • 5
  • 201
total_routes How many routes an organization can have.
  • 10
  • 23
memory_limit How much memory in megabyte an organization can have.
  • 5120
  • 9999
instance_memory_limit The maximum amount of memory in megabyte an application instance can have. (-1 represents an unlimited amount) -1
  • -1
  • 10240
  • 9999
trial_db_allowed If an organization can have a trial db.

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC02N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTM0fQ.R78kcXxB2utsI3DxetTGyu_z6pYtDTqW76l71-tBXE4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/quota_definitions

Body

{
  "name": "gold_quota",
  "non_basic_services_allowed": true,
  "total_services": 5,
  "total_routes": 10,
  "memory_limit": 5120,
  "instance_memory_limit": 10240
}

cURL

curl "https://api.[your-domain.com]/v2/quota_definitions" -d '{
  "name": "gold_quota",
  "non_basic_services_allowed": true,
  "total_services": 5,
  "total_routes": 10,
  "memory_limit": 5120,
  "instance_memory_limit": 10240
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC02N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTM0fQ.R78kcXxB2utsI3DxetTGyu_z6pYtDTqW76l71-tBXE4" \
	-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/quota_definitions/6862d058-9e28-4713-bf01-016b7d339440
X-VCAP-Request-ID: ee3e9e0e-2d02-4f25-bc74-6b0f7f57cfaf
Content-Length: 444
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "6862d058-9e28-4713-bf01-016b7d339440",
    "url": "/v2/quota_definitions/6862d058-9e28-4713-bf01-016b7d339440",
    "created_at": "2014-11-05T01:02:14+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "gold_quota",
    "non_basic_services_allowed": true,
    "total_services": 5,
    "total_routes": 10,
    "memory_limit": 5120,
    "trial_db_allowed": false,
    "instance_memory_limit": 10240
  }
}