Skip to content

curl example on ifcOWL page fails when copied + suggestion for RDF access via content negotiation #7

Description

@kathrinrin

Great that bSDD supports RDF!

I noticed a small issue while testing the curl command from https://technical.buildingsmart.org/standards/ifc/ifc-formats/ifcowl/:

curl -X 'GET' 
  'https://api.bsdd.buildingsmart.org/api/Class/v1?Uri=https%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fbuildingsmart%2Fifc%2F4.3%2Fclass%2FIfcWall' 
  -H 'accept: text/turtle'

Copy/pasting this command into a shell does not work because the line breaks are not escaped. This version works:

curl -X 'GET' \
  'https://api.bsdd.buildingsmart.org/api/Class/v1?Uri=https%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fbuildingsmart%2Fifc%2F4.3%2Fclass%2FIfcWall' \
  -H 'accept: text/turtle'

Another simplification would be to let curl handle the URL encoding:

curl -G \
  --data-urlencode "Uri=https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcWall" \
  -H "accept: text/turtle" \
  https://api.bsdd.buildingsmart.org/api/Class/v1

Finally, according to Linked Data principles, an even simpler pattern would be if the identifier URI supported content negotiation (similar to how it already returns text/html), e.g.:

curl -H "Accept: text/turtle" \
  https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcWall

If the identifier URI supported RDF representations via content negotiation, the RDF would be much easier to consume for Linked Data applications.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions