Skip to content

Commit

Permalink
Use valid JSON syntax throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
renatolfc authored Apr 5, 2024
1 parent 0dc43ab commit efb0830
Showing 1 changed file with 140 additions and 75 deletions.
215 changes: 140 additions & 75 deletions docs/source/docfiles/markdown/REST_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,48 @@ Replacing the body of the request `<JSON>` with the following:

```json
{
"name": "Hello!",
"workflow": "helloworld",
"parameters": None,
"user_input": {
"start_date": datetime.datetime(2020, 5, 1, 0, 0),
"end_date": datetime.datetime(2020, 5, 5, 0, 0),
"geojson": {
"features": [
{
"geometry": {
"type": "Polygon",
"coordinates": (((-119.14896203939314, 46.51578909859286),
(-119.14896203939314, 46.37578909859286),
(-119.28896203939313, 46.37578909859286),
(-119.28896203939313, 46.51578909859286),
(-119.14896203939314, 46.51578909859286)),)
},
"type": "Feature"
}
],
"type": "FeatureCollection"
"name": "Hello!",
"workflow": "helloworld",
"parameters": null,
"user_input": {
"start_date": "2020-05-01T00:00:00",
"end_date": "2020-05-05T00:00:00",
"geojson": {
"features": [
{
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-119.14896203939314,
46.51578909859286
],
[
-119.14896203939314,
46.37578909859286
],
[
-119.28896203939313,
46.37578909859286
],
[
-119.28896203939313,
46.51578909859286
],
[
-119.14896203939314,
46.51578909859286
]
]
]
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
}
}
```

Expand Down Expand Up @@ -93,62 +112,108 @@ Which would generate the following json:

```json
{
"name": "SAM segmentation",
"workflow": "farm_ai/segmentation/segment_s2",
"parameters": None,
"name": "SAM segmentation",
"workflow": "farm_ai/segmentation/segment_s2",
"parameters": null,
"user_input": {
"user_input": {
"user_input": {
"type": "Feature",
"stac_version": "1.0.0",
"id": "f6465ad0-5e01-4792-ad99-a0bd240c1e7d",
"properties": {
"start_datetime": "2020-05-01T00:00:00+00:00",
"end_datetime": "2020-05-05T00:00:00+00:00",
"datetime": "2020-05-01T00:00:00Z"
},
"geometry": {"type": "Polygon",
"coordinates": (((-119.14896203939314, 46.51578909859286),
(-119.14896203939314, 46.37578909859286),
(-119.28896203939313, 46.37578909859286),
(-119.28896203939313, 46.51578909859286),
(-119.14896203939314, 46.51578909859286)),)
},
"links": [],
"assets": {},
"bbox": [-119.28896203939313,
46.37578909859286,
-119.14896203939314,
46.51578909859286],
"stac_extensions": [],
"terravibes_data_type": "DataVibe"
},
"prompts": {
"type": "Feature",
"stac_version": "1.0.0",
"id": "geo_734c6441-cb25-4c40-8204-6b7286f24bb9",
"properties": {
"urls": ["/mnt/734c6441-cb25-4c40-8204-6b7286f24bb9_geometry_collection.geojson"],
"start_datetime": "2020-05-01T00:00:00+00:00",
"end_datetime": "2020-05-05T00:00:00+00:00",
"datetime": "2020-05-01T00:00:00Z"
},
"geometry": {"type": "Polygon",
"coordinates": (((-119.14896203939314, 46.51578909859286),
(-119.14896203939314, 46.37578909859286),
(-119.28896203939313, 46.37578909859286),
(-119.28896203939313, 46.51578909859286),
(-119.14896203939314, 46.51578909859286)),)
},
"links": [],
"assets": {},
"bbox": [-119.28896203939313,
46.37578909859286,
-119.14896203939314,
46.51578909859286],
"stac_extensions": [],
"terravibes_data_type": "ExternalReferenceList"
}
"type": "Feature",
"stac_version": "1.0.0",
"id": "f6465ad0-5e01-4792-ad99-a0bd240c1e7d",
"properties": {
"start_datetime": "2020-05-01T00:00:00+00:00",
"end_datetime": "2020-05-05T00:00:00+00:00",
"datetime": "2020-05-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-119.14896203939314,
46.51578909859286
],
[
-119.14896203939314,
46.37578909859286
],
[
-119.28896203939313,
46.37578909859286
],
[
-119.28896203939313,
46.51578909859286
],
[
-119.14896203939314,
46.51578909859286
]
]
]
},
"links": [],
"assets": {},
"bbox": [
-119.28896203939313,
46.37578909859286,
-119.14896203939314,
46.51578909859286
],
"stac_extensions": [],
"terravibes_data_type": "DataVibe"
},
"prompts": {
"type": "Feature",
"stac_version": "1.0.0",
"id": "geo_734c6441-cb25-4c40-8204-6b7286f24bb9",
"properties": {
"urls": [
"/mnt/734c6441-cb25-4c40-8204-6b7286f24bb9_geometry_collection.geojson"
],
"start_datetime": "2020-05-01T00:00:00+00:00",
"end_datetime": "2020-05-05T00:00:00+00:00",
"datetime": "2020-05-01T00:00:00Z"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-119.14896203939314,
46.51578909859286
],
[
-119.14896203939314,
46.37578909859286
],
[
-119.28896203939313,
46.37578909859286
],
[
-119.28896203939313,
46.51578909859286
],
[
-119.14896203939314,
46.51578909859286
]
]
]
},
"links": [],
"assets": {},
"bbox": [
-119.28896203939313,
46.37578909859286,
-119.14896203939314,
46.51578909859286
],
"stac_extensions": [],
"terravibes_data_type": "ExternalReferenceList"
}
}
}
```

Expand Down

0 comments on commit efb0830

Please sign in to comment.