|
| 1 | +# sysml_v2_api_client.BranchApi |
| 2 | + |
| 3 | +All URIs are relative to *http://localhost* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**get_branches_by_project**](BranchApi.md#get_branches_by_project) | **GET** /projects/{projectId}/branches | Get branches by project |
| 8 | +[**get_branches_by_project_and_id**](BranchApi.md#get_branches_by_project_and_id) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID |
| 9 | +[**post_branch_by_project**](BranchApi.md#post_branch_by_project) | **POST** /projects/{projectId}/branches | Create branch by project |
| 10 | + |
| 11 | + |
| 12 | +# **get_branches_by_project** |
| 13 | +> list[Branch] get_branches_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size) |
| 14 | +
|
| 15 | +Get branches by project |
| 16 | + |
| 17 | +### Example |
| 18 | + |
| 19 | +```python |
| 20 | +from __future__ import print_function |
| 21 | +import time |
| 22 | +import sysml_v2_api_client |
| 23 | +from sysml_v2_api_client.rest import ApiException |
| 24 | +from pprint import pprint |
| 25 | +# Defining the host is optional and defaults to http://localhost |
| 26 | +# See configuration.py for a list of all supported configuration parameters. |
| 27 | +configuration = sysml_v2_api_client.Configuration( |
| 28 | + host = "http://localhost" |
| 29 | +) |
| 30 | + |
| 31 | + |
| 32 | +# Enter a context with an instance of the API client |
| 33 | +with sysml_v2_api_client.ApiClient() as api_client: |
| 34 | + # Create an instance of the API class |
| 35 | + api_instance = sysml_v2_api_client.BranchApi(api_client) |
| 36 | + project_id = 'project_id_example' # str | ID of the project |
| 37 | +page_after = 'page_after_example' # str | Page after (optional) |
| 38 | +page_before = 'page_before_example' # str | Page before (optional) |
| 39 | +page_size = 56 # int | Page size (optional) |
| 40 | + |
| 41 | + try: |
| 42 | + # Get branches by project |
| 43 | + api_response = api_instance.get_branches_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size) |
| 44 | + pprint(api_response) |
| 45 | + except ApiException as e: |
| 46 | + print("Exception when calling BranchApi->get_branches_by_project: %s\n" % e) |
| 47 | +``` |
| 48 | + |
| 49 | +### Parameters |
| 50 | + |
| 51 | +Name | Type | Description | Notes |
| 52 | +------------- | ------------- | ------------- | ------------- |
| 53 | + **project_id** | [**str**](.md)| ID of the project | |
| 54 | + **page_after** | **str**| Page after | [optional] |
| 55 | + **page_before** | **str**| Page before | [optional] |
| 56 | + **page_size** | **int**| Page size | [optional] |
| 57 | + |
| 58 | +### Return type |
| 59 | + |
| 60 | +[**list[Branch]**](Branch.md) |
| 61 | + |
| 62 | +### Authorization |
| 63 | + |
| 64 | +No authorization required |
| 65 | + |
| 66 | +### HTTP request headers |
| 67 | + |
| 68 | + - **Content-Type**: Not defined |
| 69 | + - **Accept**: application/json |
| 70 | + |
| 71 | +### HTTP response details |
| 72 | +| Status code | Description | Response headers | |
| 73 | +|-------------|-------------|------------------| |
| 74 | +**200** | Ok | - | |
| 75 | +**404** | Not found. | - | |
| 76 | +**415** | The requested content type is not acceptable. | - | |
| 77 | +**500** | Internal server error. | - | |
| 78 | +**0** | Unexpected response. | - | |
| 79 | + |
| 80 | +[[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) |
| 81 | + |
| 82 | +# **get_branches_by_project_and_id** |
| 83 | +> Branch get_branches_by_project_and_id(project_id, branch_id) |
| 84 | +
|
| 85 | +Get branch by project and ID |
| 86 | + |
| 87 | +### Example |
| 88 | + |
| 89 | +```python |
| 90 | +from __future__ import print_function |
| 91 | +import time |
| 92 | +import sysml_v2_api_client |
| 93 | +from sysml_v2_api_client.rest import ApiException |
| 94 | +from pprint import pprint |
| 95 | +# Defining the host is optional and defaults to http://localhost |
| 96 | +# See configuration.py for a list of all supported configuration parameters. |
| 97 | +configuration = sysml_v2_api_client.Configuration( |
| 98 | + host = "http://localhost" |
| 99 | +) |
| 100 | + |
| 101 | + |
| 102 | +# Enter a context with an instance of the API client |
| 103 | +with sysml_v2_api_client.ApiClient() as api_client: |
| 104 | + # Create an instance of the API class |
| 105 | + api_instance = sysml_v2_api_client.BranchApi(api_client) |
| 106 | + project_id = 'project_id_example' # str | ID of the project |
| 107 | +branch_id = 'branch_id_example' # str | ID of the branch |
| 108 | + |
| 109 | + try: |
| 110 | + # Get branch by project and ID |
| 111 | + api_response = api_instance.get_branches_by_project_and_id(project_id, branch_id) |
| 112 | + pprint(api_response) |
| 113 | + except ApiException as e: |
| 114 | + print("Exception when calling BranchApi->get_branches_by_project_and_id: %s\n" % e) |
| 115 | +``` |
| 116 | + |
| 117 | +### Parameters |
| 118 | + |
| 119 | +Name | Type | Description | Notes |
| 120 | +------------- | ------------- | ------------- | ------------- |
| 121 | + **project_id** | [**str**](.md)| ID of the project | |
| 122 | + **branch_id** | [**str**](.md)| ID of the branch | |
| 123 | + |
| 124 | +### Return type |
| 125 | + |
| 126 | +[**Branch**](Branch.md) |
| 127 | + |
| 128 | +### Authorization |
| 129 | + |
| 130 | +No authorization required |
| 131 | + |
| 132 | +### HTTP request headers |
| 133 | + |
| 134 | + - **Content-Type**: Not defined |
| 135 | + - **Accept**: application/json |
| 136 | + |
| 137 | +### HTTP response details |
| 138 | +| Status code | Description | Response headers | |
| 139 | +|-------------|-------------|------------------| |
| 140 | +**200** | Ok | - | |
| 141 | +**404** | Not found. | - | |
| 142 | +**415** | The requested content type is not acceptable. | - | |
| 143 | +**500** | Internal server error. | - | |
| 144 | +**0** | Unexpected response. | - | |
| 145 | + |
| 146 | +[[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) |
| 147 | + |
| 148 | +# **post_branch_by_project** |
| 149 | +> Branch post_branch_by_project(project_id, body) |
| 150 | +
|
| 151 | +Create branch by project |
| 152 | + |
| 153 | +### Example |
| 154 | + |
| 155 | +```python |
| 156 | +from __future__ import print_function |
| 157 | +import time |
| 158 | +import sysml_v2_api_client |
| 159 | +from sysml_v2_api_client.rest import ApiException |
| 160 | +from pprint import pprint |
| 161 | +# Defining the host is optional and defaults to http://localhost |
| 162 | +# See configuration.py for a list of all supported configuration parameters. |
| 163 | +configuration = sysml_v2_api_client.Configuration( |
| 164 | + host = "http://localhost" |
| 165 | +) |
| 166 | + |
| 167 | + |
| 168 | +# Enter a context with an instance of the API client |
| 169 | +with sysml_v2_api_client.ApiClient() as api_client: |
| 170 | + # Create an instance of the API class |
| 171 | + api_instance = sysml_v2_api_client.BranchApi(api_client) |
| 172 | + project_id = 'project_id_example' # str | ID of the project |
| 173 | +body = sysml_v2_api_client.Branch() # Branch | |
| 174 | + |
| 175 | + try: |
| 176 | + # Create branch by project |
| 177 | + api_response = api_instance.post_branch_by_project(project_id, body) |
| 178 | + pprint(api_response) |
| 179 | + except ApiException as e: |
| 180 | + print("Exception when calling BranchApi->post_branch_by_project: %s\n" % e) |
| 181 | +``` |
| 182 | + |
| 183 | +### Parameters |
| 184 | + |
| 185 | +Name | Type | Description | Notes |
| 186 | +------------- | ------------- | ------------- | ------------- |
| 187 | + **project_id** | [**str**](.md)| ID of the project | |
| 188 | + **body** | [**Branch**](Branch.md)| | |
| 189 | + |
| 190 | +### Return type |
| 191 | + |
| 192 | +[**Branch**](Branch.md) |
| 193 | + |
| 194 | +### Authorization |
| 195 | + |
| 196 | +No authorization required |
| 197 | + |
| 198 | +### HTTP request headers |
| 199 | + |
| 200 | + - **Content-Type**: application/json |
| 201 | + - **Accept**: application/json |
| 202 | + |
| 203 | +### HTTP response details |
| 204 | +| Status code | Description | Response headers | |
| 205 | +|-------------|-------------|------------------| |
| 206 | +**201** | Created | - | |
| 207 | +**415** | The requested content type is not acceptable. | - | |
| 208 | +**500** | Internal server error. | - | |
| 209 | +**0** | Unexpected response. | - | |
| 210 | + |
| 211 | +[[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) |
| 212 | + |
0 commit comments