Policies

Get a policy.

You can retrieve details of a single policy by ID in your Tyk instance.

get/tyk/policies/{polID}

Path parameters

polIDstring required

You can retrieve details of a single policy by ID in your Tyk instance.

Response

Get details of a single policy.

_idstring
access_rightsobject nullable
activeboolean
enable_http_signature_validationboolean
graphql_access_rightsobject nullable
hmac_enabledboolean
idstring
is_inactiveboolean
key_expires_ininteger
last_updatedstring
max_query_depthinteger
meta_dataobject nullable
namestring
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_renewal_rateinteger
ratenumber double
tagsstring[] nullable
throttle_intervalnumber double
throttle_retry_limitinteger

Example response

{
  "_id": "5ead7120575961000181867e",
  "active": true,
  "id": "5ead7120575961000181867e",
  "last_updated": "1655965189",
  "max_query_depth": -1,
  "name": "Swagger Petstore Policy",
  "org_id": "5e9d9544a1dcd60001d0ed20",
  "partitions": {
    "acl": true,
    "quota": true,
    "rate_limit": true
  },
  "per": 60,
  "post_expiry_action": "delete",
  "quota_max": -1,
  "quota_renewal_rate": 3600,
  "rate": 1000,
  "throttle_interval": -1,
  "throttle_retry_limit": -1
}

Changes

Changed in 7 of the 52 revisions of this API.341119

    • added the optional property post_expiry_action to the response with the 200 status

      response-optional-property-added

    • added the optional property post_expiry_grace_period to the response with the 200 status

      response-optional-property-added

    • the response property access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing became nullable for the status 200

      response-property-became-nullable

    • the response property access_rights/additionalProperties/limit/smoothing became nullable for the status 200

      response-property-became-nullable

    • the response property smoothing became nullable for the status 200

      response-property-became-nullable

  • 111affa17abe2718See the full diff
    • added the new path request parameter polID

      new-request-path-parameter

    • the response property access_rights became nullable for the status 200

      response-property-became-nullable

    • the response property access_rights/additionalProperties/allowed_urls became nullable for the status 200

      response-property-became-nullable

    • the response property access_rights/additionalProperties/allowed_urls/items/methods became nullable for the status 200

      response-property-became-nullable

    • the response property access_rights/additionalProperties/versions became nullable for the status 200

      response-property-became-nullable

    • the response property graphql_access_rights became nullable for the status 200

      response-property-became-nullable

    • the response property meta_data became nullable for the status 200

      response-property-became-nullable

    • the response property tags became nullable for the status 200

      response-property-became-nullable

    • the _id response's property type/format changed from object/ to string/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/per response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/rate response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/delay response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/step response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/threshold response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/trigger response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/per response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/quota_max response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/quota_remaining response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/quota_renewal_rate response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/quota_renews response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/rate response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/throttle_interval response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • the access_rights/additionalProperties/limit/throttle_retry_limit response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the smoothing/delay response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the smoothing/step response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the smoothing/threshold response's property type/format changed from integer/int64 to integer/ for status 200

      response-property-type-changed

    • the smoothing/trigger response's property type/format changed from number/double to number/ for status 200

      response-property-type-changed

    • removed the optional property access_rights/additionalProperties/limit/set_by_policy from the response with the 200 status

      response-optional-property-removed

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the optional property access_rights/additionalProperties/allowance_scope to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/allowed_types to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/disable_introspection to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/field_access_rights to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/limit/max_query_depth to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/limit/smoothing to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/restricted_types to the response with the 200 status

      response-optional-property-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 optional property access_rights/additionalProperties/limit/smoothing from the response with the 200 status

      response-optional-property-removed

    • added the optional property access_rights/additionalProperties/endpoints to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/additionalProperties/limit/smoothing to the response with the 200 status

      response-optional-property-added

    • added the optional property smoothing to the response with the 200 status

      response-optional-property-added

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

    • removed the optional property access_rights/allowed_urls from the response with the 200 status

      response-optional-property-removed

    • removed the optional property access_rights/api_id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property access_rights/api_name from the response with the 200 status

      response-optional-property-removed

    • removed the optional property access_rights/limit from the response with the 200 status

      response-optional-property-removed

    • removed the optional property access_rights/versions from the response with the 200 status

      response-optional-property-removed

  • 111d8ca21864446See the full diff
    • the _id response's property type/format changed from string/ to object/ for status 200

      response-property-type-changed

    • the key_expires_in response's property type/format changed from integer/int64 to number/int64 for status 200

      response-property-type-changed

    • the max_query_depth response's property type/format changed from integer/ to number/ for status 200

      response-property-type-changed

    • the throttle_retry_limit response's property type/format changed from integer/ to number/ for status 200

      response-property-type-changed

    • deleted the path request parameter polID

      request-parameter-removed

    • removed the optional property post_expiry_action from the response with the 200 status

      response-optional-property-removed

    • removed the optional property post_expiry_grace_period from the response with the 200 status

      response-optional-property-removed

    • removed the optional property smoothing from the response with the 200 status

      response-optional-property-removed

    • removed the non-success response with the status 403

      response-non-success-status-removed

    • added the optional property access_rights/allowed_urls to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/api_id to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/api_name to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/limit to the response with the 200 status

      response-optional-property-added

    • added the optional property access_rights/versions to the response with the 200 status

      response-optional-property-added

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