Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure which OGC APIs are available #1916

Open
vprivat-ads opened this issue Jan 29, 2025 · 2 comments
Open

Configure which OGC APIs are available #1916

vprivat-ads opened this issue Jan 29, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@vprivat-ads
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I would like to be able to configure which OGC APIs are available when I launch pygeoapi.

For example in my use case I'm only interested in the OGC API - Processes and I would like to disable the other ones.

Describe the solution you'd like
One boolean flag per OGC API in the server configuration, like what currently exists to enable the Admin API.

Describe alternatives you've considered
None

Additional context
N/A

@vprivat-ads vprivat-ads added the enhancement New feature or request label Jan 29, 2025
@doublebyte1
Copy link
Contributor

Hi @vprivat-ads thanks for your message.

If you don't expose any collections using the other APIs, they won't be listed in the /conformance url, which is where the available APIs are advertised. For instance, this is my conformance response, in a server where I only have processes:

curl http://localhost:5000/conformance
{
    "conformsTo":[
        "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core",
        "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/html",
        "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/json",
        "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/landing-page",
        "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/oas30",
        "http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/collections",
        "http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/callback",
        "http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/core",
        "http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/json",
        "http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/oas30",
        "http://www.opengis.net/spec/ogcapi-processes-1/1.0/conf/ogc-process-description"
    ]
}

Basically, pygeoapi only enables APIs for which it has data. Does this not work for you?

@vprivat-ads
Copy link
Contributor Author

Hi @doublebyte1, thanks for your response.

You're right, the conformance is OK, I forgot to check because I was confused with these two points:

  1. the OpenAPI lists tags for disabled APIs, resulting in empty sections in the various UIs, I think these tags should be in line with the conformance (i.e. absent in this case):

Image
Image

  1. It feels strange having the "TileMatrixSets" endpoint working and referenced in the HTML landing page when the tiles API is not present in the conformance, shouldn't it be disabled in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants