Create a policy.
Create a policy in your Tyk Instance.
Request body
Example request
{
"_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
}Response
Policy created.
Example response
{
"action": "modified",
"key": "b13d928b9972bd18",
"status": "ok"
}Changes
Changed in 7 of the 52 revisions of this API.91050
- ○
added the new optional request property
post_expiry_actionnew-optional-request-property
- ○
added the new optional request property
post_expiry_grace_periodnew-optional-request-property
- ○
- ○
the request property
access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothingbecame nullablerequest-property-became-nullable
- ○
the request property
access_rights/additionalProperties/limit/smoothingbecame nullablerequest-property-became-nullable
- ○
the request property
smoothingbecame nullablerequest-property-became-nullable
- ○
- ▲
the
_idrequest property type/format changed fromobject/tostring/request-property-type-changed
- ▲
the
key_expires_inrequest property type/format changed fromnumber/int64tointeger/int64request-property-type-changed
- ▲
the
max_query_depthrequest property type/format changed fromnumber/tointeger/request-property-type-changed
- ▲
the
throttle_retry_limitrequest property type/format changed fromnumber/tointeger/request-property-type-changed
- ●
removed the request property
access_rights/additionalProperties/limit/set_by_policyrequest-property-removed
- ○
added the new optional request property
access_rights/additionalProperties/allowance_scopenew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/allowed_typesnew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/disable_introspectionnew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/field_access_rightsnew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/limit/max_query_depthnew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/limit/smoothingnew-optional-request-property
- ○
added the new optional request property
access_rights/additionalProperties/restricted_typesnew-optional-request-property
- ○
the request property
access_rightsbecame nullablerequest-property-became-nullable
- ○
the request property
access_rights/additionalProperties/allowed_urlsbecame nullablerequest-property-became-nullable
- ○
the request property
access_rights/additionalProperties/allowed_urls/items/methodsbecame nullablerequest-property-became-nullable
- ○
the request property
access_rights/additionalProperties/versionsbecame nullablerequest-property-became-nullable
- ○
the request property
graphql_access_rightsbecame nullablerequest-property-became-nullable
- ○
the request property
meta_databecame nullablerequest-property-became-nullable
- ○
the request property
tagsbecame nullablerequest-property-became-nullable
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/perrequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/raterequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/delayrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/steprequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/thresholdrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing/triggerrequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/perrequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/quota_maxrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/quota_remainingrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/quota_renewal_raterequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/quota_renewsrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/raterequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/throttle_intervalrequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
the
access_rights/additionalProperties/limit/throttle_retry_limitrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
smoothing/delayrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
smoothing/steprequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
smoothing/thresholdrequest property type/format was generalized frominteger/int64tointeger/request-property-type-generalized
- ○
the
smoothing/triggerrequest property type/format was generalized fromnumber/doubletonumber/request-property-type-generalized
- ○
added the non-success response with the status
403response-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
- ▲
- ●
removed the request property
access_rights/additionalProperties/limit/smoothingrequest-property-removed
- ○
added the new optional request property
access_rights/additionalProperties/endpointsnew-optional-request-property
- ●
- ○
added the new optional request property
access_rights/additionalProperties/limit/smoothingnew-optional-request-property
- ○
added the new optional request property
smoothingnew-optional-request-property
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ●
removed the request property
access_rights/allowed_urlsrequest-property-removed
- ●
removed the request property
access_rights/api_idrequest-property-removed
- ●
removed the request property
access_rights/api_namerequest-property-removed
- ●
removed the request property
access_rights/limitrequest-property-removed
- ●
removed the request property
access_rights/versionsrequest-property-removed
- ●
- ▲
the request property
access_rightsbecame not nullablerequest-property-became-not-nullable
- ▲
the request property
graphql_access_rightsbecame not nullablerequest-property-became-not-nullable
- ▲
the request property
meta_databecame not nullablerequest-property-became-not-nullable
- ▲
the request property
tagsbecame not nullablerequest-property-became-not-nullable
- ▲
the
_idrequest property type/format changed fromstring/toobject/request-property-type-changed
- ●
removed the request property
post_expiry_actionrequest-property-removed
- ●
removed the request property
post_expiry_grace_periodrequest-property-removed
- ●
removed the request property
smoothingrequest-property-removed
- ○
added the new optional request property
access_rights/allowed_urlsnew-optional-request-property
- ○
added the new optional request property
access_rights/api_idnew-optional-request-property
- ○
added the new optional request property
access_rights/api_namenew-optional-request-property
- ○
added the new optional request property
access_rights/limitnew-optional-request-property
- ○
added the new optional request property
access_rights/versionsnew-optional-request-property
- ○
the
key_expires_inrequest property type/format was generalized frominteger/int64tonumber/int64request-property-type-generalized
- ○
the
max_query_depthrequest property type/format was generalized frominteger/tonumber/request-property-type-generalized
- ○
the
throttle_retry_limitrequest property type/format was generalized frominteger/tonumber/request-property-type-generalized
- ○
removed the non-success response with the status
403response-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
- ▲