Custom Manage term templates from API

Pablo Calvo 0 Reputation points
2023-04-21T13:59:06.96+00:00

I'm looking for an API statement to list all Custom Manage term templates, after getting all templates I'll use each value to get details using the next statement: GET https://{{account}}.purview.azure.com/catalog/api/types/termtemplatedef/name/{{value}}

The image here: Custom Manage term templates.png Thanks!

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,065 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,442 Reputation points Microsoft Employee
    2023-04-24T22:59:32.8233333+00:00

    Hi @Pablo Calvo ,

    Welcome to Microsoft Q&A forum and thanks for reaching out here.

    If you looking for an API that returns list of all Term templates, then you can use Types_GetAllTermTemplateDef API and then you can extract each Term template name and pass it to next API as needed.

    GET {Endpoint}/catalog/api/atlas/v2/types/typedefs?type=term_template
    

    Sample API response looks like below:

    {
        "enumDefs": [],
        "structDefs": [],
        "classificationDefs": [],
        "entityDefs": [],
        "relationshipDefs": [],
        "termTemplateDefs": [
            {
                "category": "TERM_TEMPLATE",
                "guid": "6xxxxxxx-xxxxxxxx",
                "createdBy": "xxxxxxx-xxxxxxxx",
                "updatedBy": "xxxxxxx-xxxxxxxx",
                "createTime": 1682376261552,
                "updateTime": 1682376261552,
                "version": 1,
                "name": "CustomTermTemplate2",
                "description": "My CustomTermTemplate2",
                "typeVersion": "1.0",
                "lastModifiedTS": "1",
                "attributeDefs": [
                    {
                        "name": "MySampleAttribute2",
                        "typeName": "string",
                        "isOptional": true,
                        "cardinality": "SINGLE",
                        "valuesMinCount": 0,
                        "valuesMaxCount": 1,
                        "isUnique": false,
                        "isIndexable": false,
                        "includeInNotification": false,
                        "defaultValue": "SampleAttribute2",
                        "options": {
                            "isDisabled": "false"
                        }
                    }
                ]
            },
            {
                "category": "TERM_TEMPLATE",
                "guid": "xxxxx-xxx-xxxx",
                "createdBy": "xxxxxxx-xxxxxxxx",
                "updatedBy": "xxxxxxx-xxxxxxxx",
                "createTime": 1682376211721,
                "updateTime": 1682376211721,
                "version": 1,
                "name": "CustomTermTemplate1",
                "description": "My CustomTermTemplate1",
                "typeVersion": "1.0",
                "lastModifiedTS": "1",
                "attributeDefs": [
                    {
                        "name": "MySampleAttribute1",
                        "typeName": "string",
                        "isOptional": true,
                        "cardinality": "SINGLE",
                        "valuesMinCount": 0,
                        "valuesMaxCount": 1,
                        "isUnique": false,
                        "isIndexable": false,
                        "includeInNotification": false,
                        "defaultValue": "Sample1",
                        "description": "TestingAttributes1",
                        "options": {
                            "isDisabled": "false"
                        }
                    }
                ]
            }
        ],
        "businessMetadataDefs": []
    }
    

    Hope this helps.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments