Skip to content

Commit 642dbbb

Browse files
Merge pull request #1500 from virtualcell/save-biomodel-endpoint
Save BioModel Endpoint
2 parents 81be6ec + 04d06e8 commit 642dbbb

83 files changed

Lines changed: 1963 additions & 920 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@
211211
</repository>
212212

213213
<!-- needed for biomodels.net web services -->
214-
<repository>
215-
<id>ebi-repo</id>
216-
<name>The EBI internal repository</name>
217-
<url>https://www.ebi.ac.uk/~maven/m2repo</url>
218-
<releases>
219-
<enabled>true</enabled>
220-
</releases>
221-
<snapshots>
222-
<enabled>false</enabled>
223-
</snapshots>
224-
</repository>
214+
<!-- <repository>-->
215+
<!-- <id>ebi-repo</id>-->
216+
<!-- <name>The EBI internal repository</name>-->
217+
<!-- <url>https://www.ebi.ac.uk/~maven/m2repo</url>-->
218+
<!-- <releases>-->
219+
<!-- <enabled>true</enabled>-->
220+
<!-- </releases>-->
221+
<!-- <snapshots>-->
222+
<!-- <enabled>false</enabled>-->
223+
<!-- </snapshots>-->
224+
<!-- </repository>-->
225225

226226
<!-- Needed for custom JSBML artifacts we create -->
227227
<repository>

python-restclient/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ docs/ModelType.md
2828
docs/Origin.md
2929
docs/Publication.md
3030
docs/PublicationResourceApi.md
31+
docs/SaveBioModel.md
3132
docs/SchedulerStatus.md
3233
docs/SimulationExecutionStatusRecord.md
3334
docs/SimulationJobStatusRecord.md
@@ -87,6 +88,7 @@ vcell_client/models/mathmodel_ref.py
8788
vcell_client/models/model_type.py
8889
vcell_client/models/origin.py
8990
vcell_client/models/publication.py
91+
vcell_client/models/save_bio_model.py
9092
vcell_client/models/scheduler_status.py
9193
vcell_client/models/simulation_execution_status_record.py
9294
vcell_client/models/simulation_job_status_record.py

