KnetSpace - Rothamsted/knetminer GitHub Wiki

KnetSpace

KnetSpace is a web app that enables users to store KnetMiner Knetworks and associated metadata. They can then share this with other users to collaborate on the Knetwork.

KnetSpace is currently in beta phase. As such, this section of the wiki will currently be incomplete, pending a future update for when we move to a later development stage. However, endpoints are explained below.

Endpoints

All endpoints consume/produce JSON and have content-type application/json. Note that KnetSpace is currently hosted on https://knetminer/beta/knetspace - therefore, you must append any of the API endpoints to this URL (until this URL changes as we move our development stage).

users

POST /users/ (with JSON body) - create a new user (only superuser can do this)
PUT /users/{id}/ (with JSON body) - overwrite a user in full
PATCH /users/{id}/ (with JSON body) - update specific parts of a user, e.g. their password
GET /users/ - list all users
GET /users/{id}/ - retrieve specific user in full
GET /api/v1/me - retrieve users login details for KnetSpace, including what plan they are on

networks

POST /networks/ (with JSON body) - create a new network
PUT /networks/{id}/ (with JSON body) - overwrite a network in full
PATCH /networks/{id}/ (with JSON body) - update specific parts of a network
GET /networks/ - list all networks
GET /networks/{id}/ - retrieve specific network in full
GET /networks/{id}/summary - retrieve network metadata only
GET /networks/{id}/thumbnail - will respond with a file attachment of the network PNG or 404 if none provided
POST or PUT /networks/{id}/thumbnail - will create/overwrite the network thumbnail using the file named 'file' in the body, which should be a standard HTML form encoding
POST /networks/search/ (with JSON body describing search terms) - run a search for networks matching the search fields. *TODO* Not yet implemented in full, currently will always return all networks.

/auth/jwt/
POST body: {"username": "...", "password": "..."}
Returns a JSON message containing the JWT token in the "access" field. Other fields in the response contain refresh and validation data.