apic·u·late: ending abruptly in a small distinct point
Search, filter, and live-query your web service API documentation.
Apiculate is an HTML5 API documentation viewer that allows you to write up your endpoints in JSON, search them, filter them, and send live requests to your server.
Demo the Gist API as an apiculate view
Demo the apiculate src as an apiculate view
<script> tag into the HTML file.
<!-- your script goes here-->
<script>
window.apiculateConfig = {
//let's fill this with JSON!
endpoints: [
{
method: "GET",
url: "/index.html",
params: [
{
key: "cachebuster",
type: "Number",
example: 5
}
]
}
]
};
</script>
hosts |
Object |
The hosts property is a dictionary of URLs keyed by identifiers. This dictionary is used to compose request URLs when live-querying endpoints. Each endpoint can use any one of these identifiers. |
endpoints |
Array |
The endpoints property is simply an array of endpoints. |
method |
String |
The HTTP verb of the endpoint, e.g. GET or POST |
url |
String | The endpoint path. You can include dynamic parts of the path with the |
paths |
Object | This object maps an identifier to an object with data about dynamic parts of an endpoint's Valid types are:
The |
host |
String | The host of this endpoint. Defaults to 'local' which resolves to 'localhost'. You can add additional hosts by modifying the |
description |
String | |
token |
Boolean | This is a 'filter-flag' and is false by default. This is meant to signify whether an endpoint requires authorization. |
auth |
Boolean | This is a 'filter-flag' and is false by default. This is meant to signify whether an endpoint accepts a token as authorization. |
params |
Array | This is a list of query parameters for this endpoint. Each entry is a param object |
key |
String | The key in the key-value-pair of the query parameter. |
type |
String | The type of value. Can be one of the following:
|
apiDefault |
String | What the server uses as a default when omitted. |
description |
String | |
values |
Array | When the type is Array, this array contains possible values. |
optional |
Boolean | This is an indicator for whether or not the server requires this parameter. |