github.com/twilio/twilio-go@v1.20.1/rest/studio/v2/docs/FlowsExecutionsApi.md (about) 1 # FlowsExecutionsApi 2 3 All URIs are relative to *https://studio.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateExecution**](FlowsExecutionsApi.md#CreateExecution) | **Post** /v2/Flows/{FlowSid}/Executions | 8 [**DeleteExecution**](FlowsExecutionsApi.md#DeleteExecution) | **Delete** /v2/Flows/{FlowSid}/Executions/{Sid} | 9 [**FetchExecution**](FlowsExecutionsApi.md#FetchExecution) | **Get** /v2/Flows/{FlowSid}/Executions/{Sid} | 10 [**ListExecution**](FlowsExecutionsApi.md#ListExecution) | **Get** /v2/Flows/{FlowSid}/Executions | 11 [**UpdateExecution**](FlowsExecutionsApi.md#UpdateExecution) | **Post** /v2/Flows/{FlowSid}/Executions/{Sid} | 12 13 14 15 ## CreateExecution 16 17 > StudioV2Execution CreateExecution(ctx, FlowSidoptional) 18 19 20 21 Triggers a new Execution for the Flow 22 23 ### Path Parameters 24 25 26 Name | Type | Description 27 ------------- | ------------- | ------------- 28 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 29 **FlowSid** | **string** | The SID of the Excecution's Flow. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateExecutionParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **To** | **string** | The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. 39 **From** | **string** | The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID. 40 **Parameters** | [**interface{}**](interface{}.md) | JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. 41 42 ### Return type 43 44 [**StudioV2Execution**](StudioV2Execution.md) 45 46 ### Authorization 47 48 [accountSid_authToken](../README.md#accountSid_authToken) 49 50 ### HTTP request headers 51 52 - **Content-Type**: application/x-www-form-urlencoded 53 - **Accept**: application/json 54 55 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 56 [[Back to Model list]](../README.md#documentation-for-models) 57 [[Back to README]](../README.md) 58 59 60 ## DeleteExecution 61 62 > DeleteExecution(ctx, FlowSidSid) 63 64 65 66 Delete the Execution and all Steps relating to it. 67 68 ### Path Parameters 69 70 71 Name | Type | Description 72 ------------- | ------------- | ------------- 73 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 74 **FlowSid** | **string** | The SID of the Flow with the Execution resources to delete. 75 **Sid** | **string** | The SID of the Execution resource to delete. 76 77 ### Other Parameters 78 79 Other parameters are passed through a pointer to a DeleteExecutionParams struct 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 85 ### Return type 86 87 (empty response body) 88 89 ### Authorization 90 91 [accountSid_authToken](../README.md#accountSid_authToken) 92 93 ### HTTP request headers 94 95 - **Content-Type**: Not defined 96 - **Accept**: Not defined 97 98 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 99 [[Back to Model list]](../README.md#documentation-for-models) 100 [[Back to README]](../README.md) 101 102 103 ## FetchExecution 104 105 > StudioV2Execution FetchExecution(ctx, FlowSidSid) 106 107 108 109 Retrieve an Execution 110 111 ### Path Parameters 112 113 114 Name | Type | Description 115 ------------- | ------------- | ------------- 116 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 117 **FlowSid** | **string** | The SID of the Flow with the Execution resource to fetch 118 **Sid** | **string** | The SID of the Execution resource to fetch. 119 120 ### Other Parameters 121 122 Other parameters are passed through a pointer to a FetchExecutionParams struct 123 124 125 Name | Type | Description 126 ------------- | ------------- | ------------- 127 128 ### Return type 129 130 [**StudioV2Execution**](StudioV2Execution.md) 131 132 ### Authorization 133 134 [accountSid_authToken](../README.md#accountSid_authToken) 135 136 ### HTTP request headers 137 138 - **Content-Type**: Not defined 139 - **Accept**: application/json 140 141 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 142 [[Back to Model list]](../README.md#documentation-for-models) 143 [[Back to README]](../README.md) 144 145 146 ## ListExecution 147 148 > []StudioV2Execution ListExecution(ctx, FlowSidoptional) 149 150 151 152 Retrieve a list of all Executions for the Flow. 153 154 ### Path Parameters 155 156 157 Name | Type | Description 158 ------------- | ------------- | ------------- 159 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 160 **FlowSid** | **string** | The SID of the Flow with the Execution resources to read. 161 162 ### Other Parameters 163 164 Other parameters are passed through a pointer to a ListExecutionParams struct 165 166 167 Name | Type | Description 168 ------------- | ------------- | ------------- 169 **DateCreatedFrom** | **time.Time** | Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. 170 **DateCreatedTo** | **time.Time** | Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. 171 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 172 **Limit** | **int** | Max number of records to return. 173 174 ### Return type 175 176 [**[]StudioV2Execution**](StudioV2Execution.md) 177 178 ### Authorization 179 180 [accountSid_authToken](../README.md#accountSid_authToken) 181 182 ### HTTP request headers 183 184 - **Content-Type**: Not defined 185 - **Accept**: application/json 186 187 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 188 [[Back to Model list]](../README.md#documentation-for-models) 189 [[Back to README]](../README.md) 190 191 192 ## UpdateExecution 193 194 > StudioV2Execution UpdateExecution(ctx, FlowSidSidoptional) 195 196 197 198 Update the status of an Execution to `ended`. 199 200 ### Path Parameters 201 202 203 Name | Type | Description 204 ------------- | ------------- | ------------- 205 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 206 **FlowSid** | **string** | The SID of the Flow with the Execution resources to update. 207 **Sid** | **string** | The SID of the Execution resource to update. 208 209 ### Other Parameters 210 211 Other parameters are passed through a pointer to a UpdateExecutionParams struct 212 213 214 Name | Type | Description 215 ------------- | ------------- | ------------- 216 **Status** | **string** | 217 218 ### Return type 219 220 [**StudioV2Execution**](StudioV2Execution.md) 221 222 ### Authorization 223 224 [accountSid_authToken](../README.md#accountSid_authToken) 225 226 ### HTTP request headers 227 228 - **Content-Type**: application/x-www-form-urlencoded 229 - **Accept**: application/json 230 231 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 232 [[Back to Model list]](../README.md#documentation-for-models) 233 [[Back to README]](../README.md) 234