Skip to content

Export a public dataset's entries as RDF, or a value list's table as CSV

GET
/public/catalog/{orgSlug}/datasets/{datasetId}/export
curl --request GET \
--url 'https://api.modeldesk.io/public/catalog/example/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/export?format=turtle'

Every entry of a publicly visible dataset of the organization, at its latest release, as a file in format, written as the signed-in export writes it. A reference is written only where the entry it points at is public too: held by the latest release of a public dataset of the same organization, under the IRI that release gives it. Every other reference is left out, and the file does not say how many were. Needs no sign-in. Streamed as it is written.

csv writes the table of a value list (a dataset whose kind of resource is VALUE_LIST) and answers 404 for any other dataset: RFC 4180, UTF-8, a header row, records ended by CRLF. The columns are the table’s (…/values) first: the code, the name and the definition where the list has each, then the type’s other single-valued fields by name; after them, the type’s other fields the entry form shows that hold several values, by name. A column of text written in several languages is one column per language present, headed by the property’s name, @ and the language. A reference is written as the code of the public entry it points at, else its name; one to an entry that is not public is left out. Several values in one cell are joined by ; . The values are in the table’s order. A cell a spreadsheet would read as a formula, one starting with =, +, -, @, a tab or a carriage return after any apostrophes and not a plain number, is written with one more apostrophe in front, header cells included; taking one apostrophe off the front of such a cell gives the value back.

orgSlug
required
string
datasetId
required
string format: uuid
format
string
default: turtle
Allowed values: turtle jsonld ntriples rdfxml csv

The entries, as a download named after the dataset and its release. Carries Cache-Control: no-store.

string
Cache-Control
string
Content-Disposition
string

No encoder writes the format; the formats are named, the one asked for is not repeated.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

The dataset is not publicly visible, for any reason, does not exist, or belongs to another organization, or csv is asked of a dataset that is no value list; the answer is the same for all of them.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

As many public lists and downloads run as the platform runs at once, or the dataset’s schema cannot be read right now; try again in a moment.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}