Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deployments

Deploying compiles the project and publishes it behind a live write API: programs holding a token can then add triples that follow your schema, and query them with SPARQL.

Deploying

Press Deploy in the sidebar.

The first time for a project, Agrafe asks Publish this project? and shows what will go out: the package name and version, the number of files, and the endpoint POST /api/data/<deployment-id>/triples. Deploying uses the files as they are saved right now. Later deploys go straight through.

Then a dialog shows:

FieldNotes
Deployment IDIdentifies the deployment in every URL.
Bearer tokenNeeded to call the API. Copy it now: it is not shown again. You can issue another one later.
POST endpointThe URL to write triples to.
Try itA ready-made curl command that writes one triple.

Full API reference → opens the API section of the new deployment.

Each Deploy creates a new deployment with its own id and tokens. To publish changes under the same id, use Update instead. The number of active deployments depends on your plan.

The Deployments tab

Only people who can edit the project see Tokens and Update, and only the owner sees the trash button (see Collaboration). Each deployment is listed with its date, its status (active or not), its version and its size, for example v2 · 184 triples (58 schema · 11 fact · 115 data).

ButtonAction
APIShows the endpoints, the compiled schema and a tester. See below.
TokensLists the deployment’s tokens. + Token issues a new one, shown once. Revoke disables one for good.
UpdateRecompiles the deployment from the current files and bumps its version. The id, the tokens and the data already written are kept.
TrashOwner only. Hold to delete the deployment.

The API

The API section of a deployment lists its endpoints:

MethodEndpointUse
POST/api/data/<id>/triplesWrite triples.
GET/api/data/<id>/dolfin-fileDownload the deployed Dolfin source.
GET/api/data/<id>/sparql/public?query=…Run a SPARQL SELECT or ASK query (URL-encoded).
POST/api/data/<id>/sparql/publicThe same, with the query as the request body.

Every call needs the header Authorization: Bearer <token>. SPARQL answers are application/sparql-results+json and only see this deployment.

It also shows each concept with its properties, their type and whether they are required, an example request, and a Try it form: paste a token, fill in a subject, a predicate and a value, and Send writes that triple.

To explore the deployed data interactively, use the SPARQL tab.