Getting the list of semantic types using the API - Cloud

Talend Cloud Data Stewardship User Guide

Version
Cloud
Language
English
Product
Talend Cloud
Module
Talend Data Stewardship
Content
Administration and Monitoring > Managing users
Data Governance > Assigning tasks
Data Governance > Managing campaigns
Data Governance > Managing data models
Data Quality and Preparation > Handling tasks
Last publication date
2023-08-28

Retrieve the list of all semantic types.

Procedure

  1. If you do not have a personal access token yet, generate one. For further information, see Generating a Personal Access Token.
  2. Open Talend API Tester in your browser.
  3. From the Repository tab, select Get in the Method drop-down list.
  4. Enter the following URL: https://tds.{region}.cloud.talend.com/semanticservice/categories

    You'll find a list of the URLs to use for each data center in Talend Cloud regions and URLs.

  5. Click the Add header button and enter Authorization in the name field and Bearer followed by a whitespace and your token in the value field.
  6. Click Send.

Results

The API returns a 200 HTTP code to inform you that the request was successful. The response includes a list of all semantic types in JSON with their attributes.

For many API calls, you need to include the unique identifier ("id") assigned to the semantic type in the path. For example, see Editing the semantic type in sandbox status using the API.

For example, the following response returns a list of the two available semantic types with their attributes:

[
    {
        "id": "5836fbb042b02a698752e679",
        "name": "CONTINENT",
        "label": "Continent",
        "description": "Continent name (multilingual)",
        "type": "DICT",
        "privacyLevel": "NORMAL",
        "creator": "Talend",
        "creatorName": "Talend",
        "createdAt": 1481207929751,
        "completeness": true,
        "publishedAt": 1481207929751,
        "lastPublisher": "Talend",
        "lastPublisherName": "Talend",
        "validationMode": "EXACT_IGNORE_CASE_AND_ACCENT",
        "state": "PUBLISH"
    },
    {
        "id": "583edc44ec06957a34fa642c",
        "name": "WEB_DOMAIN",
        "label": "Web Domain",
        "description": "Website domain",
        "type": "REGEX",
        "privacyLevel": "NORMAL",
        "creator": "Talend",
        "creatorName": "Talend",
        "createdAt": 1481207929751,
        "regEx": {
            "mainCategory": "AlphaNumeric",
            "validator": {
                "patternString": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,24}$",
                "caseInsensitive": true,
                "re2jCompliant": true,
                "generexCompliant": true
            }
        },
        "completeness": true,
        "publishedAt": 1481207929751,
        "lastPublisher": "Talend",
        "lastPublisherName": "Talend",
        "state": "PUBLISH"
    }
]

For a description of the response, browse Talend Dictionary Service REST API documentation.