python-restclient/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
66
- API version: 1.0.1
77
- Package version: 1.0.0
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
9-
For more information, please visit [http://exampleurl.com/contact](http://exampleurl.com/contact)
9+
For more information, please visit [https://vcell.org](https://vcell.org)
1010

1111
## Requirements.
1212

@@ -56,10 +56,10 @@ import vcell_client
5656
from vcell_client.rest import ApiException
5757
from pprint import pprint
5858

59-
# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
59+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
6060
# See configuration.py for a list of all supported configuration parameters.
6161
configuration = vcell_client.Configuration(
62-
host = "https://vcell-dev.cam.uchc.edu"
62+
host = "https://vcell.cam.uchc.edu"
6363
)
6464

6565
# The client must configure the authentication and authorization parameters
@@ -85,14 +85,15 @@ with vcell_client.ApiClient(configuration) as api_client:
8585

8686
## Documentation for API Endpoints
8787

88-
All URIs are relative to *https://vcell-dev.cam.uchc.edu*
88+
All URIs are relative to *https://vcell.cam.uchc.edu*
8989

9090
Class | Method | HTTP request | Description
9191
------------ | ------------- | ------------- | -------------
9292
*AdminResourceApi* | [**get_usage**](docs/AdminResourceApi.md#get_usage) | **GET** /api/v1/admin/usage | Get usage summary
9393
*BioModelResourceApi* | [**delete_bio_model**](docs/BioModelResourceApi.md#delete_bio_model) | **DELETE** /api/v1/bioModel/{bioModelID} | Delete the BioModel from VCell&#39;s database.
94-
*BioModelResourceApi* | [**get_biomodel_by_id**](docs/BioModelResourceApi.md#get_biomodel_by_id) | **GET** /api/v1/bioModel/{bioModelID} | Get BioModel information in JSON format by ID.
95-
*BioModelResourceApi* | [**upload_bio_model**](docs/BioModelResourceApi.md#upload_bio_model) | **POST** /api/v1/bioModel/upload_bioModel | Upload the BioModel to VCell database. Returns BioModel ID.
94+
*BioModelResourceApi* | [**get_bio_model**](docs/BioModelResourceApi.md#get_bio_model) | **GET** /api/v1/bioModel/{bioModelID} | Get BioModel.
95+
*BioModelResourceApi* | [**get_bio_model_vcml**](docs/BioModelResourceApi.md#get_bio_model_vcml) | **GET** /api/v1/bioModel/{bioModelID}/vcml_download | Get the BioModel in VCML format.
96+
*BioModelResourceApi* | [**save_bio_model**](docs/BioModelResourceApi.md#save_bio_model) | **POST** /api/v1/bioModel/save | Save&#39;s the given BioModel. Optional parameters of name and simulations to update due to math changes. Returns saved BioModel as VCML.
9697
*FieldDataResourceApi* | [**advanced_create**](docs/FieldDataResourceApi.md#advanced_create) | **POST** /api/v1/fieldData/advancedCreate | Create Field Data with granular detail in one request.The following files are accepted: .tif and .zip.
9798
*FieldDataResourceApi* | [**analyze_file**](docs/FieldDataResourceApi.md#analyze_file) | **POST** /api/v1/fieldData/analyzeFile | Analyze uploaded image file (Tiff, Zip, and Non-GPL BioFormats) and return field data. Color mapped images not supported (the colors in those images will be interpreted as separate channels). Filenames must be lowercase alphanumeric, and can contain underscores.
9899
*FieldDataResourceApi* | [**copy_models_field_data**](docs/FieldDataResourceApi.md#copy_models_field_data) | **POST** /api/v1/fieldData/copyModelsFieldData | Copy all existing field data from a BioModel/MathModel that you have access to, but don&#39;t own.
@@ -149,6 +150,7 @@ Class | Method | HTTP request | Description
149150
- [ModelType](docs/ModelType.md)
150151
- [Origin](docs/Origin.md)
151152
- [Publication](docs/Publication.md)
153+
- [SaveBioModel](docs/SaveBioModel.md)
152154
- [SchedulerStatus](docs/SchedulerStatus.md)
153155
- [SimulationExecutionStatusRecord](docs/SimulationExecutionStatusRecord.md)
154156
- [SimulationJobStatusRecord](docs/SimulationJobStatusRecord.md)

python-restclient/docs/AdminResourceApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vcell_client.AdminResourceApi
22

3-
All URIs are relative to *https://vcell-dev.cam.uchc.edu*
3+
All URIs are relative to *https://vcell.cam.uchc.edu*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
@@ -21,10 +21,10 @@ import vcell_client
2121
from vcell_client.rest import ApiException
2222
from pprint import pprint
2323

24-
# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
24+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
2525
# See configuration.py for a list of all supported configuration parameters.
2626
configuration = vcell_client.Configuration(
27-
host = "https://vcell-dev.cam.uchc.edu"
27+
host = "https://vcell.cam.uchc.edu"
2828
)
2929

3030
# The client must configure the authentication and authorization parameters

python-restclient/docs/BioModelResourceApi.md

Lines changed: 94 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# vcell_client.BioModelResourceApi
22

3-
All URIs are relative to *https://vcell-dev.cam.uchc.edu*
3+
All URIs are relative to *https://vcell.cam.uchc.edu*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**delete_bio_model**](BioModelResourceApi.md#delete_bio_model) | **DELETE** /api/v1/bioModel/{bioModelID} | Delete the BioModel from VCell&#39;s database.
8-
[**get_biomodel_by_id**](BioModelResourceApi.md#get_biomodel_by_id) | **GET** /api/v1/bioModel/{bioModelID} | Get BioModel information in JSON format by ID.
9-
[**upload_bio_model**](BioModelResourceApi.md#upload_bio_model) | **POST** /api/v1/bioModel/upload_bioModel | Upload the BioModel to VCell database. Returns BioModel ID.
8+
[**get_bio_model**](BioModelResourceApi.md#get_bio_model) | **GET** /api/v1/bioModel/{bioModelID} | Get BioModel.
9+
[**get_bio_model_vcml**](BioModelResourceApi.md#get_bio_model_vcml) | **GET** /api/v1/bioModel/{bioModelID}/vcml_download | Get the BioModel in VCML format.
10+
[**save_bio_model**](BioModelResourceApi.md#save_bio_model) | **POST** /api/v1/bioModel/save | Save&#39;s the given BioModel. Optional parameters of name and simulations to update due to math changes. Returns saved BioModel as VCML.
1011

1112

1213
# **delete_bio_model**
@@ -23,10 +24,10 @@ import vcell_client
2324
from vcell_client.rest import ApiException
2425
from pprint import pprint
2526

26-
# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
27+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
2728
# See configuration.py for a list of all supported configuration parameters.
2829
configuration = vcell_client.Configuration(
29-
host = "https://vcell-dev.cam.uchc.edu"
30+
host = "https://vcell.cam.uchc.edu"
3031
)
3132

3233

@@ -71,10 +72,10 @@ No authorization required
7172

7273
[[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)
7374

74-
# **get_biomodel_by_id**
75-
> BioModel get_biomodel_by_id(bio_model_id)
75+
# **get_bio_model**
76+
> BioModel get_bio_model(bio_model_id)
7677
77-
Get BioModel information in JSON format by ID.
78+
Get BioModel.
7879

7980
### Example
8081

@@ -86,10 +87,10 @@ from vcell_client.models.bio_model import BioModel
8687
from vcell_client.rest import ApiException
8788
from pprint import pprint
8889

89-
# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
90+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
9091
# See configuration.py for a list of all supported configuration parameters.
9192
configuration = vcell_client.Configuration(
92-
host = "https://vcell-dev.cam.uchc.edu"
93+
host = "https://vcell.cam.uchc.edu"
9394
)
9495

9596

@@ -100,12 +101,12 @@ with vcell_client.ApiClient(configuration) as api_client:
100101
bio_model_id = 'bio_model_id_example' # str |
101102

102103
try:
103-
# Get BioModel information in JSON format by ID.
104-
api_response = api_instance.get_biomodel_by_id(bio_model_id)
105-
print("The response of BioModelResourceApi->get_biomodel_by_id:\n")
104+
# Get BioModel.
105+
api_response = api_instance.get_bio_model(bio_model_id)
106+
print("The response of BioModelResourceApi->get_bio_model:\n")
106107
pprint(api_response)
107108
except Exception as e:
108-
print("Exception when calling BioModelResourceApi->get_biomodel_by_id: %s\n" % e)
109+
print("Exception when calling BioModelResourceApi->get_bio_model: %s\n" % e)
109110
```
110111

111112

@@ -132,29 +133,93 @@ No authorization required
132133
### HTTP response details
133134
| Status code | Description | Response headers |
134135
|-------------|-------------|------------------|
135-
**200** | return BioModel information in JSON format | - |
136-
**404** | BioModel not found | - |
136+
**200** | OK | - |
137+
138+
[[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)
139+
140+
# **get_bio_model_vcml**
141+
> str get_bio_model_vcml(bio_model_id)
142+
143+
Get the BioModel in VCML format.
144+
145+
### Example
146+
147+
```python
148+
import time
149+
import os
150+
import vcell_client
151+
from vcell_client.rest import ApiException
152+
from pprint import pprint
153+
154+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
155+
# See configuration.py for a list of all supported configuration parameters.
156+
configuration = vcell_client.Configuration(
157+
host = "https://vcell.cam.uchc.edu"
158+
)
159+
160+
161+
# Enter a context with an instance of the API client
162+
with vcell_client.ApiClient(configuration) as api_client:
163+
# Create an instance of the API class
164+
api_instance = vcell_client.BioModelResourceApi(api_client)
165+
bio_model_id = 'bio_model_id_example' # str |
166+
167+
try:
168+
# Get the BioModel in VCML format.
169+
api_response = api_instance.get_bio_model_vcml(bio_model_id)
170+
print("The response of BioModelResourceApi->get_bio_model_vcml:\n")
171+
pprint(api_response)
172+
except Exception as e:
173+
print("Exception when calling BioModelResourceApi->get_bio_model_vcml: %s\n" % e)
174+
```
175+
176+
177+
178+
### Parameters
179+
180+
Name | Type | Description | Notes
181+
------------- | ------------- | ------------- | -------------
182+
**bio_model_id** | **str**| |
183+
184+
### Return type
185+
186+
**str**
187+
188+
### Authorization
189+
190+
No authorization required
191+
192+
### HTTP request headers
193+
194+
- **Content-Type**: Not defined
195+
- **Accept**: text/xml
196+
197+
### HTTP response details
198+
| Status code | Description | Response headers |
199+
|-------------|-------------|------------------|
200+
**200** | OK | - |
137201

138202
[[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)
139203

140-
# **upload_bio_model**
141-
> str upload_bio_model(body=body)
204+
# **save_bio_model**
205+
> str save_bio_model(save_bio_model=save_bio_model)
142206
143-
Upload the BioModel to VCell database. Returns BioModel ID.
207+
Save's the given BioModel. Optional parameters of name and simulations to update due to math changes. Returns saved BioModel as VCML.
144208

145209
### Example
146210

147211
```python
148212
import time
149213
import os
150214
import vcell_client
215+
from vcell_client.models.save_bio_model import SaveBioModel
151216
from vcell_client.rest import ApiException
152217
from pprint import pprint
153218

154-
# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
219+
# Defining the host is optional and defaults to https://vcell.cam.uchc.edu
155220
# See configuration.py for a list of all supported configuration parameters.
156221
configuration = vcell_client.Configuration(
157-
host = "https://vcell-dev.cam.uchc.edu"
222+
host = "https://vcell.cam.uchc.edu"
158223
)
159224

160225
# The client must configure the authentication and authorization parameters
@@ -166,15 +231,15 @@ configuration = vcell_client.Configuration(
166231
with vcell_client.ApiClient(configuration) as api_client:
167232
# Create an instance of the API class
168233
api_instance = vcell_client.BioModelResourceApi(api_client)
169-
body = 'body_example' # str | (optional)
234+
save_bio_model = vcell_client.SaveBioModel() # SaveBioModel | (optional)
170235

171236
try:
172-
# Upload the BioModel to VCell database. Returns BioModel ID.
173-
api_response = api_instance.upload_bio_model(body=body)
174-
print("The response of BioModelResourceApi->upload_bio_model:\n")
237+
# Save's the given BioModel. Optional parameters of name and simulations to update due to math changes. Returns saved BioModel as VCML.
238+
api_response = api_instance.save_bio_model(save_bio_model=save_bio_model)
239+
print("The response of BioModelResourceApi->save_bio_model:\n")
175240
pprint(api_response)
176241
except Exception as e:
177-
print("Exception when calling BioModelResourceApi->upload_bio_model: %s\n" % e)
242+
print("Exception when calling BioModelResourceApi->save_bio_model: %s\n" % e)
178243
```
179244

180245

@@ -183,7 +248,7 @@ with vcell_client.ApiClient(configuration) as api_client:
183248

184249
Name | Type | Description | Notes
185250
------------- | ------------- | ------------- | -------------
186-
**body** | **str**| | [optional]
251+
**save_bio_model** | [**SaveBioModel**](SaveBioModel.md)| | [optional]
187252

188253
### Return type
189254

@@ -195,8 +260,8 @@ Name | Type | Description | Notes
195260

196261
### HTTP request headers
197262

198-
- **Content-Type**: text/xml
199-
- **Accept**: text/plain
263+
- **Content-Type**: application/json
264+
- **Accept**: application/xml
200265

201266
### HTTP response details
202267
| Status code | Description | Response headers |

0 commit comments

Comments
 (0)