Organisation Quotas

Update Organisation Key

This work similar to Keys API except that Key ID is always equals Organisation ID

For Gateway v2.6.0 onwards, you can now set rate limits at the organisation level by using the following fields - allowance and rate. These are the number of allowed requests for the specified per value, and need to be set to the same value. If you don't want to have organisation level rate limiting, set rate or per to zero, or don't add them to your request.

put/tyk/org/keys/{keyID}

Path parameters

keyIDstring required

The Key ID

Query parameters

reset_quota'1'

Adding the reset_quota parameter and setting it to 1, will cause Tyk reset the organisations quota in the live quota manager, it is recommended to use this mechanism to reset organisation-level access if a monthly subscription is in place.

Request body

access_rightsobject nullable
aliasstring
allowancenumber double
apply_policiesstring[] nullable
apply_policy_idstring

deprecated use apply_policies going forward instead to send a list of policies ids

certificatestring
data_expiresinteger
date_createdstring date-time
enable_detail_recordingboolean

deprecated use enable_detailed_recording going forward instead

enable_detailed_recordingboolean
enable_http_signature_validationboolean
expiresinteger
hmac_enabledboolean
hmac_stringstring
id_extractor_deadlineinteger
is_inactiveboolean
last_checkinteger
last_updatedstring
max_query_depthinteger
meta_dataobject nullable
oauth_client_idstring
oauth_keysobject nullable
org_idstring
pernumber double
post_expiry_action'retain' | 'delete'

Defines the action to take on a Session in Redis after it expires. Valid values are "retain" and "delete".

post_expiry_grace_periodinteger

Duration in seconds to retain a Session in Redis after it expires. Used with post_expiry_action "retain". Set to -1 to retain indefinitely.

quota_maxinteger
quota_remaininginteger
quota_renewal_rateinteger
quota_renewsinteger
ratenumber double
rsa_certificate_idstring
session_lifetimeinteger
tagsstring[] nullable
throttle_intervalnumber double
throttle_retry_limitinteger

Example request

{
  "alias": "portal-developer@example.org",
  "allowance": 1000,
  "apply_policies": [
    "641c15dd0fffb800010197bf"
  ],
  "apply_policy_id": "641c15dd0fffb800010197bf",
  "date_created": "2024-03-13T03:56:46.568042549Z",
  "enable_detailed_recording": true,
  "expires": 1712895619,
  "last_updated": "1710302206",
  "max_query_depth": -1,
  "meta_data": {
    "tyk_developer_id": "62b3fb9a1d5e4f00017226f5"
  },
  "monitor": {
    "trigger_limits": [
      80,
      60,
      50
    ]
  },
  "org_id": "5e9d9544a1dcd60001d0ed20",
  "per": 5,
  "post_expiry_action": "delete",
  "quota_max": 20000,
  "quota_remaining": 20000,
  "quota_renewal_rate": 31556952,
  "quota_renews": 1710302205,
  "rate": 1,
  "tags": [
    "edge",
    "edge-eu"
  ],
  "throttle_interval": 10,
  "throttle_retry_limit": 1000
}

Response

OK

actionstring
keystring
key_hashstring
statusstring

Example response

{
  "action": "modified",
  "key": "b13d928b9972bd18",
  "status": "ok"
}

Changes

