TCS AH API used by ICS-C
Endpoints
episode-elements
GET
plain
get /api/epos/episode-elements/Summary: List episode (dataset) contents
Description: Returns a list of JSON documents containing metadata describing files contained within one of the TCS AH episodes
Query parameters
| Name | Description | Required | Pattern |
|---|---|---|---|
| episode | Allows to filter the files by given episode id. May contain multiple values separated by a comma | YES | |
| dataType | Allows to filter the files by the type of data they contain. Parameter may contain multiple values separated by a comma | NO | |
| before | Allows to filter the files that have the end date metadata set to before the given date. Should be formatted as date-time - RFC3339 | NO | yyyy-MM-dd |
| after | Allows to filter the files that have the start date metadata set to after the given date. Should be formatted as date-time - RFC3339 | NO | yyyy-MM-dd |
| offset | Number of results skipped from the beginning | NO | |
| limit | Maximum number of returned results | NO |
Responses
| Status code | Description |
|---|---|
| 200 | Request was successful. Response contains a list of episode elements (episode file metadata) in JSON format |
| 400 | Invalid request - e.g. time format of 'before' or 'after' parameters |
| 422 | Too many results requested |
Examples
xml
https://episodesplatform.eu/api/epos/episode-elements?episode=CZORSZTYN&dataType=Miniseed%20Signal&before=2023-12-31&after=1996-01-01&limit=5&offset=10apps
GET
plain
get /api/epos/apps/Summary: List of Applications
Description: Returns a list of JSON documents describing the applications integrated within TCS AH. The method allows filtering the list by applying the query criteria.
Query parameters
| Name | Description | Required |
|---|---|---|
| keyword | Allows to filter the returned applications by keywords they declare. May contain multiple values separated by a comma | NO |
| category | Allows to filter the returned applications by category. May contain multiple values separated by a comma | NO |
| text | Allows to filter the returned applications by text contained in the name or description | NO |
Responses
| Status code | Description |
|---|---|
| 200 | Request was successful. Response contains a list of application descriptions matching the query criteria in JSON format |
Examples
xml
https://episodesplatform.eu/api/epos/apps?category=Hazard+and+Risk+Analysisepisodes
GET
plain
get /api/epos/episodes/Summary: List of Episodes
Description: Returns a list of JSON documents describing the episodes integrated within TCS AH. The method allows filtering the list by impacting factor.
Query parameters
| Name | Description | Required |
|---|---|---|
| impactingFactor | Allows to filter the episodes by impacting or inducing factor relevant to the registrations collected into the episode. May contain multiple values separated by a comma | NO |
Responses
| Status code | Description |
|---|---|
| 200 | Request was successful. Response contains a list of episode descriptions matching the query criteria in JSON format |
Examples
xml
https://episodesplatform.eu/api/epos/episodes?impactingFactor=CO2+sequestrationfiles/
POST
plain
post /api/epos/files/{fileId}Summary: Download episode file
Description: The operation starts to download the file pointed by the 'fileId'. The header of the request has to contain a valid user authentication token, otherwise the operation would fail.
Required headers
| Header | Description |
|---|---|
| Authorization: Bearer <AUTH_TOKEN>" | API authorization header containing user token (generated by EPOS AAAI) |
Path parameters
| Name | Description | Required |
|---|---|---|
| fileId | ID of the file to be download. The ID is displayed within the file metadata (obtained from the /api/epos/episode-elements endpoint) | YES |
Responses
| Status code | Description |
|---|---|
| 200 | The download request was successful |
| 401 | Invalid or missing credentials |
| 403 | The user is not authorized to download the file |
| 404 | The file with the specified ID does not exist |
Examples
shell
curl -H "Authorization: Bearer <AUTH_TOKEN>" https://episodesplatform.eu/api/epos/files/<FILE_ID> --output <LOCAL_FILE_PATH>
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" https://episodesplatform.eu/api/epos/files/eeb957da-52a5-344c-8823-b2135c68a4eb --output inventory.xmlworkspace/uploadFile
POST
plain
post api/epos/workspace/uploadFileSummary: Upload file to workspace
Description: Allows uploading a file into the user’s workspace. The request must include a valid user authentication token in the header; otherwise, the operation will fail. The uploaded file will be placed in the specified directory within the user’s root workspace. The request uses multipart/form-data encoding to send files.
Required headers
| Header | Description |
|---|---|
| Authorization: Bearer <AUTH_TOKEN>" | API authorization header containing user token (generated by EPOS AAAI) |
Form Parameters
| Name | Description | Required | Default |
|---|---|---|---|
| file | Path to the local file being uploaded. | YES (one of two required: file or fileUrl) | |
| fileUrl | Remote file URL to upload. Only HTTP/HTTPS supported. | YES (one of two required: file or fileUrl) | |
| targetDirectory | Directory within the user’s workspace where the file will be stored. | NO | User root workspace directory |
| dataType | Type of data represented by the file. | NO |
Responses
| Status code | Description |
|---|---|
| 200 | The upload request was successful |
| 400 | Invalid parameters (e.g. non-existing targetDirectory or dataType) or request format (e.g. other than multipart/form-data) |
| 401 | Invalid or missing credentials |
| 403 | The user is not authorized to write files to the targetDirectory |
| 404 | Remote resource or target directory not found |
| 413 | Uploaded file exceeds maximum allowed size |
Examples
shell
curl -H "Authorization: Bearer <AUTH_TOKEN>" --form 'file=@"<LOCAL_FILE_PATH>"' --location 'https://episodesplatform.eu/api/epos/workspace/uploadFile'
curl -H "Authorization: Bearer <AUTH_TOKEN>" --form 'file=@"<LOCAL_FILE_PATH>"' --form 'targetDirectory="<TARGET_PATH_IN_TCSAH>"' --form 'dataType="<DATA_TYPE>"' --location 'https://episodesplatform.eu/api/epos/workspace/uploadFile'
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" --form 'file=@"inventory.xml"' --form 'targetDirectory=""' --form 'dataType="Seismic Network"' --location 'https://episodesplatform.eu/api/epos/workspace/uploadFile'
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" --form 'fileUrl="https://example.com/inventory.xml"' --location 'https://episodesplatform.eu/api/epos/workspace/uploadFile'
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" --form 'fileUrl="https://example.com/inventory.xml"' --form 'targetDirectory=""' --form 'dataType="Seismic Network"' --location 'https://episodesplatform.eu/api/epos/workspace/uploadFile'workspace/uploadSoftwareService
POST
plain
post api/epos/workspace/uploadSoftwareServiceSummary: Upload software (create application) in workspace
Description: Allows uploading software in the user’s workspace. The request must include a valid user authentication token in the header; otherwise, the operation will fail. The software will be placed in the specified directory within the user’s root workspace.
Required headers
| Header | Description |
|---|---|
| Authorization: Bearer <AUTH_TOKEN>" | API authorization header containing user token (generated by EPOS AAAI) |
Form Parameters
| Name | Description | Required | Default |
|---|---|---|---|
| id | Id of an software that should be added. | YES | |
| targetDirectory | Directory within the user’s workspace where the software should be created. | NO | User root workspace directory |
Responses
| Status code | Description |
|---|---|
| 200 | The software upload request was successful |
| 400 | Invalid parameters (e.g. targetDirectory pointing to non-directory or missing id) |
| 401 | Invalid or missing credentials |
| 403 | The user is not authorized to write files to the targetDirectory or user does not have permissions to chosen software. |
| 404 | Software with id was not found or the provided targetDirectory does not exist. |
Examples
shell
curl -H "Authorization: Bearer <AUTH_TOKEN>" --form "id=<SOFTWARE_ID>" --location "https://episodesplatform.eu/api/epos/workspace/uploadSoftwareService"
curl -H "Authorization: Bearer <AUTH_TOKEN>" --form "id=<SOFTWARE_ID>" --form "targetDirectory=<TARGET_PATH_IN_TCSAH>" --location "https://episodesplatform.eu/api/epos/workspace/uploadSoftwareService"
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" --form "id=ADMagnitudeTest" --location "https://episodesplatform.eu/api/epos/workspace/uploadSoftwareService"
curl -H "Authorization: Bearer fNV2FCwXKOhcDc3NeeBS1Q7fFfdlquhIBZ_FRpYckHs" --form "id=ADMagnitudeTest" --form "targetDirectory=dir1/dir2" --location "https://episodesplatform.eu/api/epos/workspace/uploadSoftwareService"