-
Notifications
You must be signed in to change notification settings - Fork 2
RESTful API N1
annypanny edited this page Nov 29, 2016
·
1 revision
/nodes
-
It used to get the content of all the nodes on our server.
-
It returned a JSON.
-
JSON file contains:
- "count"
- "next"
- "previous"
- "results"
and in each "results", it has:
- "id"
- "username"
- "rcred_username"
- "node_url"
- "access_to_posts"
Method:
GET
Example:
GET /nodes/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"count": 4,
"next": null,
"previous": null,
"results": [
{
"id": 11,
"username": "ssrapp",
"rcred_username": "ssrapp",
"node_url": "http://ssrapp.herokuapp.com",
"access_to_posts": true
},
{
"id": 12,
"username": "bloggyblog",
"rcred_username": "bloggyblog",
"node_url": "http://api-bloggyblog404.herokuapp.com",
"access_to_posts": true
},
{
"id": 13,
"username": "localhost",
"rcred_username": "localhost",
"node_url": "http://127.0.0.1:8000",
"access_to_posts": true
},
{
"id": 14,
"username": "herokulocalhost",
"rcred_username": "localhost",
"node_url": "http://socialnets404.herokuapp.com",
"access_to_posts": true
}
]
}