Changed in 6 of the 52 revisions of this API.221962

    • added the new optional request property post_expiry_action

      new-optional-request-property

    • added the new optional request property post_expiry_grace_period

      new-optional-request-property

    • the request property access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing became nullable

      request-property-became-nullable

    • the request property access_rights/additionalProperties/limit/smoothing became nullable

      request-property-became-nullable

    • the request property smoothing became nullable

      request-property-became-nullable

  • 111affa17abe2147See the full diff
    • added the new path request parameter keyID

      new-request-path-parameter

    • the meta_data/additionalProperties/ request property type/format changed from object/ to /

      request-property-type-changed

    • removed the request property access_rights/additionalProperties/limit/set_by_policy

      request-property-removed

    • added the new optional request property access_rights/additionalProperties/allowance_scope

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/allowed_types

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/disable_introspection

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/field_access_rights

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/limit/max_query_depth

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/limit/smoothing

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/restricted_types

      new-optional-request-property

    • added the new optional request property date_created

      new-optional-request-property

    • added the new optional request property enable_detailed_recording

      new-optional-request-property

    • added the new optional request property enable_http_signature_validation

      new-optional-request-property

    • added the new optional request property max_query_depth

      new-optional-request-property

    • added the new optional request property rsa_certificate_id

      new-optional-request-property

    • the request property access_rights became nullable

      request-property-became-nullable

    • the request property access_rights/additionalProperties/allowed_urls became nullable

      request-property-became-nullable

    • the request property access_rights/additionalProperties/allowed_urls/items/methods became nullable

      request-property-became-nullable

    • the request property access_rights/additionalProperties/versions became nullable

      request-property-became-nullable

    • the request property apply_policies became nullable

      request-property-became-nullable

    • the request property meta_data became nullable

      request-property-became-nullable

    • the request property monitor/trigger_limits became nullable

      request-property-became-nullable

    • the request property oauth_keys became nullable

      request-property-became-nullable

    • the request property tags became nullable

      request-property-became-nullable

    • request property apply_policy_id deprecated

      request-property-deprecated

    • request property enable_detail_recording deprecated

      request-property-deprecated

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/per request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/rate request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/delay request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/step request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/threshold request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/trigger request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/per request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/quota_max request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/quota_remaining request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/quota_renewal_rate request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/quota_renews request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/rate request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/throttle_interval request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the access_rights/additionalProperties/limit/throttle_retry_limit request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the monitor/trigger_limits/items/ request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the smoothing/delay request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the smoothing/step request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the smoothing/threshold request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • the smoothing/trigger request property type/format was generalized from number/double to number/

      request-property-type-generalized

    • the throttle_retry_limit request property type/format was generalized from integer/int64 to integer/

      request-property-type-generalized

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 500

      response-non-success-status-added

    This revision also has 28 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 31989871353c11See the full diff
    • removed the request property access_rights/additionalProperties/limit/smoothing

      request-property-removed

    • added the new optional request property access_rights/additionalProperties/endpoints

      new-optional-request-property

    • added the new optional request property access_rights/additionalProperties/limit/smoothing

      new-optional-request-property

    • added the new optional request property smoothing

      new-optional-request-property

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 111d8ca2186420177See the full diff
    • the request property access_rights became not nullable

      request-property-became-not-nullable

    • the request property access_rights/additionalProperties/allowed_urls became not nullable

      request-property-became-not-nullable

    • the request property access_rights/additionalProperties/allowed_urls/items/methods became not nullable

      request-property-became-not-nullable

    • the request property access_rights/additionalProperties/versions became not nullable

      request-property-became-not-nullable

    • the request property apply_policies became not nullable

      request-property-became-not-nullable

    • the request property meta_data became not nullable

      request-property-became-not-nullable

    • the request property monitor/trigger_limits became not nullable

      request-property-became-not-nullable

    • the request property oauth_keys became not nullable

      request-property-became-not-nullable

    • the request property tags became not nullable

      request-property-became-not-nullable

    • the access_rights/additionalProperties/limit/per request property type/format changed from number/ to number/double

      request-property-type-changed

    • the access_rights/additionalProperties/limit/quota_max request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • the access_rights/additionalProperties/limit/quota_remaining request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • the access_rights/additionalProperties/limit/quota_renewal_rate request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • the access_rights/additionalProperties/limit/quota_renews request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • the access_rights/additionalProperties/limit/rate request property type/format changed from number/ to number/double

      request-property-type-changed

    • the access_rights/additionalProperties/limit/throttle_interval request property type/format changed from number/ to number/double

      request-property-type-changed

    • the access_rights/additionalProperties/limit/throttle_retry_limit request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • the meta_data/additionalProperties/ request property type/format changed from / to object/

      request-property-type-changed

    • the monitor/trigger_limits/items/ request property type/format changed from number/ to number/double

      request-property-type-changed

    • the throttle_retry_limit request property type/format changed from integer/ to integer/int64

      request-property-type-changed

    • deleted the path request parameter keyID

      request-parameter-removed

    • removed the request property access_rights/additionalProperties/allowance_scope

      request-property-removed

    • removed the request property access_rights/additionalProperties/allowed_types

      request-property-removed

    • removed the request property access_rights/additionalProperties/disable_introspection

      request-property-removed

    • removed the request property access_rights/additionalProperties/endpoints

      request-property-removed

    • removed the request property access_rights/additionalProperties/field_access_rights

      request-property-removed

    • removed the request property access_rights/additionalProperties/limit/max_query_depth

      request-property-removed

    • removed the request property access_rights/additionalProperties/limit/smoothing

      request-property-removed

    • removed the request property access_rights/additionalProperties/restricted_types

      request-property-removed

    • removed the request property date_created

      request-property-removed

    • removed the request property enable_detailed_recording

      request-property-removed

    • removed the request property enable_http_signature_validation

      request-property-removed

    • removed the request property max_query_depth

      request-property-removed

    • removed the request property post_expiry_action

      request-property-removed

    • removed the request property post_expiry_grace_period

      request-property-removed

    • removed the request property rsa_certificate_id

      request-property-removed

    • removed the request property smoothing

      request-property-removed

    • added the new optional request property access_rights/additionalProperties/limit/set_by_policy

      new-optional-request-property

    • request property apply_policy_id reactivated

      request-property-reactivated

    • request property enable_detail_recording reactivated

      request-property-reactivated

    • removed the non-success response with the status 400

      response-non-success-status-removed

    • removed the non-success response with the status 403

      response-non-success-status-removed

    • removed the non-success response with the status 404

      response-non-success-status-removed

    • removed the non-success response with the status 500

      response-non-success-status-removed

    This revision also has 155 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog