Giter Site home page Giter Site logo

maxcdn / api-docs Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 12.0 11.67 MB

[Deprecated] Code and Data for MaxCDN's API Docs. New URL:

Home Page: https://github.com/MaxCDN/docs.maxcdn.com

License: MIT License

JavaScript 2.13% CSS 3.50% HTML 94.12% Makefile 0.26%

api-docs's People

Contributors

davidmmelin avatar eamonnscu avatar idabic avatar jdewald avatar jdorfman avatar jimaek avatar jmervine avatar m4r35 avatar mimic84 avatar ryandesign avatar tjasko avatar weaverhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-docs's Issues

Why you are not supported Java?

Hi,

I saw that you are supporting seven languages, but not Java. Is there any specific reason for doing that. Currently, I am working on a project where I want to flush MaxCDN cache using Java code, but there is no direct API support from your side. Is there any specific reason for not supporting java?

Regards
Ankur Chauhan

CURL ERROR: couldn't connect to host at rws.netdna.com:443

Hi, i'm trying this:

get('/account.json'); } catch(CurlException $e) { print_r($e->getMessage()); print_r($e->getHeaders()); } ... But returns: Fatal error: Uncaught exception 'NetDNA\RWSException' with message 'CURL ERROR: couldn't connect to host at rws.netdna.com:443 May you help me?

logs api endpoint returning inconsistent json

If you look at a logs result:

{
  "limit": 1,
  "next_page_key": "1403239656253",
  "page": 1,
  "records": [
    {
      "bytes": 1150,
      "cache_status": "HIT",
      "client_asn": "AS22773 Cox Communications Inc.",
      "client_city": "Irvine",
      "client_continent": "NA",
      "client_country": "US",
      "client_dma": "0",
      "client_ip": "98.189.223.98",
      "client_latitude": 33.7422981262207,
      "client_longitude": -117.76840209960938,
      "client_state": "CA",
      "company_id": 23761,
      "hostname": "cdn.mervine.net",
      "method": "GET",
      "origin_time": 0,
      "pop": "lax",
      "protocol": "HTTP/1.1",
      "query_string": "",
      "referer": "-",
      "scheme": "http",
      "status": 200,
      "time": "2014-06-20T04:47:36.253Z",
      "uri": "/bootstrap/favicon.ico",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36",
      "zone_id": 164197
    }
  ],
  "request_time": 6
}

Note that it's missing code and data keys that the other endpoints have...

e.g. /account.json/address

{
  "code": 200,
  "data": {
    "address": {
      "city": "Los Angeles",
      "country": "US",
      "date_created": "0000-00-00 00:00:00",
      "date_updated": "2014-06-20 05:11:20",
      "id": "23337",
      "state": "CA",
      "street1": "go-20140619221114034",
      "street2": "1401986788489_3",
      "zip": "91604"
    }
  }
}

Firefox Display Issues

The following elements/features are missing in Firefox:

  • Scrollspy
  • Code Example Colors
  • Search (Top Right)

maxcdn_-_api_docs-2

XSS Vulnerability

Even though it is a static site, it would be great if we removed this error:
http://docs.maxcdn.com/# "><img src=x onerror=prompt("JD");>

maxcdn_-_api_docs-8

"companyalias" all over

Looks like someone did an overzealous search and replace with url paths in the docs. I see {companyalias} in many endpoints where that should probably be {id}.

Swagger compliant

Hi, thanks for this. I have been looking for a good documentation engine for my API for some time.

May I suggest some features:

Swagger compliant
Instead of having to write all the docs manually and keeping two documentations for the API endpoints you could use the Swagger specification. This is what we use to create an interactive API console.

Not sure how this would work exactly, but maybe in the markdown code you can specify where to insert what API route data from Swagger based on its unique identifier. And it will generate the code for "Accepted Request Parameters", "Response parameters" etc. All this data already exists in Swagger.

This would hit two birds with one stone.

Support for multiple markdown files?
Is there a way to have multiple documentations, or do you have to fire up a nodejs server for each docs you want?

I'd like to host it like:
docs.domain1.com
docs.domain2.com

On the same nodejs server.

API: Mismatch types.

Hey,

