Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:24:29 +0000.
Sender:Ian Harris
.
Date:Thursday, 17 September 2015 15:16:55 UTC+1.
Hi,
I’m trying to manage keys for an API using the advanced management API. I am unable to list keys using the API
GET /api/apis/my_api_id/keys/ HTTP/1.1
User-Agent: curl/7.41.0
Host: XXX.XXX.XXX.XXX:3000
Accept: /
authorization: access_key_for_organisation_user
I just get an empty list returned.
{“data”:{“keys”:[]},“pages”:0}
But if I request a particular key I can get it returned.
GET /api/apis/my_api_id/keys/my_key_id HTTP/1.1
User-Agent: curl/7.41.0
Host: XXX.XXX.XXX.XXX:3000
Accept: /
authorization: access_key_for_organisation_user
{
“api_model”:{
},
"key_id":"my_key_id",
"data":{
"last_check":0,
"allowance":999,
"rate":1000,
"per":60,
"expires":0,
"quota_max":10000,
"quota_renews":1445012996,
"quota_remaining":9999,
"quota_renewal_rate":2520000,
"access_rights":{
"my_api_id":{
"api_name":"Test API",
"api_id":"my_api_id",
"versions":["Default"],
"allowed_urls":null
}
},
"org_id":"my_org_id",
"oauth_client_id":"",
"basic_auth_data":{
"password":""
},
"hmac_enabled":false,
"hmac_string":"",
"is_inactive":false,
"apply_policy_id":"",
"monitor":{
"trigger_limits":null
},
"meta_data":null,
"tags":null
}
}
Also if I create a portal developer how do I add a key to it? The syntax seems to be:
“api_keys”: {
“my_key_id”:“90568dfa”
}
What is the value in the “my_key_id” name:value pair?
Thanks,
Ian.