github.com/twilio/twilio-go@v1.20.1/rest/proxy/v1/docs/ServicesSessionsApi.md (about)

     1  # ServicesSessionsApi
     2  
     3  All URIs are relative to *https://proxy.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateSession**](ServicesSessionsApi.md#CreateSession) | **Post** /v1/Services/{ServiceSid}/Sessions | 
     8  [**DeleteSession**](ServicesSessionsApi.md#DeleteSession) | **Delete** /v1/Services/{ServiceSid}/Sessions/{Sid} | 
     9  [**FetchSession**](ServicesSessionsApi.md#FetchSession) | **Get** /v1/Services/{ServiceSid}/Sessions/{Sid} | 
    10  [**ListSession**](ServicesSessionsApi.md#ListSession) | **Get** /v1/Services/{ServiceSid}/Sessions | 
    11  [**UpdateSession**](ServicesSessionsApi.md#UpdateSession) | **Post** /v1/Services/{ServiceSid}/Sessions/{Sid} | 
    12  
    13  
    14  
    15  ## CreateSession
    16  
    17  > ProxyV1Session CreateSession(ctx, ServiceSidoptional)
    18  
    19  
    20  
    21  Create a new Session
    22  
    23  ### Path Parameters
    24  
    25  
    26  Name | Type | Description
    27  ------------- | ------------- | -------------
    28  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    29  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
    30  
    31  ### Other Parameters
    32  
    33  Other parameters are passed through a pointer to a CreateSessionParams struct
    34  
    35  
    36  Name | Type | Description
    37  ------------- | ------------- | -------------
    38  **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
    39  **DateExpiry** | **time.Time** | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
    40  **Ttl** | **int** | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
    41  **Mode** | **string** | 
    42  **Status** | **string** | 
    43  **Participants** | **[]interface{}** | The Participant objects to include in the new session.
    44  
    45  ### Return type
    46  
    47  [**ProxyV1Session**](ProxyV1Session.md)
    48  
    49  ### Authorization
    50  
    51  [accountSid_authToken](../README.md#accountSid_authToken)
    52  
    53  ### HTTP request headers
    54  
    55  - **Content-Type**: application/x-www-form-urlencoded
    56  - **Accept**: application/json
    57  
    58  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    59  [[Back to Model list]](../README.md#documentation-for-models)
    60  [[Back to README]](../README.md)
    61  
    62  
    63  ## DeleteSession
    64  
    65  > DeleteSession(ctx, ServiceSidSid)
    66  
    67  
    68  
    69  Delete a specific Session.
    70  
    71  ### Path Parameters
    72  
    73  
    74  Name | Type | Description
    75  ------------- | ------------- | -------------
    76  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    77  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete.
    78  **Sid** | **string** | The Twilio-provided string that uniquely identifies the Session resource to delete.
    79  
    80  ### Other Parameters
    81  
    82  Other parameters are passed through a pointer to a DeleteSessionParams struct
    83  
    84  
    85  Name | Type | Description
    86  ------------- | ------------- | -------------
    87  
    88  ### Return type
    89  
    90   (empty response body)
    91  
    92  ### Authorization
    93  
    94  [accountSid_authToken](../README.md#accountSid_authToken)
    95  
    96  ### HTTP request headers
    97  
    98  - **Content-Type**: Not defined
    99  - **Accept**: Not defined
   100  
   101  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   102  [[Back to Model list]](../README.md#documentation-for-models)
   103  [[Back to README]](../README.md)
   104  
   105  
   106  ## FetchSession
   107  
   108  > ProxyV1Session FetchSession(ctx, ServiceSidSid)
   109  
   110  
   111  
   112  Fetch a specific Session.
   113  
   114  ### Path Parameters
   115  
   116  
   117  Name | Type | Description
   118  ------------- | ------------- | -------------
   119  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   120  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch.
   121  **Sid** | **string** | The Twilio-provided string that uniquely identifies the Session resource to fetch.
   122  
   123  ### Other Parameters
   124  
   125  Other parameters are passed through a pointer to a FetchSessionParams struct
   126  
   127  
   128  Name | Type | Description
   129  ------------- | ------------- | -------------
   130  
   131  ### Return type
   132  
   133  [**ProxyV1Session**](ProxyV1Session.md)
   134  
   135  ### Authorization
   136  
   137  [accountSid_authToken](../README.md#accountSid_authToken)
   138  
   139  ### HTTP request headers
   140  
   141  - **Content-Type**: Not defined
   142  - **Accept**: application/json
   143  
   144  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   145  [[Back to Model list]](../README.md#documentation-for-models)
   146  [[Back to README]](../README.md)
   147  
   148  
   149  ## ListSession
   150  
   151  > []ProxyV1Session ListSession(ctx, ServiceSidoptional)
   152  
   153  
   154  
   155  Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page.
   156  
   157  ### Path Parameters
   158  
   159  
   160  Name | Type | Description
   161  ------------- | ------------- | -------------
   162  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   163  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to read.
   164  
   165  ### Other Parameters
   166  
   167  Other parameters are passed through a pointer to a ListSessionParams struct
   168  
   169  
   170  Name | Type | Description
   171  ------------- | ------------- | -------------
   172  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   173  **Limit** | **int** | Max number of records to return.
   174  
   175  ### Return type
   176  
   177  [**[]ProxyV1Session**](ProxyV1Session.md)
   178  
   179  ### Authorization
   180  
   181  [accountSid_authToken](../README.md#accountSid_authToken)
   182  
   183  ### HTTP request headers
   184  
   185  - **Content-Type**: Not defined
   186  - **Accept**: application/json
   187  
   188  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   189  [[Back to Model list]](../README.md#documentation-for-models)
   190  [[Back to README]](../README.md)
   191  
   192  
   193  ## UpdateSession
   194  
   195  > ProxyV1Session UpdateSession(ctx, ServiceSidSidoptional)
   196  
   197  
   198  
   199  Update a specific Session.
   200  
   201  ### Path Parameters
   202  
   203  
   204  Name | Type | Description
   205  ------------- | ------------- | -------------
   206  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   207  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update.
   208  **Sid** | **string** | The Twilio-provided string that uniquely identifies the Session resource to update.
   209  
   210  ### Other Parameters
   211  
   212  Other parameters are passed through a pointer to a UpdateSessionParams struct
   213  
   214  
   215  Name | Type | Description
   216  ------------- | ------------- | -------------
   217  **DateExpiry** | **time.Time** | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
   218  **Ttl** | **int** | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
   219  **Status** | **string** | 
   220  
   221  ### Return type
   222  
   223  [**ProxyV1Session**](ProxyV1Session.md)
   224  
   225  ### Authorization
   226  
   227  [accountSid_authToken](../README.md#accountSid_authToken)
   228  
   229  ### HTTP request headers
   230  
   231  - **Content-Type**: application/x-www-form-urlencoded
   232  - **Accept**: application/json
   233  
   234  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   235  [[Back to Model list]](../README.md#documentation-for-models)
   236  [[Back to README]](../README.md)
   237