Rest API 5.0

Schema Services

Each connection has schemas associated with it in OvalEdge. Bringing the catalog data into OvalEdge via API should start with creating a new schema for the manual connection.

The following are the operational APIs associated with the schema service.

1. Get Connection Schemas

Get All Connection method requires connectionId which returns the list of Schema Objects

Mandatory Fields: connectionId.

Method Url Parameter
GetConnectionSchemas /api/connection/{connectionId}/schemas connectionId (must be number)

Response

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "schemas": [

      {

        "schemaId": 1299,

        "schemaName": "manual",

        "description": "manual",

        "connectionId": 1032,

        "connectionName": "Manual",

        "serverType": "manual",

        "businessDescription": null,

        "crawled": 0,

        "lastMetaSyncDate": "",

        "cronExps": [],

        "tagName": null,

        "glossaryName": null,

        "domain": null,

        "schemaNames": null,

        "customFields": null,

        "technicalDescription": null,

        "rowCount": null,

        "tableCount": null,

        "schemaStats": []

      }

      ]

     }

}

2. Crawl Existing Schema

This API is to crawl an existing schema from a connection. It requires connection details and schema details to crawl. If a schema is given, check the schema existence, crawl and return the schema details and respective job details.

Mandatory Fields: connectionId, connectionName, schemaIds / schemaNames.

Method Url
crawlExistingSchema /api/jobs/crawl/schema/existing

Request Body

{

  "businessDescription": "string",

  "connectionId": 0,

  "connectionName": "string",

  "crawled": 0,

  "customFields": {},

  "description": "string",

  "domain": "string",

  "glossaryName": "string",

  "lastMetaSyncDate": "string",

  "rowCount": 0,

  "schemaName": "string",

  "schemaNames": [

    "string"

  ],

  "schemaStats": [

    {

      "commented": 0,

      "looked": 0,

      "queried": 0,

      "userid": "string",

      "userscore": 0

    }

  ],

  "tableCount": 0,

  "tagName": "string",

  "technicalDescription": "string"

}

Response Body

{

  "status": 0,

  "statusCode": "",

  "statusMsg": "",

 “response”: {

“Schema Crawl Information”:[

{

“schemaId”: 123,

“schemaName”:”schema Name”,

“jobId”: 1002,

“jobStatus”: “job status”

}

]

}

 }

3. Crawl New Schema

This API is to crawl a new schema from a connection. It requires connection details and schema details to crawl. If a schema is given, check the schema existence, if not exist fetch all remote schemas again and check. If the schema is not given, check for all un crawled schemas and initiate crawling. It returns the schema details and respective job details.

Mandatory Fields: connectionId, connectionName, schemaName.

Method Url
crawlNewSchema /api/jobs/crawl/schema/new

Request Body

{

  "connectionId": 0,*

  "connectionName": "string",*

  "crawled": 0,

  "lastMetaSyncDate": "string",

  "schemaName": "string"*

}

Response Body

{

  "status": 0,

  "statusCode": "",

  "statusMsg": "",

 “response”: {

“Schema Crawl Information”:[

{

“schemaId”: 123,

“schemaName”:”schema Name”,

“jobId”: 1002,

“jobStatus”: “job status”

}

]

}

 }

4. Add Schema

Add Schema method requires a schema object as a request body, it returns a schema object as a response.

Mandatory Fields: connectionId, connectionName, schemaName, businessDescription, technicalDescription

Method Url
AddSchema /api/schema

Request Body

{

"Business description": "string",

"Connection id": 248,*

"connectionName": "string",

"crawled": 1,*

"description": "string",

"lastMetaSyncDate": "2019-11-27 01:22:12",*

"schemaName": "schemaName"*

}

Response

{

  "status": false,

  "statusCode": "Tag assigned to object :1309",

  "statusMsg": "Domain Not Exist : string",

  "response": {

    "schema": {

      "schemaId": 1309,

      "schemaName": "Schema From API",

      "description": "string",

      "connectionId": 1032,

      "connectionName": null,

      "serverType": null,

      "businessDescription": "string",

      "crawled": 0,

      "lastMetaSyncDate": "",

      "cronExps": null,

      "tagName": "string",

      "glossaryName": null,

      "domain": null,

      "schemaNames": null,

      "customFields": null,

      "technicalDescription": null,

      "rowCount": null,

      "tableCount": null,

      "schemaStats": []

    },

    "TagsLogs": [

      "string already exist and Tag assigned to object :1309"

    ],

    "logsList": [

      "Schema Created : Schema From API for Connection : Manual",

      "string already exist and Tag assigned to object :1309"

    ],

    "objectName": "oeschema",

    "objectId": 1309

  }

}

5. Get Schema

The Get Schema method requires {schemaId} as a parameter and returns a schema object as a response.

Mandatory Fields: schemaId.

Method Url Parameter
getSchema /api/schema/{schemaId} schemaId

Response

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "schema": {

      "schemaId": 1308,

      "schemaName": "NewSchemaForManualFromAPI",

      "description": "string",

      "connectionId": 1032,

      "connectionName": "Manual",

      "serverType": "manual",

      "businessDescription": "string",

      "crawled": 0,

      "lastMetaSyncDate": "",

      "cronExps": [],

      "tagName": null,

      "glossaryName": null,

      "domain": null,

      "schemaNames": null,

      "customFields": {},

      "technicalDescription": "string",

      "rowCount": 0,

      "tableCount": 0,

      "schemaStats": [

        {

          "userid": "raghu",

          "userscore": 0,

          "looked": 0,

          "queried": 0,

          "commented": 0

        }

      ]

    }

  }

}

6. Deactivate Schema

The Deactivate Schema method requires {schemaId} as a parameter, It deactivates the schema from the OvalEdge application. And returns the response message as successfully deactivated.

Mandatory Fields: schemaId.

Method Url Parameter
deactivateSchema /api/schema/{schemaId} schemaId

Response

{

"status": true,

"statusCode": "",

"statusMsg": "",

"response": {

"msg": "Successfully deactivated schema with id 936 and schema name DefaultSchema"

  }

7. Add Business And Technical Description API

This API updates business and technical descriptions for the given schema Id.

Mandatory Fields: schemaId.

Method Url
addBusinessAndTechnicalDescription /api/schema/{schemaId}/description

Request Body

{

  "businessDescription": "string",

  "isEncodedText": true,

  "technicalDescription": "string"

}

Example

{

  "businessDescription": "Updated business description",

  "isEncodedText": false,

  "technicalDescription": "Updated technical description"

}

Response Body

{

  "status": true,

  "statusCode": "Successfully updated given descriptions",

  "statusMsg": "",

  "response": {}

}

8. Add Business and Technical Description API using the Schema Name

This API updates business and technical descriptions for the given schema.

Mandatory Fields: connectionName, schemaName

Method Url
addBusinessAndTechnicalDescription /api/schema/description/add

Request Body

[

  {

    "businessDescription": "string",

    "connectionName": "string",

    "isEncodedText": true,

    "schemaName": "string",

    "technicalDescription": "string"

  }

]

Example

[

  {

    "businessDescription": "Updating business description",

    "connectionName": "mysql",

    "isEncodedText": false,

    "schemaName": "ovaledgedb",

    "technicalDescription": "updating technical description"

  }

]

Response Body

{

  "status": true,

  "statusCode": "Successfully updated given descriptions",

  "statusMsg": "",

  "response": {}

}