maxcdn / rws-bugs Goto Github PK
View Code? Open in Web Editor NEWA Public Bug/Issue Tracker for MaxCDN REST API (REST Web Services)
Home Page: http://docs.maxcdn.com
A Public Bug/Issue Tracker for MaxCDN REST API (REST Web Services)
Home Page: http://docs.maxcdn.com
I have noticed recent changes to the CDN API, primarily the addition of 'customdomains' and the 'cdn_url' response changing to the 'ssl_url' response value when shared SSL is enabled. I am working to update our API implementation to best support the current changes, and hopefully future intent as I'm not sure what exists in its current state is completed. The 'cdn_url', 'tmp_url', and 'ssl_url' of 'getZone' are no longer listed as documented responses under the API documentation, should these considered to be depreciated and later to be removed ?
While the 'ssl_url' is listed under 'customdomains' as type 'pull-ssl' (at least for pull zones, which is what I use) and custom domains with type 'null' , the temp url is not listed under custom domains at all. Will this always be the case ?
It might be nice to actually label the 'custom domains' as 'pull-custom' and equally include the 'tmp_url' as 'pull-temp', and in the case of a custom ssl 'pull-customssl' or similar, so that all potential URLS are made available.
Additionally, it would be nice if 'customdomains' included as a sub-array of the getZone request to circumvent the need for a secondary request for the initial population of zone data to on page panels.
Furthermore, it would equally be nice if you guys would at the very least inform us somehow, either via blog or e-mail notification, or otherwise that changes have occurred to the API, especially when they can fault an application (as the above / recent change has). Ultimately, a versioning protocol would be ultimately beneficial.
I would very much appreciate an answer to the above questions and concerns.
I'm seeing the following error every couple of days when we make an API call to purge a file from the CDN:
The request was aborted: Could not create SSL/TLS secure channel
Always seems to clear itself up after a few minutes (or less), and we have a recovery process (daemon) in place to retry the purge call, so it hasn't affected us much. Worth noting as a minor issue, though, just in case someone has time to track it down.
Is this active I seem to have trouble getting a response? Do you have any sample php code?
Will the REST API have an endpoint for clearing everything in a pull zone? The existing XML-RPC API has a command for purging the entire pull zone -- cache.purgeAllCache -- and I'm not finding an equivalent for the new REST API.
I've been doing some testing on our staging server, and (oddly enough) passing a wildcard for the filename does seem to be working. I think.
https://rws.netdna.com/[company alias]/zones/pull.json/[zone ID]/cache
file=.
If there aren't any plans for supporting the REST equivalent of cache.purgeAllCache and you don't plan to eliminate support for wildcards, then this issue becomes moot.
But if wildcards really aren't working (although testing seems to indicate otherwise) then we'll need an endpoint that does purge the entire pull zone.
Receiving this error message when trying to create a pull zone with the new api:
HTTPSConnectionPool(host='rws.netdna.com', port=443): Max retries exceeded with url.
I'm calling the API from Google App Engine (python), and I'm wondering if it has to do with this:
Installing NetDNA Python Client
Before you can properly install the NetDNA Python client program, some packages need to be present in your system. Make sure that requests and certifi packages are already installed. Requests is an HTTP library written in Python while he certifi package is an SSL library.
Any clues how to get around this on google app engine? Also, I'm able to use the old API just fine, and I'm also able to purge the cache and get pull zone information without any errors.
Any idea why code that hasn't been touched since 30MAY13 (when I had to change the API credentials) is suddenly returning this JSON response:
{"code":500,"error":{"message":"Invalid signature","type":"RWS\Exception"}}
Invalid signature? Huh? What? Do I need to rewrite something on my end?
Jerry (Dazed And Confused) H.
The example at https://github.com/MaxCDN/php-maxcdn demonstrates purging with a file
parameter.
$params = array('file' => '/robots.txt');
echo $api->delete('/zones/pull.json/6055/cache', $params);
The documentation at https://docs.maxcdn.com/#purge-cache lists only a files
parameter.
DELETE https://rws.maxcdn.com/{companyalias}/zones/pull.json/{zone_id}/cache
Parameters:
files
: ...
The PHP example at https://docs.maxcdn.com/#purge-cache demonstrates both a file
and a files
parameter:
//Purge File
$params = array('file'=>'/index.html');
$api->delete('/zones/pull.json/'.$id.'/cache',$params);
//Purge Files
$params = array( 'files' => array(
'/file1.txt',
'/file2.txt'
) );
$api->delete('/zones/pull.json/'.$id.'/cache',$params);
The Node and Python implementations both exclusively use a files
parameter internally at https://github.com/MaxCDN/node-maxcdn/ and https://github.com/MaxCDN/python-maxcdn, but then the example in the README of https://github.com/MaxCDN/python-maxcdn shows a file
parameter again:
api.delete("/zones/pull.json/77573/cache", data={'file': '/my-file.png'})
I assume that both work, in which case it would be nice if this were documented so that customers don't waste time debugging whether the problem might be due to file
vs files
.
Hi,
I am trying to fetch some statistics related to individual files served via osscdn. So far I've tried the following:
Both yield
{ code: 200,
data:
{ page: 1,
pages: 0,
page_size: '50',
current_page_size: 0,
total: '0',
statsbyfilename: [],
summary:
{ '200': null,
'206': null,
'404': null,
hit: null,
size: null,
'2xx': null,
'3xx': null,
'4xx': null,
'5xx': null } } }
That isn't very useful. Can you please tell me what that client_id
refers to and how to attain it? The examples seem to use blank there.
A couple of other notes:
List Stats By File Name and Zone Id
appears to be broken/disabled. The example response appears to be Non functional
. It took a while for me to notice that. If it doesn't work why to have it in the documentation in the first place?Hi
I was refered to this forum from the maxcdn support, as i have issus with creating pullzones and setting custom ip adress using the api.
In the api documentatiopn it says
ip - length: 1-10 chars, only digits accepted Valid IP address of the Origin URL. If omitted, the service will try to lookup the IP automatically. 1.0
The question is, how do i provide an ip adresse only using digits and max 10 characters ? 100.100.100.100 is alone 12 digits and 3 .´s
I have tried the following calls
require_once('NetDNA.php');
$api = new NetDNA("bloggersdelight","secret","secret");
try {
$params = array('name' => 'tonnytest6',
'url' => 'http://erdettirsdag.dk',
'ip' => '86.48.100.46',
'compress' => '1',
'use_stale' => '1',
'expires' => '12M');
echo $api->post('/zones/pull.json',$params);
} catch(CurlException $e) {
print_r($e->getMessage());
print_r($e->getHeaders());
}
and also tried sending the ip as decimal
require_once('NetDNA.php');
$api = new NetDNA("bloggersdelight","secret","secret");
try {
$params = array('name' => 'tonnytest6',
'url' => 'http://erdettirsdag.dk',
'ip' => ip2long('86.48.100.46'),
'compress' => '1',
'use_stale' => '1',
'expires' => '12M');
echo $api->post('/zones/pull.json',$params);
} catch(CurlException $e) {
print_r($e->getMessage());
print_r($e->getHeaders());
}
both just sets the ip adresse to the resolve ip of the erdettirsdag.dk domain. I need to specifi another ip as we have a dedicated server for providing assets to pull zones.
Hey,
I've been running some tests in both ruby and node and I'm seeing 20 - 30 seconds on getting a response from POST and DELETE methods. Oddly, when posting a new pull zone, it seems to show up in the web interface almost immediately, but the response doesn't come back quickly.
GET and PUT requests seem to be fine.
Cheers,
Josh
This seemed to break either today or in the past couple of days. I'm getting 500 errors for this URL:
http://maxcdn.claarware.com/wsAJAX.asmx/js
the source URL, which works fine, is
Hi,
Do you have a golang client or this there any reliable one developers can you to access your service ?
Thank you.
When I call the Delete Pull Zone method, here is the exact log output. Nothing gets removed
"DELETE /amanelis/zones/pull.json/69056? HTTP/1.1" 200 22 "-" "OAuth gem v0.4.6"
Here is the code I'm using to call the method:
https://github.com/amanelis/netdna2/blob/master/lib/netdna2/zones.rb#L225
Forgive me for the options={} param on the delete, that will be removed on the next commit.
Hi,
On the Raw Logs API Documentation it says:
Response Field | Description |
---|---|
request_time | Time in milliseconds for request to complete |
origin_time | How long it takes MaxCDN to retrieve the file (if cache status was a MISS) |
As I understand it, that means request time is how long it took to serve the content to the browser, and origin time is the time required to load the resource from upstream in case of a cache miss. Please let me know if I've misunderstood here :)
When looking through the values returned from the API, I see the following:
HIT
s have a request_time
of zero. I did see a few that had decimal results like 0.044
.MISS
es, both request_time
and origin_time
are in the 0.xx range.For example, using the ruby client:
[29] pry(main)> client.get('v3/reporting/logs.json', limit: 5, status: '200',
cache_status: 'MISS')['records'].
map { |r| [r['request_time'], r['origin_time']] }
=> [[0.052, 0.052],
[0.018, 0.018],
[0.581, 0.58],
[0.048, 0.048],
[0.035, 0.035]]
As a result I have several questions/issues:
HIT
s zero? Even if these units are seconds I would expect to see response times in the low milliseconds. a recorded response time of zero is not useful for tracking performance.Hi,
Would it be possible to add an API call that checks whether a particular push zone upload has been synchronised to the edges?
I'd like to build a small web service app to manage installer downloads of some software. I'd like to be able to transfer the newest installer via SFTP to our master fileserver. The app would detect new content and upload it via API calls to a NetDNA/MaxCDN push zone. Then when users request the installer, the app would know somehow whether the content has been pushed out to all edge servers or not. Probably by running a recurring task that checks the NetDNA API from time to time if pending syncs are complete. If the file has been synced to the edges, the small app forwards users that are requesting downloads to the push zone CDN download. If not, the requested downloads are served directly from the master fileserver.
Any ideas on how to best accomplish something like this would also be most appreciated.
(This could be handled in JavaScript client-side I guess by just trying to download the file from the CDN, but I'd actually really like to do this in a minimal server-side app. Feel it would be more robust against silly outdated browsers.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.