Repository Management

POST : repository creation

In order to create a repository post to the accounts abstract repository resource:

https://dydra.com/system/accounts/<account>/repositories

Headers

Content-Type: application/json

Content

{"repository": {"name": "<new repository name>"},
 "class": "<repository class>"
 }

The options class specifies the repository’s schematic storage model and access patterns.

class

schematic model

internal-view-repository

The repository materializes the results of a view applied to a base repository

hdt-repository

The repository uses the HDT storage model

lmdb-repository

The repository uses a 6x B-tree storage model to index all quad term combinations

revisioned-lmdb-repository

The repository extends the lmdb-repository storage to incorporate a linear index for revision information

DELETE : repository deletion

In order to delete a repository, delete the specific resource:

https://dydra.com/system/accounts/<account>/repositories/<repository>

Response

HTTP No Content upon successful completion

GET : repository content introspection

https://dydra.com/system/accounts/<account>/repositories/<repository>

Headers

Content-Type: application/json

Response

Returns a data model which describes the relationships apparent in the repository data and its defined interface views.

{"@type": "repository",
 "name": repository name,
 "location": repository host-specific HTTP API URL,
 "identifier": repository service metadata resource identifier
 "getViews": an array of metadata models for defined SELECT views
 "updateViews": an array of metadata models for defined MODIFY
 "postViews": an array of metadata models for defined TARQL views
 "patterns": an array of predicate patterns derived from a formal concept analysis of the repository
 "description": the repository description text
 "predicates": an array of the predicates present in the repository
 "paths": an array of the object/subject predicate pairs present in the repository
 }

The service computes the model on demand and caches it for the duration of a processor cycle.

https://dydra.com/system/status/<account>/repositories/<repository>

Headers

Content-Type: application/json

GET : repository configuration

https://dydra.com/system/accounts/<account>/repositories/<repository>/configuration

Headers

Accept: application/json

Response

Returns a JSON model which captures the repository configuration and owner description. This includes read-only and modifiable fields.

{"@type": "Repository",
 "title": "test",
 "owner": "http://dydra.com/users/test",
 "name": "test",
 "has_parent": "http://dydra.com/accounts/test",
 "id": "http://dydra.com/accounts/test/repositories/test",
 "has_owner": "http://dydra.com/users/test",
 "uuid": "urn:uuid:90976810-4d92-013e-d8dc-0cc47a92447e",
 "description": "meta description",
 "prefixes": "PREFIX xx: <http://xx.org/ns#>\n",
 "privacySetting": "readByAuthenticatedUserOrIP",
 "abstract": "Meta Repo",
 "permissible_ip_addresses": ["127.0.0.1"],
 "views": []}

The alternative privacy settings specify read and write access for owner, authenticated and anonymous agents:

  • private

  • readByIP

  • readByAuthenticatedUser

  • readByAuthenticatedUserOrIP

  • public

The ip addresses setting are a vector of ip addresses.

POST : repository configuration

Modifies the repository configuration according to the content of a JSON model.

https://dydra.com/system/accounts/<account>/repositories/<repository>/configuration

Headers

Content-Type: application/json

Content

Requires a JSON object with the possible fields. This includes modifiable fields only.

  • abstract

  • description

  • prefixes

  • privacySetting

  • permissible_ip_addresses

{"abstract":"Meta Repo",
 "description":"meta description",
 "privacySetting":"readByAuthenticatedUserOrIP",
 "prefixes":"PREFIX xx: <http://xx.org/ns#>\n",
 "permissible_ip_addresses": ["127.0.0.1"]
}

Response

HTTP No Content upon successful completion

GET : repository collaboration

Returns the access authorization for collaborating accounts.

https://dydra.com/system/accounts/<account>/repositories/<repository>/collaboration

Headers

Accept: application/json

Response

[{"account": "test", "read": true, "write": true},
 {"account": "jhacker", "read": true, "write": false}]

POST : repository collaboration

Modifies the access authorization for collaborating accounts.

https://dydra.com/system/accounts/<account>/repositories/<repository>/collaboration

Headers

Content-Type: application/json

Content

[{"account": "test"},
 {"account": "jhacker", "read": true, "write": true}]

Where an entry specifies no access modes, the entry is deleted.