github.com/launchdarkly/api-client-go@v5.3.0+incompatible/docs/UserSegmentsApi.md (about)

     1  # \UserSegmentsApi
     2  
     3  All URIs are relative to *https://app.launchdarkly.com/api/v2*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**DeleteUserSegment**](UserSegmentsApi.md#DeleteUserSegment) | **Delete** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Delete a user segment.
     8  [**GetExpiringUserTargetsOnSegment**](UserSegmentsApi.md#GetExpiringUserTargetsOnSegment) | **Get** /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Get expiring user targets for user segment
     9  [**GetUserSegment**](UserSegmentsApi.md#GetUserSegment) | **Get** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Get a single user segment by key.
    10  [**GetUserSegments**](UserSegmentsApi.md#GetUserSegments) | **Get** /segments/{projectKey}/{environmentKey} | Get a list of all user segments in the given project.
    11  [**PatchExpiringUserTargetsOnSegment**](UserSegmentsApi.md#PatchExpiringUserTargetsOnSegment) | **Patch** /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets on user segment
    12  [**PatchUserSegment**](UserSegmentsApi.md#PatchUserSegment) | **Patch** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Perform a partial update to a user segment.
    13  [**PostUserSegment**](UserSegmentsApi.md#PostUserSegment) | **Post** /segments/{projectKey}/{environmentKey} | Creates a new user segment.
    14  [**UpdateBigSegmentTargets**](UserSegmentsApi.md#UpdateBigSegmentTargets) | **Post** /segments/{projectKey}/{environmentKey}/{userSegmentKey}/users | Update targets included or excluded in a big segment
    15  
    16  
    17  # **DeleteUserSegment**
    18  > DeleteUserSegment(ctx, projectKey, environmentKey, userSegmentKey)
    19  Delete a user segment.
    20  
    21  ### Required Parameters
    22  
    23  Name | Type | Description  | Notes
    24  ------------- | ------------- | ------------- | -------------
    25   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    26    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
    27    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
    28    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
    29  
    30  ### Return type
    31  
    32   (empty response body)
    33  
    34  ### Authorization
    35  
    36  [Token](../README.md#Token)
    37  
    38  ### HTTP request headers
    39  
    40   - **Content-Type**: application/json
    41   - **Accept**: application/json
    42  
    43  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
    44  
    45  # **GetExpiringUserTargetsOnSegment**
    46  > UserTargetingExpirationForSegment GetExpiringUserTargetsOnSegment(ctx, projectKey, environmentKey, userSegmentKey)
    47  Get expiring user targets for user segment
    48  
    49  ### Required Parameters
    50  
    51  Name | Type | Description  | Notes
    52  ------------- | ------------- | ------------- | -------------
    53   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    54    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
    55    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
    56    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
    57  
    58  ### Return type
    59  
    60  [**UserTargetingExpirationForSegment**](UserTargetingExpirationForSegment.md)
    61  
    62  ### Authorization
    63  
    64  [Token](../README.md#Token)
    65  
    66  ### HTTP request headers
    67  
    68   - **Content-Type**: application/json
    69   - **Accept**: application/json
    70  
    71  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
    72  
    73  # **GetUserSegment**
    74  > UserSegment GetUserSegment(ctx, projectKey, environmentKey, userSegmentKey)
    75  Get a single user segment by key.
    76  
    77  ### Required Parameters
    78  
    79  Name | Type | Description  | Notes
    80  ------------- | ------------- | ------------- | -------------
    81   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    82    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
    83    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
    84    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
    85  
    86  ### Return type
    87  
    88  [**UserSegment**](UserSegment.md)
    89  
    90  ### Authorization
    91  
    92  [Token](../README.md#Token)
    93  
    94  ### HTTP request headers
    95  
    96   - **Content-Type**: application/json
    97   - **Accept**: application/json
    98  
    99  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   100  
   101  # **GetUserSegments**
   102  > UserSegments GetUserSegments(ctx, projectKey, environmentKey, optional)
   103  Get a list of all user segments in the given project.
   104  
   105  ### Required Parameters
   106  
   107  Name | Type | Description  | Notes
   108  ------------- | ------------- | ------------- | -------------
   109   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   110    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
   111    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
   112   **optional** | ***UserSegmentsApiGetUserSegmentsOpts** | optional parameters | nil if no parameters
   113  
   114  ### Optional Parameters
   115  Optional parameters are passed through a pointer to a UserSegmentsApiGetUserSegmentsOpts struct
   116  
   117  Name | Type | Description  | Notes
   118  ------------- | ------------- | ------------- | -------------
   119  
   120  
   121   **tag** | **optional.String**| Filter by tag. A tag can be used to group flags across projects. | 
   122  
   123  ### Return type
   124  
   125  [**UserSegments**](UserSegments.md)
   126  
   127  ### Authorization
   128  
   129  [Token](../README.md#Token)
   130  
   131  ### HTTP request headers
   132  
   133   - **Content-Type**: application/json
   134   - **Accept**: application/json
   135  
   136  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   137  
   138  # **PatchExpiringUserTargetsOnSegment**
   139  > UserTargetingExpirationForSegment PatchExpiringUserTargetsOnSegment(ctx, projectKey, environmentKey, userSegmentKey, semanticPatchWithComment)
   140  Update, add, or delete expiring user targets on user segment
   141  
   142  ### Required Parameters
   143  
   144  Name | Type | Description  | Notes
   145  ------------- | ------------- | ------------- | -------------
   146   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   147    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
   148    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
   149    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
   150    **semanticPatchWithComment** | [**interface{}**](interface{}.md)| Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported. | 
   151  
   152  ### Return type
   153  
   154  [**UserTargetingExpirationForSegment**](UserTargetingExpirationForSegment.md)
   155  
   156  ### Authorization
   157  
   158  [Token](../README.md#Token)
   159  
   160  ### HTTP request headers
   161  
   162   - **Content-Type**: application/json
   163   - **Accept**: application/json
   164  
   165  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   166  
   167  # **PatchUserSegment**
   168  > UserSegment PatchUserSegment(ctx, projectKey, environmentKey, userSegmentKey, patchOnly)
   169  Perform a partial update to a user segment.
   170  
   171  ### Required Parameters
   172  
   173  Name | Type | Description  | Notes
   174  ------------- | ------------- | ------------- | -------------
   175   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   176    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
   177    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
   178    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
   179    **patchOnly** | [**[]PatchOperation**](PatchOperation.md)| Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported. | 
   180  
   181  ### Return type
   182  
   183  [**UserSegment**](UserSegment.md)
   184  
   185  ### Authorization
   186  
   187  [Token](../README.md#Token)
   188  
   189  ### HTTP request headers
   190  
   191   - **Content-Type**: application/json
   192   - **Accept**: application/json
   193  
   194  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   195  
   196  # **PostUserSegment**
   197  > UserSegment PostUserSegment(ctx, projectKey, environmentKey, userSegmentBody)
   198  Creates a new user segment.
   199  
   200  ### Required Parameters
   201  
   202  Name | Type | Description  | Notes
   203  ------------- | ------------- | ------------- | -------------
   204   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   205    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
   206    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
   207    **userSegmentBody** | [**UserSegmentBody**](UserSegmentBody.md)| Create a new user segment. | 
   208  
   209  ### Return type
   210  
   211  [**UserSegment**](UserSegment.md)
   212  
   213  ### Authorization
   214  
   215  [Token](../README.md#Token)
   216  
   217  ### HTTP request headers
   218  
   219   - **Content-Type**: application/json
   220   - **Accept**: application/json
   221  
   222  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   223  
   224  # **UpdateBigSegmentTargets**
   225  > UpdateBigSegmentTargets(ctx, projectKey, environmentKey, userSegmentKey, bigSegmentTargetsBody)
   226  Update targets included or excluded in a big segment
   227  
   228  ### Required Parameters
   229  
   230  Name | Type | Description  | Notes
   231  ------------- | ------------- | ------------- | -------------
   232   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   233    **projectKey** | **string**| The project key, used to tie the flags together under one project so they can be managed together. | 
   234    **environmentKey** | **string**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | 
   235    **userSegmentKey** | **string**| The user segment's key. The key identifies the user segment in your code. | 
   236    **bigSegmentTargetsBody** | [**BigSegmentTargetsBody**](BigSegmentTargetsBody.md)| Add or remove user targets to the included or excluded lists on a big segment. Contact your account manager for early access to this feature. | 
   237  
   238  ### Return type
   239  
   240   (empty response body)
   241  
   242  ### Authorization
   243  
   244  [Token](../README.md#Token)
   245  
   246  ### HTTP request headers
   247  
   248   - **Content-Type**: application/json
   249   - **Accept**: application/json
   250  
   251  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   252