<< Click to Display Table of Contents >> Navigation: Optimizer API > Optimize Asynchronously |
Post a valid JSON load to begin the optimization process. This optimization will occur asynchronously with no guarantees of when it will complete.
If webhook parameters are included in the URL, the service will monitor the job for you and return the results once completed. You can also optionally pass a progress webook as well, in which case the service will also post progress updates to your client API at regular intervals.
HTTP request
POST opt/v1/async
POST opt/v1/async{?results=resultsURL}
POST opt/v1/async{?results=resultsURL&progress=progressURL}
Authentication: BASIC
Parameters:
Name |
Location |
Type |
Description |
results |
URL |
string |
Address of webhook where the optimization results should be POSTed |
progress |
URL |
string |
Address of webhook where the optimization progress should be POSTed |
payload |
body |
string |
Valid JSON formatted to adhere to the MagicLogic schema |
Response
{
"jobid":"00001348-00000001-127.0.0.1-10101"
}
Property |
Description |
jobid |
Unique token that identifies the job you submitted. This is required when querying its progress and when retrieving the optimization results. |
Example webhook URLs:
POST opt/v1/async?results=myserver.com/resulthook
POST opt/v1/async?results=myserver.com/resulthook&progress=myserver.com/progresshook