-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Karthik Thirumalasetti edited this page Oct 11, 2017
·
5 revisions
This library contains resources to help communicate with appsfly.io execution server. For all communications with execution server, your application should be registered and a secret key needs to be generated.
Please contact [email protected] for your credientials.
Key | Description |
---|---|
SECRET_KEY | Secret Key is required for encryption. Secret Key should be generated on the Appsfly publisher dashboard |
APP_KEY | Application key to identify the publisher instance |
EXECUTOR_URL | Url to reach appsfly.io Microservices |
NOTE: Above params are needed for checksum generation. Please refer to the methods mention below.
Key | Description |
---|---|
MODULE_HANDLE | Each micromodule of a service provider is identified by MODULE_HANDLE |
UUID | UniqueID to identify user session |
Key | Description |
---|---|
INTENT | Intent is like an endpoint you are accessing to send message |
PAYLOAD | Data payload |
The SDK can be included to handle authorization. There is no need for you to handle checksum generation and verification.
AppInstance.AFConfig config = new AppInstance.AFConfig("EXECUTOR_URL", "SECRET_KEY", "APP_KEY");
AppInstance travelProvider = new AppInstance(config, "MODULE_HANDLE");
travelProvider.exec("INTENT", JSONObject("PAYLOAD"), "UUID", new Callback() {
@Override
public void onResponse(JSONObject response) {
// We have already verified the checksum from you
}
@Override
public void onError(JSONObject error) {
// Handle error
}
});
appsfly.io exposes a single API endpoint to access Microservices directly.
https://microapps.appsfly.io/executor/exec
POST
Header | Description |
---|---|
X-UUID | UUID |
X-App-Key | APP_KEY |
X-Module-Handle | MODULE_HANDLE |
X-Checksum | CHECKSUM. Please go through this gist to generate checksum. |
Content-Type | Must be "application/json" |
{
"intent":"INTENT",
"data":"PAYLOAD"
}
Response format will be dependent on microservice. Please go through this documentation for different microservices.