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

[CSAPI] Accessing System added through HTTP POST w/ GeoJSON may not be navigable in browser #248

Open
ChainReaction31 opened this issue Jan 31, 2024 · 1 comment

Comments

@ChainReaction31
Copy link
Member

I noticed that when navigating the API in a browser that a system I inserted with GeoJSON gives an error when I try to navigate to it using its canonical url.

If I add a query parameter f=application/json it is then available.

@ChainReaction31
Copy link
Member Author

ChainReaction31 commented Jan 31, 2024

I very briefly looked around at this. I attempted a very similar operation from Postman with the body being this:

{
    "type": "Feature",
    "properties": {
        "name": "Test System From Postman",
        "uid": "urn:test:frompostman1",
        "description": "A Test System",
        "featureType": "http://www.w3.org/ns/ssn/System"
    }
}

Notably, the response I get form the server does not contain featureType

{
  "type": "Feature",
  "id": "9koctd6kei2be",
  "geometry": null,
  "properties": {
    "uid": "urn:test:frompostman1",
    "name": "Test System From Postman",
    "description": "A Test System"
  },
  "links": [
    {
      "rel": "canonical",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be",
      "type": "application/json"
    },
    {
      "rel": "alternate",
      "title": "Detailed description of system in SensorML format",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be",
      "type": "application/sml+json"
    },
    {
      "rel": "members",
      "title": "List of subsystems",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be/members",
      "type": "application/json"
    },
    {
      "rel": "datastreams",
      "title": "List of system datastreams",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be/datastreams",
      "type": "application/json"
    },
    {
      "rel": "controls",
      "title": "List of system control channels",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be/controls",
      "type": "application/json"
    },
    {
      "rel": "samplingFeatures",
      "title": "List of system features of interest",
      "href": "http://localhost:8181/sensorhub/api/systems/9koctd6kei2be/featuresOfInterest",
      "type": "application/json"
    }
  ]
}

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

No branches or pull requests

1 participant