Tools4MSP API v2
Documentations of the previous API versions are availabe here:
auth
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 |
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 |
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 |
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 |
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 |
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 |
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) |
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) |
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. |
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 |
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 |
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. |
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 |
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 |
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. |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |