Skip to content

Accessing through EPOS ICS-C

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

NameDescriptionRequiredPattern
episodeAllows to filter the files by given episode id. May contain multiple values separated by a commaYES
dataTypeAllows to filter the files by the type of data they contain. Parameter may contain multiple values separated by a commaNO
beforeAllows to filter the files that have the end date metadata set to before the given date. Should be formatted as date-time - RFC3339NOyyyy-MM-dd
afterAllows to filter the files that have the start date metadata set to after the given date. Should be formatted as date-time - RFC3339NOyyyy-MM-dd
offsetNumber of results skipped from the beginningNO
limitMaximum number of returned resultsNO

Responses

Status codeDescription
200Request was successful. Response contains a list of episode elements (episode file metadata) in JSON format
400Invalid request - e.g. time format of 'before' or 'after' parameters
422Too 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=10

apps

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

NameDescriptionRequired
keywordAllows to filter the returned applications by keywords they declare. May contain multiple values separated by a commaNO
categoryAllows to filter the returned applications by category. May contain multiple values separated by a commaNO
textAllows to filter the returned applications by text contained in the name or descriptionNO

Responses

Status codeDescription
200Request 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+Analysis

episodes

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

NameDescriptionRequired
impactingFactorAllows to filter the episodes by impacting or inducing factor relevant to the registrations collected into the episode. May contain multiple values separated by a commaNO

Responses

Status codeDescription
200Request 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+sequestration

files/

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

HeaderDescription
Authorization: Bearer <AUTH_TOKEN>"API authorization header containing user token (generated by EPOS AAAI)

Path parameters

NameDescriptionRequired
fileIdID 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 codeDescription
200The download request was successful
401Invalid or missing credentials
403The user is not authorized to download the file
404The 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.xml

workspace/uploadFile

POST

plain
    post api/epos/workspace/uploadFile

Summary: 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

HeaderDescription
Authorization: Bearer <AUTH_TOKEN>"API authorization header containing user token (generated by EPOS AAAI)

Form Parameters

NameDescriptionRequiredDefault
filePath to the local file being uploaded.YES (one of two required: file or fileUrl)
fileUrlRemote file URL to upload. Only HTTP/HTTPS supported.YES (one of two required: file or fileUrl)
targetDirectoryDirectory within the user’s workspace where the file will be stored.NOUser root workspace directory
dataTypeType of data represented by the file.NO

Responses

Status codeDescription
200The upload request was successful
400Invalid parameters (e.g. non-existing targetDirectory or dataType) or request format (e.g. other than multipart/form-data)
401Invalid or missing credentials
403The user is not authorized to write files to the targetDirectory
404Remote resource or target directory not found
413Uploaded 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/uploadSoftwareService

Summary: 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

HeaderDescription
Authorization: Bearer <AUTH_TOKEN>"API authorization header containing user token (generated by EPOS AAAI)

Form Parameters

NameDescriptionRequiredDefault
idId of an software that should be added.YES
targetDirectoryDirectory within the user’s workspace where the software should be created.NOUser root workspace directory

Responses

Status codeDescription
200The software upload request was successful
400Invalid parameters (e.g. targetDirectory pointing to non-directory or missing id)
401Invalid or missing credentials
403The user is not authorized to write files to the targetDirectory or user does not have permissions to chosen software.
404Software 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"