API Basics#
Below we start using the services offered by the Laces Data Platform API. For a complete list of all services and their details, please jump ahead to services overview.
These sections below will explain the basics when it comes to CRUD operations related to Linked Data publications on the Laces Data Platform.
List repositories#
In this example you will be retrieving the list of repositories to which your Access Token has permissions for.
The path for this service is:
https://hub.laces.tech/api/v4/repositories
Within Postman, create a new request and enter the above URL into the requests URL field.
Next open the "Authorization" tab and fill in the username and password. The username should be the Token ID of your access token.

The response will contain a (JSON) list, with all repositories for which you have given (at least) viewer permissions to access token used to access the API.
{
"total": 2,
"contents": [
{
"id": "332bb7cd-d3d9-49ec-8e02-67892aee3011",
"name": "Repository",
"description": "",
"pathSegment": "repository",
"owner": "administrator",
"path": "example/repository",
"parentId": "d33e7130-ba42-41c4-8f4a-a49067815d6d",
"createdBy": "administrator",
"createdOn": 1701694534653,
"modifiedBy": "administrator",
"modifiedOn": 1701694534653,
"public": false
},
{
"id": "ba856b18-e6d2-4cd5-9e28-64c7017d7833",
"name": "SKOS Datasets",
"description": "Simple KOS datasets",
"pathSegment": "skos-datasets",
"owner": "administrator",
"path": "example/skos-datasets",
"parentId": "d33e7130-ba42-41c4-8f4a-a49067815d6d",
"createdBy": "administrator",
"createdOn": 1701694863680,
"modifiedBy": "administrator",
"modifiedOn": 1701694877289,
"public": true
}
]
}
Alternatively the cURL command for this request is:
curl https://hub.laces.tech/api/v4/repositories -H "Authorization: Basic $(echo -n <username>:<password> | base64)"
Tip: Should you want more information on the request, you could add a -v parameter to the end of the above command to see more details about the request.
List publications#
In this second example you will be retrieving a list of publications, created within a repository to which your token has access.
The path for this service is:
https://hub.laces.tech/api/v4/publications?repositoryId={id}
You should replace the {id} with the ID of an actual repository, for which you have Publisher permission. You can retrieve this ID by listing all your (accessible) repositories (see Listing repositories). So, should you wish to publish into the repository with ID 332bb7cd-d3d9-49ec-8e02-67892aee3011
https://hub.laces.tech/api/v4/publications?repositoryId=332bb7cd-d3d9-49ec-8e02-67892aee3011
In Postman create a new request and enter the above URL into the requests URL field.
Next open the "Authorization" tab and fill in the username and password. The username should be the application ID.

The response will contain a (JSON) list, with all publications published within the repository.
{
"total": 1,
"contents": [
{
"id": "96e3e454-09f9-4605-807d-a7e2a76a1e45",
"name": "Road parts",
"description": "",
"repositoryId": "332bb7cd-d3d9-49ec-8e02-67892aee3011",
"owner": "Mike",
"publisher": "Mike",
"publicationDate": 1701696916.794000000,
"uri": "/example/repository/road-parts",
"useVersionBasedUri": false,
"versioningMode": "NONE",
"schemaURIs": [],
"pending": false
}
]
}
Alternatively the cURL command for this request is:
curl https://hub.laces.tech/api/v4/publications?repositoryId=332bb7cd-d3d9-49ec-8e02-67892aee3011 -H "Authorization: Basic $(echo -n <username>:<password> | base64)"
Retrieve publication as RDF#
In order to retrieve your publication as RDF data, you can directly use the URL of a publication. The URL matches the ID of a publication, which can be retrieved using the API (see above).
The publication URL will have the following format (see Location for more details).
https://hub.laces.tech/<group>/<repository>/<publication>
Fill in the URL into the request field in Postman, set the proper authentication (see above) and (optionally) specify the format desired. In case no explicit format is specified Turtle will be used.

The returned RDF format can be specified using te "Accept" header. Currently the following formats are supported: