Update key
PUT {{baseUrl}}/api/apis/:apiID/keys/:keyID
You can also manually add keys to Tyk using your own key-generation algorithm. It is recommended if using this approach to ensure that the OrgID being used in the API Definition and the key data is blank so that Tyk does not try to prepend or manage the key in any way.
Request Body
{"last_check"=>1421674410, "allowance"=>1000, "rate"=>1000, "per"=>60, "expires"=>1423684135, "quota_max"=>-1, "quota_renews"=>1421164189, "quota_remaining"=>-1, "quota_renewal_rate"=>60, "access_rights"=>{"39d2c98be05c424371c600bd8b3e2242"=>{"api_name"=>"Nitrous Test", "api_id"=>"39d2c98be05c424371c600bd8b3e2242", "versions"=>["Default"]}}, "org_id"=>"54b53d3aeba6db5c35000002", "oauth_client_id"=>"", "basic_auth_data"=>{"password"=>""}, "hmac_enabled"=>true, "hmac_string"=>""}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"api_model":{},"key_id":"eyJvcmciOiI1ZTlkOTU0NGExZGNkNjAwMDFkMGVkMjAiLCJpZCI6ImhlbGxvLXdvcmxkIiwiaCI6Im11cm11cjY0In0","data":{"last_check":1421674410,"allowance":1000,"rate":1000,"per":60,"expires":1423684135,"quota_max":-1,"quota_renews":1421164189,"quota_remaining":-1,"quota_renewal_rate":60,"access_rights":{"39d2c98be05c424371c600bd8b3e2242":{"api_name":"Nitrous Test","api_id":"39d2c98be05c424371c600bd8b3e2242","versions":["Default"]}}},"org_id":"54b53d3aeba6db5c35000002","oauth_client_id":"","basic_auth_data":{"password":""},"hmac_enabled":true,"hmac_string":""}