You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficcontrol.apache.org by Amir Yeshurun <am...@qwilt.com> on 2017/01/23 12:14:38 UTC
Using Traffic Ops API
Hi,
According to the TO API documentation
https://trafficcontrol.incubator.apache.org/docs/latest/development/traffic_ops_api/v12/cdn.html
I try to get the list of CDNs using "GET /api/1.2/cdns"
In response, I get a 404 with a "Resource not found" message.
However, GET /api/1.2/cdns*.json* does return the list of CDNs
{"response":[{"name":"stage_cdn","id":"1"}]}
(Note the response is slightly different than documentation,
missing dnssecEnabled and lastUpdated fields)
Now, I am trying to get a specific CDN by id. Neither ""GET
/api/1.2/cdns/1" nor ""GET /api/1.2/cdns.json/1" work for me.
What am I missing?
Thanks
/amiry
Re: Using Traffic Ops API
Posted by Dewayne Richardson <de...@gmail.com>.
Hi Amir,
If we add a new feature to Traffic Ops then that is a new version, if the
API doesn't change there is no reason to increment the API version. We
want to minimize URL churn for our API consumers. In the future this API
versioning scheme may change slightly, but this is the way it is for 1.x
Thanks,
-Dewayne
On Mon, Jan 23, 2017 at 7:24 AM, Amir Yeshurun <am...@qwilt.com> wrote:
> Thanks Dave, I am using 1.7.
> This is not a real issue for me, but in this case, shouldn't the API
> version be incremented in TC 1.8?
>
>
> On Mon, Jan 23, 2017 at 3:43 PM Dave Neuman <ne...@apache.org> wrote:
>
>> Hey Amir,
>> Which version of Traffic Control are you using?
>> I just checked against 1.8 and master and /api/1.2/cdns works and the
>> dnssecEnabled and lastUpdated fields are there. I also tried
>> /api/1.2/cdns/1 and that works as well. If you are using an older
>> version you may need to try /api/1.2/cdns/1.json
>>
>> Thanks,
>> Dave
>>
>>
>> On Mon, Jan 23, 2017 at 5:14 AM, Amir Yeshurun <am...@qwilt.com> wrote:
>>
>> Hi,
>>
>> According to the TO API documentation
>>
>> https://trafficcontrol.incubator.apache.org/docs/
>> latest/development/traffic_ops_api/v12/cdn.html
>>
>> I try to get the list of CDNs using "GET /api/1.2/cdns"
>> In response, I get a 404 with a "Resource not found" message.
>> However, GET /api/1.2/cdns*.json* does return the list of CDNs
>> {"response":[{"name":"stage_cdn","id":"1"}]}
>>
>> (Note the response is slightly different than documentation,
>> missing dnssecEnabled and lastUpdated fields)
>>
>> Now, I am trying to get a specific CDN by id. Neither ""GET
>> /api/1.2/cdns/1" nor ""GET /api/1.2/cdns.json/1" work for me.
>>
>> What am I missing?
>>
>> Thanks
>> /amiry
>>
>>
>>
Re: Using Traffic Ops API
Posted by Amir Yeshurun <am...@qwilt.com>.
Thanks Dave, I am using 1.7.
This is not a real issue for me, but in this case, shouldn't the API
version be incremented in TC 1.8?
On Mon, Jan 23, 2017 at 3:43 PM Dave Neuman <ne...@apache.org> wrote:
> Hey Amir,
> Which version of Traffic Control are you using?
> I just checked against 1.8 and master and /api/1.2/cdns works and the
> dnssecEnabled and lastUpdated fields are there. I also tried
> /api/1.2/cdns/1 and that works as well. If you are using an older version
> you may need to try /api/1.2/cdns/1.json
>
> Thanks,
> Dave
>
>
> On Mon, Jan 23, 2017 at 5:14 AM, Amir Yeshurun <am...@qwilt.com> wrote:
>
> Hi,
>
> According to the TO API documentation
>
>
> https://trafficcontrol.incubator.apache.org/docs/latest/development/traffic_ops_api/v12/cdn.html
>
> I try to get the list of CDNs using "GET /api/1.2/cdns"
> In response, I get a 404 with a "Resource not found" message.
> However, GET /api/1.2/cdns*.json* does return the list of CDNs
> {"response":[{"name":"stage_cdn","id":"1"}]}
>
> (Note the response is slightly different than documentation,
> missing dnssecEnabled and lastUpdated fields)
>
> Now, I am trying to get a specific CDN by id. Neither ""GET
> /api/1.2/cdns/1" nor ""GET /api/1.2/cdns.json/1" work for me.
>
> What am I missing?
>
> Thanks
> /amiry
>
>
>
Re: Using Traffic Ops API
Posted by Dave Neuman <ne...@apache.org>.
Hey Amir,
Which version of Traffic Control are you using?
I just checked against 1.8 and master and /api/1.2/cdns works and the
dnssecEnabled and lastUpdated fields are there. I also tried /api/1.2/cdns/1
and that works as well. If you are using an older version you may need to
try /api/1.2/cdns/1.json
Thanks,
Dave
On Mon, Jan 23, 2017 at 5:14 AM, Amir Yeshurun <am...@qwilt.com> wrote:
> Hi,
>
> According to the TO API documentation
>
> https://trafficcontrol.incubator.apache.org/docs/
> latest/development/traffic_ops_api/v12/cdn.html
>
> I try to get the list of CDNs using "GET /api/1.2/cdns"
> In response, I get a 404 with a "Resource not found" message.
> However, GET /api/1.2/cdns*.json* does return the list of CDNs
> {"response":[{"name":"stage_cdn","id":"1"}]}
>
> (Note the response is slightly different than documentation,
> missing dnssecEnabled and lastUpdated fields)
>
> Now, I am trying to get a specific CDN by id. Neither ""GET
> /api/1.2/cdns/1" nor ""GET /api/1.2/cdns.json/1" work for me.
>
> What am I missing?
>
> Thanks
> /amiry
>