Get Started with the Devstash API

With the Devstash api you can extract new posts, trending posts, and comments (as well as the data associated with a post and a comment). Note that I am willing to change the api to make it easier if any part of it is confusing. Please send your feedback or bug reports to bugs[AT]devstash.io. Thank you.

Quick Start

The Devstash API is a RESTful API, uses HTTP Basic Authentication (using your api key), and always returns responses in JSON. All you’ll need to interact with the Devstash API are your favourite HTTP library and a JSON parser. The examples in the following tutorial are presented using cURL.

Before getting started with the quick start tutorial down below, please obtain an API key. You also need to be logged in.
Get API Key
Authenticating

Currently there is only one authentication method for the API—HTTP Basic authentication. Simply enter your username on Devstash as your username and your API Key as the password. Below is an example of authenticating using curl. Note that '111111111111111111111111' represents the key in this example and 'username' represents the username. Note to proceed with this tutorial you will need an api key. :


Example of getting newest post (using curl)
curl -u guled:111111111111111111111111 -i -X GET https://devstash.io/api/newest
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 09 Jun 2016 16:15:23 GMT
Content-Type: application/json
Content-Length: 75
Connection: keep-alive
{
	"newest_posts": [
		745,
		744,
		743,
		742,
		741
	]
}
				

Rate Limits

For each of the api endpoints there is a limit of 1000 requests per hour.


Devstash API announcment
I am happy to announce that the Devstash API has finally been released! Go check it out and spread the word!
Devstash App!
The latest from Devstash at the reach of your fingertips!