Overview
You can use this request to get field data into a Dynamic Data Set workflow.
The Method
API | - | Method |
---|---|---|
REST | GET | https://[Your URL]/api/3.0/workflows/data-set/:workflowId |
Parameters
Property | Type | Description | Required |
---|---|---|---|
workflowId | integer | The ID of the Workflow | yes |
Example Request
<?php $client = new http\Client; $request = new http\Client\Request; $request->setRequestUrl('[your-url]/api/3.0/workflows/data-set/51'); $request->setRequestMethod('GET'); $body = new http\Message\Body; $body->append('{ "workflow_id": 41, "contact_email": "[email protected]", "dsv_41_flight_date": "2020-10-04", "dsv_41_flight_number": "2020-10-04" }'); $request->setBody($body); $request->setOptions(array()); $request->setHeaders(array( 'Authorization' => 'Basic ', 'Content-Type' => 'application/json', 'Authorization' => 'Basic ', 'Content-Type' => 'text/plain' )); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
Example Response
Success Result: { "result": "success", "data": [ { "ds_name": "Reservation Date", "ds_sanitised_name": "dsv_51_reservation_date", "ds_is_required": "1", "ds_is_primary": "1", "ds_type": "date" }, { "ds_name": "Flight Number", "ds_sanitised_name": "dsv_51_flight_number", "ds_is_required": "0", "ds_is_primary": "0", "ds_type": "integer" }, { "ds_name": "City", "ds_sanitised_name": "dsv_51_city", "ds_is_required": "1", "ds_is_primary": "0", "ds_type": "varchar" } ] } Error { "result": "error", "data": { "messages": [ "Workflow does not exist" ] } }