Rest API 5.0

Tag Services

This API consists of  some tags related operations (add/assign/search/update). The following are the operational APIs associated with the Tag Services.

1. Get Tag

The Get Tag Method requires the {tagId} as a parameter that returns the tag object as a response.

Mandatory Fields: tagId

Method Url Parameter
getTag /api/tag/{tagId} {tagId}

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"tag": {

"tagId": 1,

"parentTagId": 0,

"tagName": "I NEED THIS",

"description": "xyzabxcxcz",

"logo": null,

"useScore": 84,

"tagType": 0

    }

  }

}

2. Add Tag

The Add Tag Method requires a tag object as a request body and gives a response as a tag object. There are different tag types available each tag type has its own set of rules in the OvalEdge tool which are listed below.

Tag Types

1 - (NORMAL)

2 – (DATASETGROUP)

3 – (BG)

4 – (PII)

5 – (PRINCIPAL)

Mandatory Fields: tagId, tagName

Method Url
addTag /api/tag/add

Request Body

[

  {

"description": "string",

"logo": "string",

"parentTagId": 0,

"tagId": 0,

"tagName": "general",*

"tagType": 1, *

"useScore": 0

  }

]

Response

{

"status": true,

"statusCode": "Tag Created: Tag Name",

"statusMsg": "",

"response": {

"tags": [

      {

"tagId": 117,

"parentTagId": 0,

"tagName": "ff",

"description": "string",

"logo": null,

"useScore": 0,

"tagType": 1,

“customFields”: null

      }

    ]

  }

}

3. Add Tag To Object

The Add Tag To Object Method requires an object as a request body that returns the response message as tag added successfully

The following are the Object types associated to the Add Tag:

TableTag, ColumnTag, SchemaTag, FileTag, FileColumnTag, ChartTag, ChartColumnTag, QueryTag, StoryTag, glossary, ticket.

Mandatory Fields: objectId, objectType, tagIds.

Method Url
addTagToObject /api/tag/assignTag

Request Body

[

  {

"objectId": 170778, *

"objectType": "oecolumn",*

"tagId": 1*

  }

]

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"I NEED THIS: not inserted": "you can add only normal tags"

  }

}

Request Body

[

  {

"objectId": 170778, *

"objectType": "TableTag",*

"tagId": 1005*

  }

]

Response

{

"status": false,

"statusCode": "",

"statusMsg": "",

"response": {

"Cannot insert": "No tag is identified with the tagId: 1005"

  }

}

4. Get Tags By Object

The Get Tags By Object Method requires parameters {objectId},{objectType},{tagType} that returns the list of tag object

Mandatory Fields: objectId, objectType, tagType

NOTE: TagType values should be provided as integers. It’s respective values are like below

1 = General

2 = Data Asset Group

3 = Business Glossary

4 = PII

5 =  Principal

Method Url Parameter
getTagsByObject /api/tag/getTagsByObject {objectId},{objectType},{tagType

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"tags": [

      {

"tagId": 2,

"parentTagId": 0,

"tagName": "BRAND_CODE",

"description": null,

"logo": null,

"useScore": 42,

"tagType": 0

      }

    ]

  }

}

5. Update Tag

The Update Tag Method requires the tag object as a request body that returns the response as an updated tag object.

Mandatory Fields: tagId, tagName.

Method Url
updateTag /api/tag/update

Request Body

{

"description": "string",

"parentTagId": 0,

"tagId": 1, *

"tagName": "general",*

"tagType": 1, *

"useScore": 0

}

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"tag": {

"tagId": 1,

"parentTagId": 0,

"tagName": "general",

"description": "string",

"logo": null,

"useScore": 87,

"tagType": 0

    }

  }

}

6. Get Tags

The Get Tags Method requires the following parameters that intern return  response as list of tag objects

Mandatory Fields: limit, offset.

  • {limit} – must be number > offset else all tags will be returned
  • {offset} – must be number
Method Url Parameter
getTags /api/tags {limit},{offset}

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"tags": [

      {

"tagId": 2,

"parentTagId": 0,

"tagName": "BRAND_CODE",

"description": null,

"logo": null,

"useScore": 42,

"tagType": 0

      }

    ]

  }

}

7. Get Tags By ParentID

The Get Tags Method requires {parentId} as a parameter that returns a list of child tag objects.

Mandatory Fields: limit, offset, parentId.

Method Url Parameter
getTags /api/tags/{parentId} {parentId}

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"tags": [

      {

"tagId": 108,

"parentTagId": 0,

"tagName": "DAG01",

"description": "DAG01",

"logo": null,

"useScore": 25,

"tagType": 2

      },

      {

"tagId": 109,

"parentTagId": 0,

"tagName": "DAGASSET",

"description": "DAGDESC",

"logo": null,

"useScore": 3,

"tagType": 2

      }

   ]

 }

}