With API 2.0, what should /workflow/start look like?
I'm making reasonable progress in understanding the API 2.0.
Using perl, I've managed to make calls successfully to everything except /workflow/start/<id>, /workflow/adhoc/start and /activity/workflow/<tid>
I'm struggling with /workflow/start/<id> ...
What is the <id> - is it the long hex string that is shown on the workflows page under the text "to run this workflow use the API token: "?
How should the body of the POST be formatted - is it multipart/form-data? I'm assuming the fields are title and body - is that correct?
My current attempts are returning a "400 Bad Request" with ErrorMessage = "No matching workflow" which makes me think I'm specifying the <id> wrongly.
</id></id></id></tid></id>
Using perl, I've managed to make calls successfully to everything except /workflow/start/<id>, /workflow/adhoc/start and /activity/workflow/<tid>
I'm struggling with /workflow/start/<id> ...
What is the <id> - is it the long hex string that is shown on the workflows page under the text "to run this workflow use the API token: "?
How should the body of the POST be formatted - is it multipart/form-data? I'm assuming the fields are title and body - is that correct?
My current attempts are returning a "400 Bad Request" with ErrorMessage = "No matching workflow" which makes me think I'm specifying the <id> wrongly.
</id></id></id></tid></id>
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I can now answer some of my own questions (in case anyone else is struggling with the same questions):
the id isn't the API token displayed on the workflow page; it can be found in the information returned by /workflow/shortinfo/all. So far as I can see it's not shown anywhere on the workflow web page.
The body of the POST is multipart/form-data.
title and body fields work. I'm guessing (based on what the Rest Decoder shows, though I've not yet tried) that image and url may also be available fields.
Having got /workflow/start/<id> to work, I kown have a transaction-id and /activity/workflow/<tid> also works.
That leaves /workflow/adhoc/start to try ...
</tid></id>
I’m happy
-
Inappropriate?Thanks for feedback David,
The workflow ID can either be obtained by the /workflow/shortinfo/ method as you mentioned (see http://tarpipe.com/developers/guide/a...) or on the user interface, at the end of the workflow edit URL (example: http:// tarpipe.com/workflows/edit/?id=WORKFLOW_ID).
You can send any POST field you like as long as it's available as a REST decoder output (see http://tarpipe.com/developers/guide/a... about sending POST values).
The /workflow/adhoc/start method is more powerful because it lets run any workflow created by you and sent with the method request (see http://tarpipe.com/developers/guide/a...).
With the adhoc workflow you can send *any* POST fields you like, not just those described as an output of the REST decoder. The way you connect those POST fields to other connectors on the workflow is up to you and must be described on the workflow XML document you're sending (see the documentation for an example).
Please let me know if you need any further assistance building and executing an adhoc workflow. -
Inappropriate?Thank you.
I'd not noticed the ?id= on the end of the edit workflow URL - can I suggest it would be worth adding a note to the 2.0 API documentation saying that the id can be seen here? I think it would also be useful if the id were displayed on the workflows page.
I think it would also be useful if the 2.0 API documentation included your notes "You can send any POST field you like as long as it's available as a REST decoder output" in the /workflow/start section and "With the adhoc workflow you can send *any* POST fields you like, not just those described as an output of the REST decoder" in the /workflow/start/adhoc section.
I’m happy
Loading Profile...



EMPLOYEE