Submit a file's content and file name to the ingestion API.
Submit a list of file contents and file names for ingestion.
Args:
file_content (str): The file's content as string representation
file_name (str): The file name for storing the file after ingestion.
[
{
file_name (str): The file name for storing the file after ingestion.
file_content (bytes): The file's content
},
{
...
}
]
Returns:
dict: A dict containing a task_id, referring the the queued processing task's id.
E.g.
dict: A dict containing a task_id referring to the queued processing task as well as a field failed, listing the file names for which ingestion failed.
Example:
{
"task_id": "5",
"failed": List[str] List of file names for which ingestion failed.
}
Raises:
RuntimeError: If the ingestion API or data upload fails after retries.
RuntimeError: If committing failed after retries.
"""
```
...
...
@@ -161,14 +171,11 @@ filter = {
}
```
3) Timestamp equality and ranges
3) List of values
The queried data should match one of the values in the list. String or number values are possible.
1. Requesting an OSS upload path from the ingestion API.
2. Uploading the file to the returned OSS path.
3. Reporting the finished upload back to the ingestion API.
Args:
file_content (bytes): The file's content
file_name (str): The file name for storing the file after ingestion.
[
{
file_name (str): The file name for storing the file after ingestion.
file_content (bytes): The file's content
},
{
...
}
]
Returns:
dict: A dict containing a task_id referring to the queued processing task's id.
dict: A dict containing a task_id referring to the queued processing task as well as a field failed, listing the file names for which ingestion failed.
Example:
{
"task_id": "5",
"failed": List[str] List of file names for which ingestion failed.
}
Raises:
RuntimeError: If the ingestion API or OSS upload fails after retries.
RuntimeError: If committing failed after retries.
"""
api_url=load_backend_settings()['backend_url']
ifnotapi_url:
raiseRuntimeError("CSST backend api url is not set")