-
Notifications
You must be signed in to change notification settings - Fork 2
RESTful API N2
annypanny edited this page Nov 29, 2016
·
2 revisions
/nodes/create
- It used to create the nodes on our server.
- It returned a JSON.
- JSON file contains:
- "id"
- "username"
- "rcred_username"
- "node_url"
- "access_to_posts"
Method:
POST
Example:
GET /nodes/create/
HTTP 405 Method Not Allowed
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"detail": "Method \"GET\" not allowed."
}
after creating a new node, it would return:
POST /nodes/create/
HTTP 201 Created
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"id": 15,
"username": "sa",
"rcred_username": "test",
"node_url": "http://xwse.com",
"access_to_posts": false
}