Ok, so I tried submitting the following (obviously replacing the authorization key with the one for my own user - which I also set as admin, and also putting the correct API key for the API I have created in the system).
curl -X POST -H "authorization: 1238b7e0e2ff4c2957321724409ee2eb" \
-s \
-H "Content-Type: application/json" \
-X PUT \
-d '{
"allowance": 1000,
"rate": 1000,
"per": 1,
"expires": -1,
"quota_max": -1,
"quota_renews": 1449051461,
"quota_remaining": -1,
"quota_renewal_rate": 60,
"access_rights": {
"ad5004d961a147d4649fd3216694ebe2": {
"api_id": "ad5004d961a147d4649fd3216694ebe2",
"api_name": "test-api",
"versions": ["Default"]
}
},
"meta_data": {}
}' http://admin.cloud.tyk.io/api/keys/abcde1234567 | python -mjson.tool
However, I am getting the following error:
{
"Message": "Attempted access to non-owned key",
"Meta": null,
"Status": "Error"
}
What am I doing wrong?