Services Services are the tasks that the Automation Cloud can perform for you. For example, gathering flight price information from an airline or booking a ticket.
You can discover which services are available before you request a job .
Service object Here is an example of a service object:
{
"object" : "service" ,
"id" : "bd80b73a-af55-4087-a5d4-91f6c8619948" ,
"name" : "School Menu" ,
"domain" : "Generic" ,
}
1 2 3 4 5 6
domain In the Automation Cloud, similar services constitute domains, e.g. FlightBooking, HotelBooking, e.t.c. A domain abstracts any supported website into a predictable API listing expected inputs and outputs.
Not every service within a domain will utilise all the inputs or emit all the outputs prescribed by the domain, as every particular website implementation is different.
The Generic domain provides the foundation for all the specific domains, which means all the inputs and outputs from the Generic listopen in new window are valid in any other domain.
All the following endpoints require authentication .
List all Services Returns a list of Automation Cloud services available to your client application.
Authorizationstring required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentTypestring required Media type of the request.
Example: Content-Type: application/json
Query Parameters
sortstring optional Sort services list by a parameter.
Default: sort=name
Enum: ["name","domain","tags","updatedAt"]
Example: sort=name
limitnumber optional Limit the number of services returned.
Default: limit=1000
Example: limit=100
offsetstring optional Offset the number of services returned.
Default: offset=0
Example: offset=0
Code sample GET /services
curl -X GET 'https://api.automationcloud.net/services' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
-G \
-d 'sort=name' \
-d 'limit=100' \
-d 'offset=0'
1 2 3 4 5 6 7
Success Responses Status 200
{
"object" : "list" ,
"data" : [
{
"object" : "service" ,
"id" : "bd80b73a-af55-4087-a5d4-91f6c8619948" ,
"name" : "School Menu" ,
"domain" : "Generic" ,
"attributes" : { }
}
]
}
1 2 3 4 5 6 7 8 9 10 11 12
The response contains the list of available service objects.
Retrieve a Service Returns the corresponding service information if a valid identifier was provided and returns an error otherwise.
Authorizationstring required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentTypestring required Media type of the request.
Example: Content-Type: application/json
Path parameters
idstring uuid required Unique Service ID.
Example: bd80b73a-af55-4087-a5d4-91f6c8619948
Code sample GET /services/:id
curl -X GET 'https://api.automationcloud.net/services/bd80b73a-af55-4087-a5d4-91f6c8619948' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json'
1 2 3
Success Responses Status 200
{
"object" : "service" ,
"id" : "bd80b73a-af55-4087-a5d4-91f6c8619948" ,
"name" : "School Menu" ,
"domain" : "Generic" ,
"attributes" : { }
}
1 2 3 4 5 6 7
Here is an example of a service object.
Service Cache Returns the output data from the previous successful jobs for the last two weeks. The job output data will exclude the personally identifiable information (PII).
Each output data point comes with a variability score from 0 to 1, which explains how "variable" the data is. A score of 0 means that this data point is the same for all previous jobs in the last two weeks. A score greater than 0 describes that the data is different from one of the previous jobs and, therefore, may not be 100% reliable.
Authorizationstring required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentTypestring required Media type of the request.
Example: Content-Type: application/json
Path parameters
idstring uuid required Unique Service ID.
Example: bd80b73a-af55-4087-a5d4-91f6c8619948
Code sample GET /services/:id/previous-job-outputs
curl -X GET 'https://api.automationcloud.net/services/bd80b73a-af55-4087-a5d4-91f6c8619948/previous-job-outputs' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json'
1 2 3
Success Responses Status 200
{
"object" : "list" ,
"data" : [
{
"key" : "ingredients" ,
"stage" : "" ,
"data" : [
"almond" ,
"bean" ,
"butter" ,
"cheddar" ,
"cinnamon" ,
"cress" ,
"cucumber" ,
"egg" ,
"flour" ,
"lettuce" ,
"oil" ,
"onion" ,
"salt" ,
"sugar" ,
"tahini" ,
"water" ,
"yeast"
] ,
"id" : "6c1086c9-2cf3-493b-ba0f-cb68536b383c" ,
"jobId" : "e863af21-eea7-433f-822a-921871f13c5d" ,
"updatedAt" : 1652134707160 ,
"createdAt" : 1652134707160 ,
"variability" : 0 ,
"object" : "previous-job-output"
}
]
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Here is an example list of previous-job-output objects.