Disclaimer: Please don’t upload files revealing your personal information.
Swagger documentation: https://gw.v2.iagon.com/api/v2/api-docs/
Desktop Application
- Install node for windows, mac and linux
Download app here - https://drive.google.com/drive/folders/1Ev_ObJAxpoRqEizffznRtOr6qsbwoxFl?usp=sharing - After installing the desktop application, you will be asked to register the node for that device.
3. Select a port you want the API to run.
4. Select a file path to store the files
5. It will take a few minutes to test if all the upload download files are working in the selected path.
6. You will get the authorization key, copy that authorization key and save it for future use.
7. You will get Node Id in Dashboard. You can use that node id for pinging, testing, uploading and downloading files.
APIs to Interact with nodes
Use this URL : https://gw.v2.iagon.com/api/v2/api-docs/?urls.primaryName=Interact%20with%20nodes
1. Creating a node
Description: This endpoint is used to register a node. The api takes the following request as below, and responds with an node id in the response which will be used for features like ping, test, upload and download files.
Syntax:
Requests:
CPU: CPU of the node
Read: File read speed per second.
Write: File write speed per second.
Storage: This is the storage type of a node.
Hostname: This is the IP address of the device if it will be hosted on the server like EC2 server.
Port: This is the Port that is used to run the API for uploading and downloading files from the device.
URL: This is the tunneling url to access the API of the node. This is generated programmatically.
City: City location of the Node.
Country: Country location of the Node.
Storage_capacity: Storage of the device.
Storage_path: File storage path for the uploaded files
RAM: RAM of the node
Response: on success it returns status code of 200 and node information as follow
Body:
2. Ping Node
Description: This endpoint is used to ping nodes to verify.
Syntax:
Request:
NodeId: Created Node Id
Response: on success it returns status code of 200 and response as follow
Body:
3. Test Node
Description: This endpoint is used to test if upload and download features are working in the node.
Syntax:
Request:
NodeId: Created Node Id
Response: on success it returns status code of 200 and response as follow
Body:
If the test is being conducted after the first time, the server returns a status code of 200 along with the following response (the authorizationKey is not returned in this case)
4. Upload To Node
Description: This endpoint is used to upload a single file to the node at a time..
Url: /upload
Syntax:
Request:
NodeId: Id of the node to which file is to be uploaded to
File: File to be uploaded
Filename: [optional] Optional filename that can be provided for the upload.
Response:
On success, the server returns a status code of 200 and response as follow
Body:
5. Download File From Node
Description: This endpoint is used to download a single file that has been uploaded by the user to the node.
Url: /download
Syntax:
curl -X 'GET' \ 'https://da.iagon.com/api/v1/download?nodeId=648969728067525562184a81&filename=Sharding.ipynb' \ -H 'accept: application/json'Request:
NodeId: Id of the node from which file is to be downloaded from.
Filename: Filename of the file that is to be downloaded.
Response:
On success, the server returns with a status code of 200 and the requested file.
6. Delete File From Node
Description: This endpoint is used to delete a single file that has been uploaded by the user to the node.
Url: /delete
Syntax:
Request:
NodeId: Id of the node to which file is to be uploaded to.
Filename: Filename of the file that is to be deleted.
Response:
On success, the server returns with a status code of 200, with the following response:
APIs to Sharding Features
URL: https://gw.v2.iagon.com/api/v2/api-docs/?urls.primaryName=Sharding
1. Encoding
Description: This endpoint is to encode a file and create 6 shards of that file. Download these files to test the decoding process. Currently this process handles files that are less than 40 MB.
Syntax:
Requests:
File: The path to a file to be encoded
Response: On success, the call to this endpoint will return with 200 and the following body:
Body
2. Decoding
Description: This endpoint is to combine shard files and create a file. Upload the downloaded shard files from the encoding API. Even if the 4 files out of 6 shard files are available it should complete the file. Make sure the files are named shard.0, shard.1, shard.2 and so on.
Syntax:
Requests:
Filename: Complete of the encoded file with it’s extension
File: Array of files
Response: On success, the call to this endpoint will return with 200 and the following body:
Body
What to test for?
- On Desktop Application test if
- The app can be installed in mac.
- The app can be installed in windows.
- The app can be installed in linux.
- A node can be registered.
- You are able to evaluate your node for storage.
- You are able to get system information like storage and read/write.
- You are able to generate authorization key
- You are able to copy authorization key
- You are able to continue to Dashboard.
- You are able to see your Node id.
- On API test if
- You can register a node from API.
- You can ping the node using Node id from the desktop application when the desktop application is running.
- You can test the node using Node id from the desktop application when the desktop application is running.
- You can upload files using Node id in the folder specified when registering the node.
- You can download files using Node id in blob format.
- You can delete the files from the folder specified using Node id.
- You can encode and shard a file upto 40MB and get 6 downloadable links of shard files.
- You can decode and get a file by uploading a minimum of 4 shard files you get from encoding API.