What would be the REST API to use to initiate a D2 workflow from a third party applications?
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
Below are the details for initiating a workflow using D2-REST API
URL: http://:/<war_file>/repositories/testdoc/d2-workflows?inline=true Method: POST Headers: Accept: application/json Content-Type: application/vnd.emc.documentum+json Authorization: <ValidAuthData> Payload:
{ "workflow_config_id": "<Object ID of the Workflow configuration in D2-Config>", "working_document_ids": [ "<Object ID of the Document to be sent to the workflow>" ] }
Example:
URL: http://192.168.2.101:8080/D2-Smartview/repositories/testdoc/d2-workflows?inline=true Method: POST Headers: Accept: application/json Content-Type: application/vnd.emc.documentum+json Authorization: Basic ZHR3bzQwMTExXzJfMTpQYXNzd29yZEAxMjM0NTY3 Payload:
{ "workflow_config_id": "080038e78005da4e", "working_document_ids": [ "090038e780061ef7" ] }
Please feel free to ask if you have any further questions or doubts.
You can get more details on the above GET/POST request options by navigating to the swagger documentation:
{d2-smartview or d2-rest instance}/static/openapi/index.html
Look for d2#workflow on the page and expand it:
FYI, I have shared your questions with some engineers/developers that might not normally see this question.
-Matt
Hi, where can we find this workflow config id?
@Michael McCollough @Nikhil K
The workflow config id will come from the workflow configuration object in D2. When you start a workflow in D2, you are starting a D2 Workflow based off its configuration.
So you can find your workflow you want using a query: select r_object_id, object_name from d2_workflow_config