Tools4MSP API v1
The documentation of the last API version is available here: Tools4MSP API v2
api
casestudies > list
Return the list of available CaseStudies.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
casestudies > create
Add a new Case Study Adds a new Case Study to the server. To add additional inputs use the following methods:
- see /casestudies/{casestudyId}/layers for adding a new Layer
- see /casestudies/{casestudyId}/inputs from adding new input parameters or datasets
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
module required | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype required | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms required | |
visibility |
casestudies > read
Return a CaseStudy instance.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
casestudies > update
Update a CaseStudy.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
module required | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype required | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms required | |
visibility |
casestudies > partial_update
Update one or more fields on an existing CaseStudy.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | CaseStudy title |
description | CaseStudy description |
module | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms | |
visibility |
casestudies > delete
Remove an existing CaseStudy.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
casestudies > clone
[DEPRECATED: see cloneupdate] Clone/duplicate the CaseStudy. The reference to the new CaseStudy will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
casestudies > cloneupdate
Clone/duplicate the CaseStudy allowing the updating of parameters/metadata. The reference to the new CaseStudy will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
casestudies > run
Execute an analysis for the current CaseStudy according to the CaseStudy configuration. The reference to a new CaseStudyRun will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
selected_layers | Comma-separated list of layer codes |
runtypelevel | Level of run type: 3 (default) |
pivot_layer | Codedlabel of the Pivot Layer to use for the analysis |
casestudies > setcontext
Set the input parameters for the current CaseStudy according to the specified context (see. thesaurus of available Contexts).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
context_label required | |
id required | A unique integer value identifying this case study. |
casestudies > inputs > list
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
casestudies > inputs > create
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description | |
vizmode |
casestudies > inputs > read
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
casestudies > inputs > update
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description | |
vizmode |
casestudies > inputs > partial_update
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label | |
description | |
vizmode |
casestudies > inputs > delete
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
casestudies > inputs > tupload
Upload a thumbnail image (eg. png) into a CaseStudyInput object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/inputs/{id}/tupload/
input_file = "[path to the thumbnail image]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > inputs > upload
Upload an input parameters file (JSON) into a CaseStudyInput object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/inputs/{id}/upload/
input_file = "[path to the JSON file]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > layers > list
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
casestudies > layers > create
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description |
casestudies > layers > read
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
casestudies > layers > update
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description |
casestudies > layers > partial_update
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label | |
description |
casestudies > layers > delete
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
casestudies > layers > tupload
Upload a thumbnail image (eg. png) into a CaseStudyLayer object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/layers/{id}/tupload/
input_file = "[path to the thumbnail image]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > layers > upload
Upload a geotiff file into a CaseStudyLayer object. Projection, extension and resolution should be the same for all layers.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/layers/{id}/upload/
input_file = "[path to the geotiff file]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudyruns > read
API endpoint that allows CaseStudyRuns to be viewed.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
casestudyruns > partial_update
API endpoint that allows CaseStudyRuns to be viewed.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | |
description | |
domain_area | |
visibility |
codedlabels > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
code required |
contexts > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this context. |
domainareas > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this domain area. |
casestudyruns
read
API endpoint that allows CaseStudyRuns to be viewed.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
partial_update
API endpoint that allows CaseStudyRuns to be viewed.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | |
description | |
domain_area | |
visibility |
v2
casestudies > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
cstype | |
module | |
tag | |
owner |
casestudies > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
module required | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype required | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms required | |
visibility |
casestudies > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
casestudies > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
module required | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype required | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms required | |
visibility |
casestudies > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | CaseStudy title |
description | CaseStudy description |
module | Module type. Accepted values are: cea, muc, partrac, pmar, testmodule, geodatamaker |
cstype | CaseStudy type. Accepted values are: default, customized |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
resolution | Default resolution for raster based analysis (meters) |
domain_area | GeoJSON rapresentation of the CaseStudy domain area (MultiPolygon Lat Log WGS84) |
domain_area_terms | |
visibility |
casestudies > delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cstype | |
module | |
tag | |
owner |
casestudies > asyncrun
[DEPRECATED: see asyncrunpost] Execute an analysis for the current CaseStudy according to the CaseStudy configuration. The reference to a new CaseStudyRun will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
selected_layers | Comma-separated list of layer codes |
runtypelevel | Level of run type: 3 (default) |
casestudies > asyncrunpost
Execute an analysis for the current CaseStudy according to the CaseStudy configuration. The reference to a new CaseStudyRun will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | |
description | |
domain_area | |
selected_layers | Comma-separated list of layer codes |
runtypelevel | Level of run type: 3 (default) |
casestudies > clone
[DEPRECATED: see cloneupdate] Clone/duplicate the CaseStudy. The reference to the new CaseStudy will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
casestudies > cloneupdate
Clone/duplicate the CaseStudy allowing the updating of parameters/metadata. The reference to the new CaseStudy will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label required | CaseStudy title |
description | CaseStudy description |
tag | Free tag, label or keyword to facilitate CaseStudy identification and search |
casestudies > run
Execute an analysis for the current CaseStudy according to the CaseStudy configuration. The reference to a new CaseStudyRun will be returned.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this case study. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
selected_layers | Comma-separated list of layer codes |
runtypelevel | Level of run type: 3 (default) |
pivot_layer | Codedlabel of the Pivot Layer to use for the analysis |
casestudies > setcontext
Set the input parameters for the current CaseStudy according to the specified context (see. thesaurus of available Contexts).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
context_label required | |
id required | A unique integer value identifying this case study. |
casestudies > inputs > list
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
casestudies > inputs > create
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description | |
vizmode |
casestudies > inputs > read
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
casestudies > inputs > update
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description | |
vizmode |
casestudies > inputs > partial_update
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label | |
description | |
vizmode |
casestudies > inputs > delete
API endpoint that allows CaseStudyInput datasets to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
casestudies > inputs > tupload
Upload a thumbnail image (eg. png) into a CaseStudyInput object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/inputs/{id}/tupload/
input_file = "[path to the thumbnail image]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > inputs > upload
Upload an input parameters file (JSON) into a CaseStudyInput object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/inputs/{id}/upload/
input_file = "[path to the JSON file]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study input. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > layers > list
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
casestudies > layers > create
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description |
casestudies > layers > read
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
casestudies > layers > update
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label required | |
description |
casestudies > layers > partial_update
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
coded_label | |
description |
casestudies > layers > delete
API endpoint that allows CaseStudyLayers to be viewed or edited.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
casestudies > layers > tupload
Upload a thumbnail image (eg. png) into a CaseStudyLayer object.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/layers/{id}/tupload/
input_file = "[path to the thumbnail image]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudies > layers > upload
Upload a geotiff file into a CaseStudyLayer object. Projection, extension and resolution should be the same for all layers.
Basic usage example in python
import requests
url = "https://api.tools4msp.eu/api/casestudies/{parent_lookup_casestudy__id}/layers/{id}/upload/
input_file = "[path to the geotiff file]"
with open(input_file, 'rb') as f:
files = {'file': f}
r = requests.put(url, auth=('Token', TOKEN), files=files)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
parent_lookup_casestudy__id required | |
id required | A unique integer value identifying this case study layer. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
file required |
casestudyruns > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
casestudy |
casestudyruns > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
casestudy |
casestudyruns > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
casestudy |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
label | |
description | |
domain_area | |
visibility |
casestudyruns > delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
casestudy |
codedlabels > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
group | |
case_study_id | |
search |
codedlabels > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
code required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
group | |
case_study_id | |
search |
contexts > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
label | |
search |
contexts > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this context. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
label | |
search |
domainareas > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this domain area. |
pressureweights > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
context__label | |
pres__code | |
use__code |
pressureweights > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context required | |
use required | |
pres required | |
weight required | |
distance | |
confidence | |
references | |
notes |
pressureweights > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this Pressure weight. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
use__code |
pressureweights > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this Pressure weight. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
use__code |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context required | |
use required | |
pres required | |
weight required | |
distance | |
confidence | |
references | |
notes |
pressureweights > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this Pressure weight. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
use__code |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context | |
use | |
pres | |
weight | |
distance | |
confidence | |
references | |
notes |
sensitivities > list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
context__label | |
pres__code | |
env__code |
sensitivities > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context required | |
pres required | |
env required | |
impact_level | |
recovery | |
sensitivity required | |
confidence | |
references | |
notes |
sensitivities > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this sensitivity. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
env__code |
sensitivities > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this sensitivity. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
env__code |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context required | |
pres required | |
env required | |
impact_level | |
recovery | |
sensitivity required | |
confidence | |
references | |
notes |
sensitivities > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this sensitivity. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
context__label | |
pres__code | |
env__code |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
context | |
pres | |
env | |
impact_level | |
recovery | |
sensitivity | |
confidence | |
references | |
notes |