You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This spec describes the API that the API Agents should provide. A Cello API-Engine should be responsible for the node management by interacting with the resource manager like Docker or Kubernetes.


1​.  Rules to follow

  • All APIs by default start with a prefix of /api/v1/, e.g., to get the information of a specific network, you can use  GET network/<network-uuid>
  • The POST request is a JSON structure, like the following: key: value, }
  • The response is a JSON structure, like the following:

    {
    	status: ‘successful’ or ‘fail’
    	data: {} // useful data for the requestor
    	msg: ‘’ // additional messages when there’s error
    }



2.

3. Routes

3.1 Register organization and user  

POST api/v1/register/ #register organization and user(admin)

Body ParameterTypeNote
usernamestring
rolestring
passwordstring
passwrodAgainstring
orgNamestring
emailstring

Example Request Body:

{
    "username": "test",
    "role": "administrator",
    "password": "foo",
    "passwordAgain": "foo",
    "orgName": "org1.cello.com",
    "email": "foo@email.com"
}

Example Response Body:

{
    "data": {
        "id": "0b245629-06cf-4fa5-92d9-7109a3a64b56"
    },
    "msg": null,
    "status": "successful"
}



  • No labels