PUT
/
api
/
portal
/
policies
/
{id}
Update policy definition.
curl --request PUT \
  --url https://{tenant}/api/portal/policies/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "access_rights": {
    "Itachi API": {
      "allowed_urls": [
        {
          "methods": [
            "GET"
          ],
          "url": "/users"
        }
      ],
      "api_id": "8ddd91f3cda9453442c477b06c4e2da4",
      "api_name": "Itachi API",
      "disable_introspection": false,
      "versions": [
        "Default"
      ]
    }
  },
  "active": true,
  "hmac_enabled": false,
  "is_inactive": false,
  "key_expires_in": 2592000,
  "max_query_depth": -1,
  "meta_data": {
    "email": "itachi@tyk.io",
    "user_type": "mobile_user"
  },
  "name": "Sample policy",
  "partitions": {
    "acl": true,
    "complexity": false,
    "per_api": false,
    "quota": true,
    "rate_limit": true
  },
  "per": 60,
  "quota_max": 10000,
  "quota_renewal_rate": 3600,
  "rate": 1000,
  "tags": [
    "security",
    "messages"
  ],
  "throttle_interval": 10,
  "throttle_retry_limit": 10
}'
{
  "Message": "Data updated",
  "Meta": null,
  "Status": "OK"
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

id
string
required

ID of policy to update.

Body

application/json
_id
string
access_rights
object | null
active
boolean
date_created
string<date-time>
hmac_enabled
boolean
id
string
is_inactive
boolean
key_expires_in
integer
last_updated
string
max_query_depth
integer
meta_data
object | null
name
string
org_id
string
partitions
object
per
number
quota_max
integer
quota_renewal_rate
integer
rate
number
smoothing
object | null
tags
string[] | null
throttle_interval
number
throttle_retry_limit
integer

Response

Policy updated.

ID
string
Message
string
Meta
any
Status
string