This is the Skywire Whitelisting and Miner service. It also provides access to some User System APIs in order to properly associate miners with existing users.
Version: 1.0
This is a Skywire User System service.
List all users
Method for admins to get list of all users
Code | Description | Schema |
---|---|---|
200 | OK | [ whitelist.User ] |
500 | Internal Server Error | api.ErrorResponse |
Enable user to submit whitelist applications
Method for admins to enable user to submit whitelist
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | query | User email | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.User |
400 | Bad Request | api.ErrorResponse |
Retrieve signed in User's info
Information about currently signed in user is collected and returned as response.
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.User |
401 | Unauthorized | api.ErrorResponse |
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
List all miners
Method for admins to get list of all miners
Code | Description | Schema |
---|---|---|
200 | OK | [ whitelist.Miner ] |
500 | Internal Server Error | api.ErrorResponse |
Gets import data
If available, returns miner import data
Code | Description | Schema |
---|---|---|
404 | Not Found | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Updates import data
Updates miner import data with information from request
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
importedData | body | Request containing data for update | Yes | object |
Code | Description | Schema |
---|---|---|
200 | OK | string |
422 | Unprocessable Entity | api.ErrorResponse |
Process import data
Import users and miners from import data request
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
importedData | body | Request containing data for importing | Yes | object |
Code | Description | Schema |
---|---|---|
200 | OK | string |
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Get specific miner for admin
Returns miner for given miner id
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
Id | query | Miner's Id | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.Miner |
400 | Bad Request | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Update miner data
Update specific miner according to request data
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
updateMinerReq | body | Request for updating miner | Yes | object |
Code | Description | Schema |
---|---|---|
200 | ||
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Removes miner
Removes miner for given id
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | query | ID of miner to be removed | Yes | string |
Code | Description | Schema |
---|---|---|
200 | ||
500 | Internal Server Error | api.ErrorResponse |
List user's miners
Returns a list of miners under current user
Code | Description | Schema |
---|---|---|
200 | OK | [ whitelist.Miner ] |
500 | Internal Server Error | api.ErrorResponse |
Uploads user list
Exports the user list to csv file and returns number of exported users
Code | Description | Schema |
---|---|---|
200 | OK | integer |
400 | Bad Request | string |
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Update Users's Skycoin address
Collect, validate and store User's new Skycoin address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
newAddress | body | New User | Yes | whitelist.AddressUpdateReq |
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.User |
400 | Bad Request | api.ErrorResponse |
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Remove User's API key
Match provided API key and remove it if exists
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keyToBeRemoved | body | User's API key to be removed | Yes | object |
Code | Description | Schema |
---|---|---|
200 | ||
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
List User's API keys
Return collection of User's generated API keys
Code | Description | Schema |
---|---|---|
200 | OK | [ string ] |
500 | Internal Server Error | api.ErrorResponse |
Generate User's API key
Method that is going to generate, persist and return User's new API key
Code | Description | Schema |
---|---|---|
201 | Created | string |
500 | Internal Server Error | api.ErrorResponse |
Gets the application for curent user
Gets the application that is currently in progress for current user
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.Application |
404 | Not Found | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Create a new application in system for current user
Collect provided Application attributes from the body and create new Application in the system
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
newUser | body | New User | Yes | object |
Code | Description | Schema |
---|---|---|
200 | ||
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Link nodes
Finds User by provided API key and create a new Miner with provided Nodes
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
linkNodesReq | body | Nodes to be linked | Yes | whitelist.linkNodesReq |
Code | Description | Schema |
---|---|---|
200 | ||
422 | Unprocessable Entity | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Update an existing application in system for current user, without change in images
Collect provided Application attributes from the body and create new change history record for
Code | Description | Schema |
---|---|---|
200 | ||
500 | Internal Server Error | api.ErrorResponse |
Gets whitelisted application
Returns an application for given application id
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | query | Whitelist application id | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | whitelist.Application |
400 | Bad Request | api.ErrorResponse |
500 | Internal Server Error | api.ErrorResponse |
Lists whitelisted applications
Returns an array of the whitelisted applications
Code | Description | Schema |
---|---|---|
200 | OK | [ whitelist.Application ] |
500 | Internal Server Error | api.ErrorResponse |
Name | Type | Description | Required |
---|---|---|---|
message | string | No |
Name | Type | Description | Required |
---|---|---|---|
id | integer | No | |
skycoinAddress | string | No | |
username | string | No |
Name | Type | Description | Required |
---|---|---|---|
address | string | No |
Name | Type | Description | Required |
---|---|---|---|
id | integer | No | |
username | string | No |
Name | Type | Description | Required |
---|---|---|---|
changeHistory | [ whitelist.ChangeHistory ] | No | |
createdAt | string | No | |
currentStatus | whitelist.ApplicationStatus | No | |
id | integer | No | |
miner | whitelist.Miner | This connection is used to preserve current miner for app. It should not be preloaded. If miner is needed use GetMinerForApplication method in service. | No |
userId | string | No |
Name | Type | Description | Required |
---|---|---|---|
whitelist.ApplicationStatus | object |
Name | Type | Description | Required |
---|---|---|---|
adminComment | string | No | |
createdAt | string | No | |
description | string | No | |
id | integer | No | |
images | [ whitelist.Image ] | No | |
location | string | No | |
nodes | [ whitelist.Node ] | No | |
status | whitelist.ApplicationStatus | No | |
userComment | string | No |
Name | Type | Description | Required |
---|---|---|---|
correctionTx | string | No | |
createdAt | string | No | |
diyTx | string | No | |
id | integer | No | |
minerType | whitelist.MinerType | No | |
numberOfNodes | integer | No | |
officialTx | string | No | |
payoutAddress | string | No | |
timeOfExport | string | No | |
userId | string | No |
Name | Type | Description | Required |
---|---|---|---|
createdAt | string | No | |
id | integer | No | |
imgHash | string | No | |
minerId | integer | No | |
path | string | No |
Name | Type | Description | Required |
---|---|---|---|
applicationId | integer | No | |
applications | [ whitelist.Application ] | No | |
approvedNodeCount | integer | No | |
batchLabel | string | No | |
createdAt | string | No | |
disabled | string | No | |
gifted | boolean | No | |
id | integer | No | |
images | [ whitelist.Image ] | No | |
minerTransfers | [ whitelist.MinerTransfer ] | No | |
nodes | [ whitelist.Node ] | No | |
type | whitelist.MinerType | No | |
username | string | No |
Name | Type | Description | Required |
---|---|---|---|
minerId | integer | No | |
newUsername | string | No | |
oldUsername | string | No |
Name | Type | Description | Required |
---|---|---|---|
whitelist.MinerType | object |
Name | Type | Description | Required |
---|---|---|---|
createdAt | string | No | |
id | integer | No | |
key | string | No | |
minerId | integer | No | |
uptime | whitelist.NodeUptimeResponse | No |
Name | Type | Description | Required |
---|---|---|---|
downtime | number | No | |
key | string | No | |
online | boolean | No | |
percentage | number | No | |
uptime | number | No |
Name | Type | Description | Required |
---|---|---|---|
addressHistory | [ whitelist.Address ] | No | |
apiKeys | [ whitelist.ApiKey ] | No | |
applications | [ whitelist.Application ] | No | |
createdAt | string | No | |
exportRecords | [ whitelist.ExportRecord ] | No | |
miners | [ whitelist.Miner ] | No | |
rights | string | No | |
status | integer | No | |
username | string | No |
Name | Type | Description | Required |
---|---|---|---|
key | string | No | |
nodeKeys | [ string ] | No |