ACES Marketplace API Docs
The ACES Marketplace API Specification defines the API Specification for interacting with ACES Marketplace instances. SDKs are available in Java, Go, PHP, JavaScript, Python, and C#.
ACES Marketplace instances allow service providers to register and track ACES Listener and ACES Service nodes into a Service Marketplace, and allows consumers to search and utilize services.
Health
Get Health
Get application health information.
Example request:
curl 'http://localhost:8080/Health'
ServiceClient client = new ServiceClient("http://localhost");
Health health = client.getHealth();
Returned response:
{
"status": "up"
}
HTTP Request
GET http://localhost:8080/Health
Listener Categories
Get Listener Categories
Get a list of available Listener categories.
Example request:
curl 'http://localhost:8080/listenerCategories'
ServiceClient client = new ServiceClient("http://localhost");
ListenerCategories listenerCategories = client.getListenerCategories();
Returned response:
{
"listenerCategories": ["BTC", "ETH", "ARK"]
}
HTTP Request
GET http://localhost:8080/listenerCategories
Listeners
List Listeners
Gets a page of Listeners.
Example request:
url="http://localhost:8080/listeners"
url="$url?pageSize=100"
url="$url&page=4"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ListenersRequest request = new ListenersRequest();
request.setCategory("BTC");
request.setSearch("ACES_Mainnet");
request.setPageSize(100);
request.setPage(1);
Page<Listeners> listenersPage = client.getListenersPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "1",
"url": "https://btc-listener-mainnet.arkaces.com",
"name": "ACES BTC Mainnet Listener",
"websiteUrl": "https://arkaces.com",
"description": "A blockchain listener for BTC Mainnet",
"authorizationType": "httpBasic",
"minArkStake": "100",
"dailyArkFee": "0",
"createdAt": "2017-11-01T00:00:00.000Z"
}
]
}
HTTP Request
GET http://localhost:8080/listener?pageSize=100&page=4&category=BTC&search=ACES_Mainnet
Service Categories
Get Service Categories
Get a list of available Service categories.
Example request:
curl 'http://localhost:8080/serviceCategories'
ServiceClient client = new ServiceClient("http://localhost");
ServiceCategories serviceCategories = client.getServiceCategories();
Returned response:
{
"serviceCategories": ["Transfer", "Computation", "Storage", "DNS", "Internet of Things"]
}
HTTP Request
GET http://localhost:8080/serviceCategories
Services
List Services
Gets a page of Services.
Example request:
url="http://localhost:8080/services"
url="$url?category=Computation"
url="$url?search=ACES"
url="$url?pageSize=100"
url="$url&page=4"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ServicesListRequest request = new ServicesListRequest();
request.setCategory("Computation");
request.setSearch("ACES");
request.setPageSize(100);
request.setPage(1);
Page<Services> servicesPage = client.getServicesPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "1",
"url": "https://services.arkaces.com/computation",
"name": "ACES Computation Services",
"version": "1.0",
"description": "A blockchain listener for BTC Mainnet",
"instructions": "Usage instructions in basic html format.",
"websiteUrl": "https://arkaces.com",
"type":"onDemand",
"inputSchema":"Contract input schema in JSON Schema format.",
"outputSchema":"Contract output schema in JSON Schema format.",
"createdAt": "2017-11-01T00:00:00.000Z"
}
]
}
HTTP Request
GET http://localhost:8080/listener?pageSize=100&page=1&category=Computation&search=ACES
Get Service by id
Gets detailed information for a particular Service.
Example request:
url="http://localhost:8080/services/{id}"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ServiceByIdRequest request = new ServiceByIdtRequest();
Page<ServiceById> ServiceByIdPage = client.getServiceByIdPage(request);
Returned response:
{
"id": "1",
"url": "https://services.arkaces.com/computation",
"name": "ACES Computation Services",
"version": "1.0",
"description": "A blockchain listener for BTC Mainnet",
"instructions": "Usage instructions in basic html format.",
"websiteUrl": "https://arkaces.com",
"type":"onDemand",
"inputSchema":"Contract input schema in JSON Schema format.",
"outputSchema":"Contract output schema in JSON Schema format.",
"createdAt": "2017-11-01T00:00:00.000Z"
}
Get Service Contracts by id
Get a page of Contracts created under the current Account.
Example request:
url="http://localhost:8080/services/{id}/contracts"
url="$url?pageSize=100"
url="$url&page=4"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ServiceContractsRequest request = new ServiceContractsRequest();
request.setPageSize(100);
request.setPage(1);
Page<ServiceContracts> serviceContractsPage = client.getServiceContractsPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "123",
"serviceId": "abc",
"status": "active",
"results": "service outputSchema"
}
]
}
Create Service Contract.
Creates a new Service Contract under the current Account.
Contracts
Get Service Contracts.
Get a page of Contracts created under the current Account.
Example request:
url="http://localhost:8080/contracts"
url="$url?name=serviceId"
url="$url?pageSize=100"
url="$url&page=1"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ContractsListRequest request = new ContractsListRequest();
request.setName("serviceId");
request.setPageSize(100);
request.setPage(1);
Page<Contracts> contractsPage = client.getContractsPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "123",
"serviceId": "abc",
"status": "active",
"results": "service outputSchema"
}
]
}
HTTP Request
GET http://localhost:8080/contracts?pageSize=100&page=1
Get Contract
Gets detailed information for a particular Contract.
Example request:
url="http://localhost:8080/contracts/{id}"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ContractRequest request = new ContractRequest();
Page<Contract> contractPage = client.getContractPage(request);
Returned response:
{
"id": "123",
"serviceId": "abc",
"status": "active",
"results": "service outputSchema"
}
HTTP Request
GET http://localhost:8080/contracts/{id}
Cancel contract
Cancels a Contract.
Example request:
url="http://localhost:8080/contracts/{id}/cancel"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ContractCancelRequest request = new ContractCancelRequest();
Page<ContractCancel> contractCancelPage = client.getContractCancelPage(request);
Returned response:
{
"createdAt": "2017-11-01T00:00:00.000Z"
}
HTTP Request
GET http://localhost:8080/contracts/{id}/cancel
Create Ark Payment
Adds an Ark Payment for a Contract. The Contract must support the arkPayable interface.
Example request:
url="http://localhost:8080/contracts/{id}/arkPayments"
url="$url?type=full"
url="$url?arkAmount=100"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
ArkPayentRequest request = new ArkPaymentRequest();
Page<ArkPayment> arkPaymentPage = client.getArkPaymentPage(request);
Returned response:
{
"amount": 100,
"createdAt": "2017-11-01T00:00:00.000Z",
"arkTransactionId": "adf021a947a15f3ffbef9a06926f87c5d4f164d54fc76a42d7bff4cb33081d89",
"confirmations": 51
}
HTTP Request
GET http://localhost:8080/contracts/{id}/arkPayments?type=full&arkAmount=100
Account
List Account Users
Gets a page of Users registered under the current Account.
Example request:
url="http://localhost:8080/account/user"
url="$url?pageSize=100"
url="$url&page=1"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
AccountUsersRequest request = new AccountUsersRequest();
request.setPageSize(100);
request.setPage(1);
Page<AccountUsers> accountUsersPage = client.getAccountUsersPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "1",
"name": "ACES BTC Mainnet Listener",
"emailAddress": "joe@example.com",
"status": "active",
"createdAt": "2017-11-01T00:00:00.000Z"
}
]
}
HTTP Request
GET http://localhost:8080/account/user
Get Ark Wallet
Get Ark Wallet attached to the current Account.
Example request:
url="http://localhost:8080/account/arkWallet"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
AccountWalletRequest request = new AccountWalletRequest();
Page<AccountWallet> accountWalletPage = client.getAccountWalletPage(request);
Returned response:
{
"address": "ARVpfb7dcyXefUFhfs8wP5v78yM9AokGi6",
"balance": 42,
"createdAt": "2017-11-01T00:00:00.000Z"
}
HTTP Request
GET http://localhost:8080/account/arkWallet
List Account Ark Wallet Transactions
Gets a page of Ark Wallet transactions for the current Account.
Example request:
url="http://localhost:8080/account/arkWallet/transactions"
url="$url?pageSize=100"
url="$url&page=1"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
AccountWalletRequest request = new AccountWalletRequest();
Page<AccountWallet> accountWalletPage = client.getAccountWalletPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"amount": "42",
"createdAt": "2017-11-01T00:00:00.000Z",
"arkTransactionId": "adf021a947a15f3ffbef9a06926f87c5d4f164d54fc76a42d7bff4cb33081d89",
"confirmations":"51"
}
]
}
HTTP Request
GET http://localhost:8080/account/arkWallet/transactions
List Account Listeners
Gets a page of Listener registered under the current Account.
Example request:
url="http://localhost:8080/account/listeners"
url="$url?category=BTC"
url="$url?search=ACES"
url="$url?pageSize=100"
url="$url&page=1"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
AccountListenersRequest request = new AccountListenersRequest();
Page<AccountListeners> accountListenerspage = client.getAccountListenersPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "1",
"url": "https://btc-listener-mainnet.arkaces.com",
"name": "ACES BTC Mainnet Listener",
"websiteUrl": "https://arkaces.com",
"description": "A blockchain listener for BTC Mainnet",
"authorizationType": "httpBasic",
"minArkStake": "100",
"dailyArkFee": "0",
"createdAt": "2017-11-01T00:00:00.000Z"
}
]
}
HTTP Request
GET http://localhost:8080/account/listeners
Create Listener
Creates a Listener registered under the current Account.
List Account Services
Gets a page of Services registered under the current Account.
Example request:
url="http://localhost:8080/account/services"
url="$url?category=BTC"
url="$url?search=ACES"
url="$url?pageSize=100"
url="$url&page=1"
curl -X GET "$url"
ServiceClient client = new ServiceClient("http://localhost");
AccountListenersRequest request = new AccountListenersRequest();
Page<AccountListeners> accountListenerspage = client.getAccountListenersPage(request);
Returned response:
{
"pageSize": "100",
"page": "1",
"totalItems: "1",
"items": [
{
"id": "1",
"url": "https://services.arkaces.com/computation",
"name": "ACES Computation Services",
"version": "1.0",
"description": "A blockchain listener for BTC Mainnet",
"instructions": "Usage instructions in basic html format.",
"websiteUrl": "https://arkaces.com",
"type":"onDemand",
"inputSchema":"Contract input schema in JSON Schema format.",
"outputSchema":"Contract output schema in JSON Schema format.",
"createdAt": "2017-11-01T00:00:00.000Z"
}
]
}
HTTP Request
GET http://localhost:8080/account/services
Create Account Service
Register a new Service under an Account.