MS2 API (1.0.0)

Download OpenAPI specification:Download

MS2 API

Published for maintaing metadata about the models, such as when it was created, the model type, and other key pieces of information for the archive.

Authentication

API to get auth token.

Authentication

Get authorization access token.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "roles": [
    ],
  • "expirationTime": 0,
  • "accessToken": "string"
}

External Partners

APIs to manage models

Create Model

Add a new model.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
twdb_flood_planning_project_ids
string

Identifier(s) associated with FMP, FME, FMS in the regional flood plan. Each entry is a 9 digit number where the first 2 digits are the Flood Planning Region identifier; followed by "1" (for FME), "2" (for FMS), or "3" (for FMP); followed by a 6-digit unique sequence generated by vendor.

collection_id
string
counties
string

County or counties that your model spans.

cities
string

Comma seperated values. City or cities that your model spans; will be used for spatial analysis.

time_periods
Array of strings[ items ]
model_name
string

A name given to the model and its associated configuration.

model_description
string

The description may include an abstract, a table of contents, or a free-text account of the model.

model_types
string
external_model_identifier
string

MODEL_ID from ModelCoverage feature class. This is a 12-digit number where the first 2-digits are the Flood Planning Region identifier, followed by regionally unique 10-digit number.

software_abbreviation
string

The name of the software used. Refer get-software-list API endpoint to get the supported list.

software_version
string

The version of the software used.

origination_agency_id
integer

The name of organization(s) or person(s) who should be cited as contributing to the creation of the model. Also referred to as an "author", "contributor", "creator".

model_created
string <date> YYYY-MM-DD

The date the model was created.

model_last_updated
string <date> YYYY-MM-DD

The date when the model was last updated.

model_update_interval
string
Default: "None"
use_constraints
string
Default: "Public"
contacts
string

Primary point(s) of contact for this model. At least one contact is required. [{User_Id,Role_Id},{User_Id,Role_Id}]

documentation_filenames
string

List of filenames of any supporting documentation to be included in the model upload (e.g. "about.txt").

chain_custody
string

Comma sepearetd values. A statement of any changes in ownership and custody of the model since its creation that are significant for its authenticity, integrity, and interpretation. The statement may include a description of any changes successive custodians made to the model.

huc
string

Comma seperated value.12-digit Hydrologic Unit Code(s) identifying the watershed(s).

model_purpose
string

A description of the purpose for the creation of this model and/or the expected use.

license
string
tdis_identifier
string

Flood Planning Region number.

userId
integer

Responses

Request samples

