Skip to main content

Retrieve Properties in API Requests

Abstract

Retrieve Properties in API Requests

For the following list of requests, properties can be fetched:

Defined List of SKOS Properties

Possible values for skos properties parameter

skos:altLabel, skos:hiddenLabel, skos:definition, skos:notation, skos:example, skos:scopeNote, skos:broader, 
skos:narrower, skos:related, skos:ConceptScheme, skosxl:prefLabel, skosxl:altLabel, skosxl:hiddenLabel, 
skos:exactMatch, skos:closeMatch, skos:broaderMatch, skos:narrowerMatch, skos:relatedMatch, skos:topConceptOf

Requesting Custom Properties

When you want to retrieve custom property data, you can put a URI of a defined property in your request:

Get concept request with specified property request for dcterms:created

http://vocabulary.semantic-web.at/PoolParty/api/thesaurus/1DCE0ED2-D7E8-0001-86A1-18652DF0D7A0/concept?concept=http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7&properties=http://purl.org/dc/terms/created

Result of the sample request

{
  "uri": "http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7",
  "prefLabel": "Kir",
  "properties": {
    "http://purl.org/dc/terms/created": [
      "2015-05-02T17:26:56Z"
    ]
  }
}

Note

Some custom parameters need to be URL encoded for a correct request formulation. Especially hashtag (#) is known as character that needs to be URL encoded.

For example

http://www.w3.org/1999/02/22-rdf-syntax-ns#type

has to be decoded as

http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type

Retrieve rdfs:type information of specified concept

https://vocabulary.semantic-web.at/PoolParty/api/thesaurus/1E02D67D-7959-0001-82BE-B9811AAC76E0/concept?concept=http://vocabulary.semantic-web.at/cocktails/2c032fe6-a518-44be-851a-dbf1c253be63&properties=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type

Result of the sample request

{
    "uri": "http://vocabulary.semantic-web.at/cocktails/2c032fe6-a518-44be-851a-dbf1c253be63",
    "prefLabel": "Moscow mule",
    "properties": {
        "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
            "http://vocabulary.semantic-web.at/cocktail-ontology/Cocktail",
            "http://www.w3.org/2004/02/skos/core#Concept"
        ]
    }
}

Requesting Multiple Properties

When multiple skos properties should be retrieved in a single request you can find details about request syntax here: Using a List of Request Parameters

Get concept request with specified property request for dcterms:created and skos:broader

http://vocabulary.semantic-web.at/PoolParty/api/thesaurus/1DDFEF08-2277-0001-2C3A-1A005A00E7A0/concept?concept=http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7&properties=http://purl.org/dc/terms/created, skos:broader

Result of the sample request

{
  "uri": "http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7",
  "prefLabel": "Kir",
  "broaders": [
    "http://vocabulary.semantic-web.at/cocktails/b9bf3799-a4e4-47f7-9aea-7697cc998a34",
    "http://vocabulary.semantic-web.at/cocktails/b523727e-7f49-4e1b-9c09-55002ee3a81e",
    "http://vocabulary.semantic-web.at/cocktails/204cd4e7-58d7-4417-837a-7f9cc41663c8"
  ],
  "properties": {
    "http://purl.org/dc/terms/created": [
      "2015-05-02T17:26:56Z"
    ]
  }
}

Requesting All Properties

You can useproperties = allwhen you want to fetch all skos and custom properties.

Get concept request with all properties and their values

http://vocabulary.semantic-web.at/PoolParty/api/thesaurus/1DDFEF08-2277-0001-2C3A-1A005A00E7A0/concept?concept=http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7&properties=all

Result of the sample request

{
  "uri": "http://vocabulary.semantic-web.at/cocktails/ea946e07-e812-4492-a0ed-124d73bfbba7",
  "prefLabel": "Kir",
  "altLabels": [
    "Kir Royale",
    "Blanc-cassis",
    "Kir Breton"
  ],
  "definitions": [
    "Kir is a popular French cocktail made with a measure of crème de cassis (blackcurrant liqueur) topped up with white wine. In France it is usually drunk as an apéritif before a meal or snack. Originally the wine used was Bourgogne Aligoté, a lesser white wine of Burgundy. Nowadays, various white wines are used throughout France, according to the region and the whim of the barkeeper. Many prefer a white Chardonnay-based Burgundy, such as Chablis."
  ],
  "broaders": [
    "http://vocabulary.semantic-web.at/cocktails/b9bf3799-a4e4-47f7-9aea-7697cc998a34",
    "http://vocabulary.semantic-web.at/cocktails/b523727e-7f49-4e1b-9c09-55002ee3a81e",
    "http://vocabulary.semantic-web.at/cocktails/204cd4e7-58d7-4417-837a-7f9cc41663c8"
  ],
  "conceptSchemes": [
    "http://vocabulary.semantic-web.at/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b"
  ],
  "exactMatch": [
    "http://dbpedia.org/resource/Kir_(cocktail)"
  ],
  "properties": {
    "http://vocabulary.semantic-web.at/cocktail-ontology/preparation": [
      "Pour Créme de Cassis into glass, top up with white wine. For Kir Royal: Use champagne instead of white wine."
    ],
    "http://purl.org/dc/terms/creator": [
      "blumauera"
    ],
    "http://vocabulary.semantic-web.at/cocktail-ontology/uses": [
      "http://vocabulary.semantic-web.at/cocktails/e576e848-0f11-4f7a-b6b3-1ff820b02023",
      "http://vocabulary.semantic-web.at/cocktails/0381bd47-ad07-428a-b5c4-ee2608f2ebd3"
    ],
    "http://schema.semantic-web.at/ppt/inScheme": [
      "http://vocabulary.semantic-web.at/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b"
    ],
    "http://purl.org/dc/terms/modified": [
      "2015-07-02T15:05:26Z"
    ],
    "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
      "http://www.w3.org/2004/02/skos/core#Concept",
      "http://vocabulary.semantic-web.at/cocktail-ontology/Cocktail"
    ],
    "http://vocabulary.semantic-web.at/cocktail-ontology/iba": [
      "http://www.iba-world.com/index.php?option=com_content&id=225&Itemid=532"
    ],
    "http://vocabulary.semantic-web.at/cocktail-ontology/image": [
      "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Kir_cocktail.jpg/440px-Kir_cocktail.jpg"
    ],
    "http://purl.org/dc/terms/created": [
      "2015-05-02T17:26:56Z"
    ],
    "http://purl.org/dc/terms/contributor": [
      "nagyhel"
    ],
    "http://vocabulary.semantic-web.at/cocktail-ontology/consists-of": [
      "http://vocabulary.semantic-web.at/cocktails/df4ff163-a7c8-4c40-b556-f9390fd97972",
      "http://vocabulary.semantic-web.at/cocktails/687a5d86-1f4e-4a6b-b5ca-3b5d74aeafcc"
    ]
  }
}