buildingSMART / buildingSMART/technical.buildingsmart.org

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

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
37
Forks
9
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the ifcOWL page at technical.buildingsmart.org/standards/ifc/ifc-formats/ and reproduce the shown curl command in a shell. Correct the copied command so its line breaks work, then check whether the content-negotiation suggestion is within this website's scope. Done means the example runs as presented and the RDF access request has a documented resolution.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.