-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
065d506
commit 80b8192
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"openapi":"3.1.0","info":{"title":"TerraVibes 🌎 Spatial API","description":"# TerraVibes REST API\n\n TerraVibes is the execution engine of the FarmVibes platform, a\n containerized, distributed system that can run machine learning models at scale.\n TerraVibes uses Kubernetes for container orchestration and supports a variety of\n machine learning frameworks, as well as various data sources.\n\n With TerraVibes, farmers can run geospatial ingestion and machine learning models\n in the cloud or on-premises, depending on their needs. The platform is\n designed to be highly scalable and flexible, so userscan start with a\n small deployment and scale up as needed.\n\n ### Endpoints\n\n - `GET /`: Root endpoint\n - `GET /system-metrics`: Get system metrics\n\n ## Workflows\n\n The base computation unit users interact with is a workflow. A workflow is a\n collection of tasks that are arranged in a computational graph. Each task\n represents a single operation, and the graph represents the dependencies\n between the tasks. For example, a workflow might have a task that downloads\n satellite imagery, a task that runs a machine learning model on the imagery,\n and a task that uploads the results to a cloud storage bucket. The tasks are\n executed in parallel, and the results of each task are passed to the next task\n in the graph.\n\n ### Endpoints\n\n - `GET /workflows`: List all workflows\n - `GET /workflows/{workflow_name}`: Get a workflow by name, either as\n JSON description, or YAML graph implementation\n\n ## Runs\n\n Every time a workflow is executed, the API creates a new run. A run is a\n specific instance of a workflow, and it is uniquely identified by a run ID.\n The run ID is a UUID, and it is returned to the user when the workflow is\n submitted. The run ID can be used to query the status of the workflow, and it\n can be used to cancel the workflow.\n\n ### Endpoints\n\n - `GET /runs`: Lists all the workflow runs currently in the system.\n - `GET /runs/{run_id}`: Get information of a specific run.\n - `POST /runs`: Submit a new workflow run.\n - `POST /runs/{run_id}/cancel`: Cancel a workflow run.\n ","version":"0"},"servers":[{"url":"/v0"}],"paths":{"/":{"get":{"summary":"Terravibes Root","description":"Root endpoint.","operationId":"terravibes_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/system-metrics":{"get":{"summary":"Terravibes Metrics","description":"Get system metrics, including CPU usage, memory usage, and storage disk space.","operationId":"terravibes_metrics_system_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsDict"}}}}}}},"/workflows":{"get":{"tags":["workflows"],"summary":"Terravibes List Workflows","description":"List all workflows available in FarmVibes.AI.","operationId":"terravibes_list_workflows_workflows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/workflows/{workflow}":{"get":{"tags":["workflows"],"summary":"Terravibes Describe Workflow","description":"Get a workflow by name, either as JSON description, or YAML graph implementation.","operationId":"terravibes_describe_workflow_workflows__workflow__get","parameters":[{"description":"The name of the workflow to be described.","required":true,"schema":{"type":"string","title":"Workflow name","description":"The name of the workflow to be described."},"name":"workflow","in":"path"},{"description":"The format to return the workflow in [description, yaml].","required":false,"schema":{"type":"string","title":"Return format","description":"The format to return the workflow in [description, yaml].","default":"description"},"name":"return_format","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs":{"get":{"tags":["runs"],"summary":"Terravibes List Runs","description":"List all the workflow runs currently in the system.","operationId":"terravibes_list_runs_runs_get","parameters":[{"description":"The list of run IDs to retrieve. If not provided, all runs are returned.","required":false,"schema":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ids","description":"The list of run IDs to retrieve. If not provided, all runs are returned."},"name":"ids","in":"query"},{"description":"The page number to retrieve.","required":false,"schema":{"type":"integer","title":"Page","description":"The page number to retrieve.","default":0},"name":"page","in":"query"},{"description":"The number of items per page.","required":false,"schema":{"type":"integer","title":"Items","description":"The number of items per page.","default":0},"name":"items","in":"query"},{"description":"Fields to return alongside each run id. If not provided, only run ids are returned.","required":false,"schema":{"items":{"type":"string"},"type":"array","title":"Fields","description":"Fields to return alongside each run id. If not provided, only run ids are returned."},"name":"fields","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflows","runs"],"summary":"Terravibes Create Run","description":"Submit a new workflow run.","operationId":"terravibes_create_run_runs_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunConfigInput"}],"title":"Runconfig","description":"The configuration and inputs of the workflow run to submit."},"example":{"name":"example workflow run for sample region","workflow":"helloworld","parameters":{},"user_input":{"start_date":"2021-02-02T00:00:00Z","end_date":"2021-08-02T00:00:00Z","geojson":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-88.068487,37.058836],[-88.036059,37.048687],[-88.012895,37.068984],[-88.026622,37.085711],[-88.062482,37.081461],[-88.068487,37.058836]]]}}]}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}":{"get":{"tags":["runs"],"summary":"Terravibes Describe Run","description":"Get information of a specific run.","operationId":"terravibes_describe_run_runs__run_id__get","parameters":[{"description":"The ID of the workflow execution to get.","required":true,"schema":{"type":"string","format":"uuid","title":"Run ID","description":"The ID of the workflow execution to get."},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["runs"],"summary":"Terravibes Delete Run","description":"Delete data associated with a workflow run (if not shared by other runs).\n\nFor a detailed overview on how data is managed in FarmVibes.AI, please refer to the\n[documentation](https://microsoft.github.io/farmvibes-ai/docfiles/markdown/CACHE.html).","operationId":"terravibes_delete_run_runs__run_id__delete","parameters":[{"description":"The ID of the workflow run to delete.","required":true,"schema":{"type":"string","format":"uuid","title":"Run ID","description":"The ID of the workflow run to delete."},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/cancel":{"post":{"tags":["runs"],"summary":"Terravibes Cancel Run","description":"Cancel a workflow run.","operationId":"terravibes_cancel_run_runs__run_id__cancel_post","parameters":[{"description":"The ID of the workflow run to cancel.","required":true,"schema":{"type":"string","format":"uuid","title":"Run ID","description":"The ID of the workflow run to cancel."},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/resubmit":{"post":{"tags":["runs"],"summary":"Terravibes Resubmit Run","description":"Resubmit a workflow run.","operationId":"terravibes_resubmit_run_runs__run_id__resubmit_post","parameters":[{"description":"The ID of the workflow run to resubmit.","required":true,"schema":{"type":"string","format":"uuid","title":"Run ID","description":"The ID of the workflow run to resubmit."},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Message":{"properties":{"message":{"type":"string","title":"Message"},"id":{"type":"string","title":"Id"},"location":{"type":"string","title":"Location"}},"type":"object","required":["message"],"title":"Message","description":"Dataclass that represents an API message."},"MetricsDict":{"properties":{"load_avg":{"items":{"type":"number"},"type":"array","title":"Load Avg"},"cpu_usage":{"type":"number","title":"Cpu Usage"},"free_mem":{"type":"integer","title":"Free Mem"},"used_mem":{"type":"integer","title":"Used Mem"},"total_mem":{"type":"integer","title":"Total Mem"},"disk_free":{"type":"integer","title":"Disk Free"}},"type":"object","required":["load_avg","cpu_usage","free_mem","used_mem","total_mem","disk_free"],"title":"MetricsDict"},"RunConfigInput":{"properties":{"name":{"type":"string","title":"Name"},"workflow":{"anyOf":[{"type":"string"},{"type":"object"}],"title":"Workflow"},"parameters":{"type":"object","title":"Parameters"},"user_input":{"anyOf":[{"$ref":"#/components/schemas/SpatioTemporalJson"},{"type":"object"},{"items":{},"type":"array"}],"title":"User Input"}},"type":"object","required":["name","workflow","parameters","user_input"],"title":"RunConfigInput","description":"Dataclass that represents a run config input."},"SpatioTemporalJson":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"geojson":{"type":"object","title":"Geojson"}},"type":"object","required":["start_date","end_date","geojson"],"title":"SpatioTemporalJson","description":"Dataclass that represents a spatio temporal json."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}} |