This is actually a bug for the API itself, and not the docs. I noticed that when you make a request for "GET /zones/pull.json", the resulting object's "id" field is a "string", but when you POST or PUT changes to a specific zone "POST /zones/pull.json" (i.e. when creating a new zone) the resulting object's "id" field is an int. This doesn't matter most of the time, but when working in strictly typed languages (like Go wink wink nudge nudge), it becomes an issue.

The above does reflect the documentation @ http://docs.maxcdn.com/ ...

"GET /pull/zones.json"

{
    "code": 200,
    "data": {
        "current_page_size": 3,
        "page": 1,
        "page_size": "50",
        "pages": 1,
        "pullzones": [
            {
                "backend_compress": "0",
                "cache_valid": "1d",
                "canonical_link_headers": "0",
                "cdn_url": "cdn.somedomain.com",
                "compress": "1",
                "content_disposition": "0",
                "creation_date": "2013-05-15 20:45:44",
                "disallow_robots": "0",
                "disallow_robots_txt": null,
                "dns_check": "1",
                "expires": null,
                "hide_setcookie_header": "0",
                "id": "96061",
                "ignore_cache_control": "0",
                "ignore_setcookie_header": "0",
                "inactive": "0",
                "ip": "205.134.255.49",
                "label": "personal",
                "locked": "0",
                "name": "somedomain",
                "port": "80",
                "proxy_cache_lock": "0",
                "pseudo_streaming": "0",
                "queries": "1",
                "server_id": "18",
                "set_host_header": null,
                "sslshared": "0",
                "suspend": "0",
                "tmp_url": "somedomain.alias.netdna-cdn.com",
                "type": "2",
                "upstream_enabled": "0",
                "url": "http://somedomain.net",
                "use_stale": "0",
                "valid_referers": null
                "spdy": 0
            },
            <...>,
            {
                "backend_compress": "0",
                "cache_valid": "1d",
                "canonical_link_headers": "0",
                "cdn_url": "newpullzone3.alias.netdna-cdn.com",
                "compress": "0",
                "content_disposition": "0",
                "creation_date": "2013-05-24 16:18:19",
                "disallow_robots": "0",
                "disallow_robots_txt": null,
                "dns_check": "1",
                "expires": null,
                "hide_setcookie_header": "0",
                "id": "97312",
                "ignore_cache_control": "0",
                "ignore_setcookie_header": "0",
                "inactive": "0",
                "ip": "205.134.255.49",
                "label": null,
                "locked": "0",
                "name": "newpullzone3",
                "port": "80",
                "proxy_cache_lock": "0",
                "pseudo_streaming": "0",
                "queries": "1",
                "server_id": "18",
                "set_host_header": null,
                "sslshared": "0",
                "suspend": "0",
                "tmp_url": "newpullzone3.alias.netdna-cdn.com",
                "type": "2",
                "upstream_enabled": "0",
                "url": "http://somedomain.net",
                "use_stale": "0",
                "valid_referers": null
                "spdy": 1
            }
        ],
        "total": 3
    }
}

"POST /zones/pull.json"

{
    "code": 201,
    "data": {
        "pullzone": {
            "backend_compress": 0,
            "cache_valid": "1d",
            "canonical_link_headers": 1,
            "cdn_url": "newpullzone3.alias.netdna-cdn.com",
            "compress": 0,
            "content_disposition": 0,
            "creation_date": "2013-05-24 16:18:19",
            "disallow_robots": 0,
            "disallow_robots_txt": null,
            "dns_check": 0,
            "expires": null,
            "hide_setcookie_header": 0,
            "id": 97312,
            "ignore_cache_control": 0,
            "ignore_setcookie_header": 0,
            "inactive": 0,
            "ip": "205.134.255.49",
            "label": null,
            "locked": 0,
            "name": "newpullzone3",
            "port": 80,
            "proxy_cache_lock": 0,
            "pseudo_streaming": 0,
            "queries": "1",
            "server_id": "18",
            "set_host_header": 1,
            "sslshared": null,
            "suspend": 0,
            "tmp_url": "newpullzone3.alias.netdna-cdn.com",
            "type": 2,
            "upstream_enabled": 0,
            "url": "http://somedomain.net",
            "use_stale": 0,
            "x_forward_for": 0,
            "valid_referers": null
            "spdy": 1
        }
    }
}

Thanks,
Josh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.