Content type
application/json
{
  • "twdb_flood_planning_project_ids": "023000091,023000092",
  • "collection_id": "string",
  • "counties": "Denton,Archer",
  • "cities": "Frisco,Agua Dulce",
  • "time_periods": [
    ],
  • "model_name": "string",
  • "model_description": "string",
  • "model_types": "string",
  • "external_model_identifier": "020000000091",
  • "software_abbreviation": "string",
  • "software_version": "string",
  • "origination_agency_id": 0,
  • "model_created": "2019-08-24",
  • "model_last_updated": "2019-08-24",
  • "model_update_interval": "None",
  • "use_constraints": "Public",
  • "contacts": "{277,1},{277,9}",
  • "documentation_filenames": "string",
  • "chain_custody": "Chain of Custody,Chain of custody 1",
  • "huc": "111201040402,111201040602",
  • "model_purpose": "string",
  • "license": "string",
  • "tdis_identifier": "string",
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Update Model

Update an existing model.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
twdb_flood_planning_project_ids
string

Identifier(s) associated with FMP, FME, FMS in the regional flood plan. Each entry is a 9 digit number where the first 2 digits are the Flood Planning Region identifier; followed by "1" (for FME), "2" (for FMS), or "3" (for FMP); followed by a 6-digit unique sequence generated by vendor.

collection_id
string
counties
string

County or counties that your model spans.

cities
string

Comma seperated values. City or cities that your model spans; will be used for spatial analysis.

time_periods
Array of strings[ items ]
model_name
string

A name given to the model and its associated configuration.

model_description
string

The description may include an abstract, a table of contents, or a free-text account of the model.

model_types
string
external_model_identifier
string

MODEL_ID from ModelCoverage feature class. This is a 12-digit number where the first 2-digits are the Flood Planning Region identifier, followed by regionally unique 10-digit number.

software_abbreviation
string

The name of the software used. Refer get-software-list API endpoint to get the supported list.

software_version
string

The version of the software used.

origination_agency_id
integer

The name of organization(s) or person(s) who should be cited as contributing to the creation of the model. Also referred to as an "author", "contributor", "creator".

model_created
string <date> YYYY-MM-DD

The date the model was created.

model_last_updated
string <date> YYYY-MM-DD

The date when the model was last updated.

model_update_interval
string
Default: "None"
use_constraints
string
Default: "Public"
contacts
string

Primary point(s) of contact for this model. At least one contact is required. [{User_Id,Role_Id},{User_Id,Role_Id}]

documentation_filenames
string

List of filenames of any supporting documentation to be included in the model upload (e.g. "about.txt").

chain_custody
string

Comma sepearetd values. A statement of any changes in ownership and custody of the model since its creation that are significant for its authenticity, integrity, and interpretation. The statement may include a description of any changes successive custodians made to the model.

huc
string

Comma seperated value.12-digit Hydrologic Unit Code(s) identifying the watershed(s).

model_purpose
string

A description of the purpose for the creation of this model and/or the expected use.

license
string
tdis_identifier
string

Flood Planning Region number.

userId
integer

Responses

Request samples

Content type
application/json
{
  • "twdb_flood_planning_project_ids": "023000091,023000092",
  • "collection_id": "string",
  • "counties": "Denton,Archer",
  • "cities": "Frisco,Agua Dulce",
  • "time_periods": [
    ],
  • "model_name": "string",
  • "model_description": "string",
  • "model_types": "string",
  • "external_model_identifier": "020000000091",
  • "software_abbreviation": "string",
  • "software_version": "string",
  • "origination_agency_id": 0,
  • "model_created": "2019-08-24",
  • "model_last_updated": "2019-08-24",
  • "model_update_interval": "None",
  • "use_constraints": "Public",
  • "contacts": "{277,1},{277,9}",
  • "documentation_filenames": "string",
  • "chain_custody": "Chain of Custody,Chain of custody 1",
  • "huc": "111201040402,111201040602",
  • "model_purpose": "string",
  • "license": "string",
  • "tdis_identifier": "string",
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Clone Model

Duplicate an existing model.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
tdis_identifier
string

Responses

Request samples

Content type
application/json
{
  • "tdis_identifier": "string"
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Delete Model

Delete an existing model.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
tdis_identifier
string

Responses

Request samples

Content type
application/json
{
  • "tdis_identifier": "string"
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Model by ID

Get Models by TDIS Identifier.

Authorizations:
ApiKeyAuth
path Parameters
model_tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Models By User

Get all the models by user.

Authorizations:
ApiKeyAuth
path Parameters
username
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Models By Project Identifier

Get all the models by project identifier.

Authorizations:
ApiKeyAuth
query Parameters
project_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Models By Search Field

Get models by project identifier or external identifier.

Authorizations:
ApiKeyAuth
query Parameters
search_field
required
string

Search field (project_identifier or external_identifier).

value
required
string

Search value.

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Search Models

Search models by search terms

path Parameters
search_terms
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Accept Model

Accept Model

Authorizations:
ApiKeyAuth
Request Body schema: application/json
userId
string
tdis_identifiers
string
username
string
comments
string

Responses

Request samples

Content type
application/json
{
  • "userId": "string",
  • "tdis_identifiers": "string",
  • "username": "string",
  • "comments": "string"
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

List Models

Get all the models by admin user.

Authorizations:
ApiKeyAuth
path Parameters
username
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Set Model Status

Set Model Status

Authorizations:
ApiKeyAuth
Request Body schema: application/json
userId
string
tdis_identifiers
string
status
string
Enum: "accepted" "pending" "rejected" "in progress"
username
string
comments
string

Responses

Request samples

Content type
application/json
{
  • "userId": "string",
  • "tdis_identifiers": "string",
  • "status": "accepted",
  • "username": "string",
  • "comments": "string"
}

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Metadata

APIs to support models

List Contacts

Get List of Contacts

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Contact Roles

Get list of contact roles.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

List Existing Collections

Get the list of existing collections

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

List Softwares

Get list of softwares in the system.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

List Agencies

Get the list of agencies in the system.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

List files of Model

Get the list of uploaded files by TDIS identifier.

Authorizations:
ApiKeyAuth
path Parameters
tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Get Model Archive Files

Get archive files by TDIS Identifier

Authorizations:
ApiKeyAuth
path Parameters
model_tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Messages

Get all the messages of a model.

Authorizations:
ApiKeyAuth
path Parameters
tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Upload Conflicts

Get Conflicts By Model.

Authorizations:
ApiKeyAuth
path Parameters
model_tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "features": [
    ]
}

Notifications

Get Notifications By Model.

Authorizations:
ApiKeyAuth
path Parameters
model_tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}

Model History

Get the changes made on the model.

Authorizations:
ApiKeyAuth
path Parameters
tdis_identifier
required
string

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "properties": {
    }
}