@@ -129,84 +129,6 @@ check the `Python API User Guide <https://eodag.readthedocs.io/en/latest/api_use
129129 `search() <https://eodag.readthedocs.io/en/latest/api_reference/core.html#eodag.api.core.EODataAccessGateway.search >`_ method now returns
130130 only a single ``SearchResult `` instead of a 2 values tuple.
131131
132- STAC REST API
133- -------------
134-
135- An eodag instance can be exposed through a STAC compliant REST api from the command line (``eodag[server] `` needed):
136-
137- .. code-block :: bash
138-
139- $ eodag serve-rest --help
140- Usage: eodag serve-rest [OPTIONS]
141-
142- Start eodag HTTP server
143-
144- Set EODAG_CORS_ALLOWED_ORIGINS environment variable to configure Cross-
145- Origin Resource Sharing allowed origins as comma-separated URLs (e.g.
146- ' http://somewhere,htttp://somewhere.else' ).
147-
148- Options:
149- -f, --config PATH File path to the user configuration file with its
150- credentials, default is ~ /.config/eodag/eodag.yml
151- -l, --locs PATH File path to the location shapefiles configuration file
152- -d, --daemon run in daemon mode
153- -w, --world run uvicorn using IPv4 0.0.0.0 (all network interfaces),
154- otherwise bind to 127.0.0.1 (localhost).
155- -p, --port INTEGER The port on which to listen [default: 5000]
156- --debug Run in debug mode (for development purpose)
157- --help Show this message and exit.
158-
159- # run server
160- $ eodag serve-rest
161-
162- # list available product types for ``peps`` provider:
163- $ curl " http://127.0.0.1:5000/collections?provider=peps" | jq " .collections[].id"
164- " S1_SAR_GRD"
165- " S1_SAR_OCN"
166- " S1_SAR_SLC"
167- " S2_MSI_L1C"
168- " S2_MSI_L2A"
169-
170- # search for items
171- $ curl " http://127.0.0.1:5000/search?collections=S2_MSI_L1C&bbox=0,43,1,44&datetime=2018-01-20/2018-01-25" \
172- | jq " .numberMatched"
173- 6
174-
175- # get download link
176- $ curl " http://127.0.0.1:5000/collections/S2_MSI_L1C/items" \
177- | jq " .features[0].assets.downloadLink.href"
178- " http://127.0.0.1:5002/collections/S2_MSI_L1C/items/S2B_MSIL1C_20240917T115259_N0511_R137_T21CWS_20240917T145134/download"
179-
180- # download
181- $ wget " http://127.0.0.1:5002/collections/S2_MSI_L1C/items/S2B_MSIL1C_20240917T115259_N0511_R137_T21CWS_20240917T145134/download"
182-
183-
184- ``eodag-server `` is available on `https://hub.docker.com/r/csspace/eodag-server <https://hub.docker.com/r/csspace/eodag-server >`_:
185-
186- .. code-block :: bash
187-
188- docker run -p 5000:5000 --rm csspace/eodag-server:3.10.0
189-
190- You can also browse over your STAC API server using `STAC Browser <https://github.com/radiantearth/stac-browser >`_.
191- Simply run:
192-
193- .. code-block :: bash
194-
195- git clone https://github.com/CS-SI/eodag.git
196- cd eodag
197- docker-compose up
198- # or for a more verbose logging:
199- EODAG_LOGGING=3 docker-compose up
200-
201- And browse http://127.0.0.1:5001:
202-
203- .. image :: https://raw.githubusercontent.com/CS-SI/eodag/develop/docs/_static/stac_browser_example_600.png
204- :target: https://raw.githubusercontent.com/CS-SI/eodag/develop/docs/_static/stac_browser_example.png
205- :alt: STAC browser example
206- :width: 600px
207-
208-
209- For more information, see `STAC REST API usage <https://eodag.readthedocs.io/en/latest/stac_rest.html >`_.
210132
211133Command line interface
212134----------------------
0 commit comments