Skip to content

Instantly share code, notes, and snippets.

@Industrial
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Industrial/34dc62660de2ec878879 to your computer and use it in GitHub Desktop.
Save Industrial/34dc62660de2ec878879 to your computer and use it in GitHub Desktop.
# With a HTTP REST API for RDF I would want to be able to:
# - Create one or many triples.
# - Update one or many triples.
# - Delete one or many triples.
#
# 1) Does this mean my URL Scheme ends up looking like:
#
# GET /api/rdf Get everything (Don't support this?)
# POST /api/rdf Create a subject.
# GET /api/rdf/:subject Get a subject.
# PUT /api/rdf/:subject Update a subject.
# DELETE /api/rdf/:subject Delete a subject.
#
# 2) Given the URL scheme, does that mean a PUT of a subject includes
# sending it the complete new state of all triples with this subject?
#
# 3) Where do people start out? GET /api/rdf ?
#
# Other questions:
# - What do I do with HEAD requests? What do I return from them and does
# the context matter (i.e. graph or subject or?)
@aredridel
Copy link

Potential problem: blank nodes as subjects

@aredridel
Copy link

HEAD requests: ignore them. They're just the head of GET.

@aredridel
Copy link

PUT to update a graph is weird; usually PUT replaces entities whole. It should probably be a POST.

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