Scheduling a task with REST API in Publishing Server
Dear community,
I developped last year a REST API to create/update/trigger Framemaker Publishing Server 2019 tasks from an automation server. Apparently the interface has changed with the 2020 version, and I'm struggling to get it running following the Adobe user guide.
A working example in groovy language of a POST request to create a task is as follows:
httpRequest (
contentType: 'APPLICATION_JSON',
httpMode: 'POST',
ignoreSslErrors: true,
requestBody: json_body,
responseHandle: 'NONE',
url: "http://my_node:7000/v16/tasks",
wrapAsMultipart: false
) Replacing json_body and my_node by my specific task configuration and host where I run the server. I don't use authentication and that code is enough to successfully create a task.
Where I struggle at the moment is to run a task. The example in the user guide suggests using the task ID (earlier version 2019 required the task name):
http://<FMPS_server>:<port>/v16/queue/scheduleTask/:idTherefore I'm scheduling the task as follows:
httpRequest (
contentType: 'APPLICATION_JSON',
httpMode: 'POST',
ignoreSslErrors: true,
//requestBody: body.toString(), -> NO BODY
responseHandle: 'NONE',
url: "http://my_node:7000/v16/queue/scheduleTask/:my_task_id",
wrapAsMultipart: false
) I'm fetching the id with a GET command that retrieves all tasks details, resulting in the following url (random id as example):
"http://my_node:7000/v16/queue/scheduleTask/:603e488ebe24e438bcf7dd0b"I might be doing a silly mistake somewhere.
Many thanks in advance
