Class DataDiscoveryResource
java.lang.Object
org.odpi.openmetadata.viewservices.datadiscovery.server.spring.DataDiscoveryResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/data-discovery")
public class DataDiscoveryResource
extends Object
The DataDiscoveryResource provides part of the server-side implementation of the Data Discovery OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattachAnnotationToReport
(String serverName, String surveyReportGUID, String newAnnotationGUID, NewRelationshipRequestBody requestBody) Create a relationship that links a new annotation to its survey report.createAnnotation
(String serverName, NewElementRequestBody requestBody) Create an annotation.createAnnotationFromTemplate
(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent an annotation using an existing metadata element as a template.deleteAnnotation
(String serverName, String annotationGUID, DeleteElementRequestBody requestBody) Delete an annotation.detachAnnotationFromDescribedElement
(String serverName, String elementGUID, String annotationGUID, DeleteRelationshipRequestBody requestBody) Detach an annotation from the element that it is describing (via AssociatedAnnotation relationship).detachAnnotationFromItsPredecessor
(String serverName, String previousAnnotationGUID, String newAnnotationGUID, DeleteRelationshipRequestBody requestBody) Detach an annotation from an annotation from the previous run of the survey.detachAnnotationFromReport
(String serverName, String surveyReportGUID, String newAnnotationGUID, DeleteRelationshipRequestBody requestBody) Detach an annotation from its report (ReportedAnnotation relationship).detachDataClassMatch
(String serverName, String annotationGUID, String dataClassGUID, DeleteRelationshipRequestBody requestBody) Detach a data class annotation from a data class.detachDiscoveredSchemaType
(String serverName, String annotationGUID, String schemaTypeGUID, DeleteRelationshipRequestBody requestBody) Detach a schema analysis annotation from a matching schema type.detachRequestForActionTarget
(String serverName, String annotationGUID, String elementGUID, DeleteRelationshipRequestBody requestBody) Detach a request for action annotation from its intended target element.detachResourceProfileData
(String serverName, String annotationGUID, String assetGUID, DeleteRelationshipRequestBody requestBody) Detach a resource profile log annotation from an asset where the profile data is stored.findAnnotations
(String serverName, SearchStringRequestBody requestBody) Retrieve the list of annotation metadata elements that contain the search string.getAnnotationByGUID
(String serverName, String annotationGUID, GetRequestBody requestBody) Return the properties of a specific annotation.getAnnotationExtensions
(String serverName, String annotationGUID, ResultsRequestBody requestBody) Returns the list of annotations that extend the supplied annotation (AnnotationExtension relationship).getAnnotationsByAnalysisStep
(String serverName, FilterRequestBody requestBody) Returns the list of annotations associated with a particular analysis step.getAnnotationsByAnnotationType
(String serverName, FilterRequestBody requestBody) Returns the list of annotations with a particular annotation type property.getAnnotationsByName
(String serverName, FilterRequestBody requestBody) Returns the list of annotations with a particular name.getAnnotationsForElement
(String serverName, String elementGUID, ResultsRequestBody requestBody) Returns the list of annotations that describe the supplied element (AssociatedAnnotation relationship).getNewAnnotations
(String serverName, String surveyReportGUID, ResultsRequestBody requestBody) Returns the annotations created under the supplied survey report.getPreviousAnnotations
(String serverName, String annotationGUID, ResultsRequestBody requestBody) Returns the list of annotations that are extended by the supplied annotation (AnnotationExtension relationship).linkAnnotationToDescribedElement
(String serverName, String elementGUID, String annotationGUID, NewRelationshipRequestBody requestBody) Attach an annotation to the element that it is describing (via AssociatedAnnotation relationship).linkAnnotationToItsPredecessor
(String serverName, String previousAnnotationGUID, String newAnnotationGUID, NewRelationshipRequestBody requestBody) Attach an annotation to the equivalent annotation from the previous run of the survey.linkDataClassMatch
(String serverName, String annotationGUID, String dataClassGUID, NewRelationshipRequestBody requestBody) Attach a data class annotation to a data class.linkDiscoveredSchemaType
(String serverName, String annotationGUID, String schemaTypeGUID, NewRelationshipRequestBody requestBody) Attach a schema analysis annotation to a matching schema type.linkRequestForActionTarget
(String serverName, String annotationGUID, String elementGUID, NewRelationshipRequestBody requestBody) Attach a request for action annotation to the element that needs attention.linkResourceProfileData
(String serverName, String annotationGUID, String assetGUID, NewRelationshipRequestBody requestBody) Attach a resource profile log annotation to an asset where the profile data is stored.updateAnnotation
(String serverName, String annotationGUID, UpdateElementRequestBody requestBody) Update the properties of an annotation.
-
Constructor Details
-
DataDiscoveryResource
public DataDiscoveryResource()Default constructor
-
-
Method Details
-
createAnnotation
@PostMapping(path="/annotations") public GUIDResponse createAnnotation(@PathVariable String serverName, @RequestBody(required=false) NewElementRequestBody requestBody) Create an annotation.- Parameters:
serverName
- name of called server.requestBody
- properties for the annotation.- Returns:
- unique identifier of the newly created element InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createAnnotationFromTemplate
@PostMapping(path="/annotations/from-template") public GUIDResponse createAnnotationFromTemplate(@PathVariable String serverName, @RequestBody(required=false) TemplateRequestBody requestBody) Create a new metadata element to represent an annotation using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.- Parameters:
serverName
- calling userrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateAnnotation
@PostMapping(path="/annotations/{annotationGUID}/update") public VoidResponse updateAnnotation(@PathVariable String serverName, @PathVariable String annotationGUID, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties of an annotation.- Parameters:
serverName
- name of called server.annotationGUID
- unique identifier of the annotation (returned from create)requestBody
- properties for the new element.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
attachAnnotationToReport
@PostMapping(path="/survey-reports/{surveyReportGUID}/new-annotations/{newAnnotationGUID}/attach") public VoidResponse attachAnnotationToReport(@PathVariable String serverName, @PathVariable String surveyReportGUID, @PathVariable String newAnnotationGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Create a relationship that links a new annotation to its survey report. This relationship is typically established during the createAnnotation as the parent relationship. It is included for completeness.- Parameters:
serverName
- name of called serversurveyReportGUID
- unique identifier of the reportnewAnnotationGUID
- unique identifier of the annotationrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachAnnotationFromReport
@PostMapping(path="/survey-reports/{surveyReportGUID}/new-annotations/{newAnnotationGUID}/detach") public VoidResponse detachAnnotationFromReport(@PathVariable String serverName, @PathVariable String surveyReportGUID, @PathVariable String newAnnotationGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach an annotation from its report (ReportedAnnotation relationship).- Parameters:
serverName
- name of called serversurveyReportGUID
- unique identifier of the reportnewAnnotationGUID
- unique identifier of the annotationrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkAnnotationToDescribedElement
@PostMapping(path="/elements/{elementGUID}/associated-annotations/{annotationGUID}/attach") public VoidResponse linkAnnotationToDescribedElement(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String annotationGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach an annotation to the element that it is describing (via AssociatedAnnotation relationship).- Parameters:
serverName
- name of called serverelementGUID
- unique identifier of the described elementannotationGUID
- unique identifier of the annotationrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachAnnotationFromDescribedElement
@PostMapping(path="/elements/{elementGUID}/associated-annotations/{annotationGUID}/detach") public VoidResponse detachAnnotationFromDescribedElement(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String annotationGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach an annotation from the element that it is describing (via AssociatedAnnotation relationship).- Parameters:
serverName
- name of called serverelementGUID
- unique identifier of the described elementannotationGUID
- unique identifier of the annotationrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkAnnotationToItsPredecessor
@PostMapping(path="/annotations/{previousAnnotationGUID}/later-annotations/{newAnnotationGUID}/attach") public VoidResponse linkAnnotationToItsPredecessor(@PathVariable String serverName, @PathVariable String previousAnnotationGUID, @PathVariable String newAnnotationGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach an annotation to the equivalent annotation from the previous run of the survey.- Parameters:
serverName
- name of called serverpreviousAnnotationGUID
- unique identifier of the annotation from the previous run of the surveynewAnnotationGUID
- unique identifier of the annotation from this run of the surveyrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachAnnotationFromItsPredecessor
@PostMapping(path="/annotations/{previousAnnotationGUID}/later-annotations/{newAnnotationGUID}/detach") public VoidResponse detachAnnotationFromItsPredecessor(@PathVariable String serverName, @PathVariable String previousAnnotationGUID, @PathVariable String newAnnotationGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach an annotation from an annotation from the previous run of the survey.- Parameters:
serverName
- name of called serverpreviousAnnotationGUID
- unique identifier of the annotation from the previous run of the surveynewAnnotationGUID
- unique identifier of the annotation from this run of the surveyrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkDiscoveredSchemaType
@PostMapping(path="/annotations/{annotationGUID}/discovered-schema-type/{schemaTypeGUID}/attach") public VoidResponse linkDiscoveredSchemaType(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String schemaTypeGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach a schema analysis annotation to a matching schema type.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationschemaTypeGUID
- unique identifier of the schema typerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachDiscoveredSchemaType
@PostMapping(path="/annotations/{annotationGUID}/discovered-schema-type/{schemaTypeGUID}/detach") public VoidResponse detachDiscoveredSchemaType(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String schemaTypeGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach a schema analysis annotation from a matching schema type.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationschemaTypeGUID
- unique identifier of the schema typerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkResourceProfileData
@PostMapping(path="/annotations/{annotationGUID}/resource-profile-data-assets/{assetGUID}/attach") public VoidResponse linkResourceProfileData(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String assetGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach a resource profile log annotation to an asset where the profile data is stored.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationassetGUID
- unique identifier of the associated assetrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachResourceProfileData
@PostMapping(path="/annotations/{annotationGUID}/resource-profile-data-assets/{assetGUID}/detach") public VoidResponse detachResourceProfileData(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String assetGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach a resource profile log annotation from an asset where the profile data is stored.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationassetGUID
- unique identifier of the associated assetrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkDataClassMatch
@PostMapping(path="/annotations/{annotationGUID}/matched-data-classes/{dataClassGUID}/attach") public VoidResponse linkDataClassMatch(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String dataClassGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach a data class annotation to a data class.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationdataClassGUID
- unique identifier of the associated data classrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachDataClassMatch
@PostMapping(path="/annotations/{annotationGUID}/matched-data-classes/{dataClassGUID}/detach") public VoidResponse detachDataClassMatch(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String dataClassGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach a data class annotation from a data class.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationdataClassGUID
- unique identifier of the associated data classrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkRequestForActionTarget
@PostMapping(path="/annotations/{annotationGUID}/request-for-action-targets/{elementGUID}/attach") public VoidResponse linkRequestForActionTarget(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String elementGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Attach a request for action annotation to the element that needs attention.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationelementGUID
- unique identifier of the associated elementrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachRequestForActionTarget
@PostMapping(path="/annotations/{annotationGUID}/request-for-action-targets/{elementGUID}/detach") public VoidResponse detachRequestForActionTarget(@PathVariable String serverName, @PathVariable String annotationGUID, @PathVariable String elementGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody) Detach a request for action annotation from its intended target element.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the annotationelementGUID
- unique identifier of the associated elementrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteAnnotation
@PostMapping(path="/annotations/{annotationGUID}/delete") public VoidResponse deleteAnnotation(@PathVariable String serverName, @PathVariable String annotationGUID, @RequestBody(required=false) DeleteElementRequestBody requestBody) Delete an annotation.- Parameters:
serverName
- name of called serverannotationGUID
- unique identifier of the element to deleterequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getAnnotationsByName
@PostMapping(path="/annotations/by-name") public OpenMetadataRootElementsResponse getAnnotationsByName(@PathVariable String serverName, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of annotations with a particular name.- Parameters:
serverName
- name of the service to route the request torequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAnnotationsByAnalysisStep
@PostMapping(path="/annotations/by-analysis-step") public OpenMetadataRootElementsResponse getAnnotationsByAnalysisStep(@PathVariable String serverName, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of annotations associated with a particular analysis step.- Parameters:
serverName
- name of the service to route the request torequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAnnotationsByAnnotationType
@PostMapping(path="/annotations/by-annotation-type") public OpenMetadataRootElementsResponse getAnnotationsByAnnotationType(@PathVariable String serverName, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of annotations with a particular annotation type property.- Parameters:
serverName
- name of the service to route the request torequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAnnotationsForElement
@PostMapping(path="/elements/{elementGUID}/associated-annotations") public OpenMetadataRootElementsResponse getAnnotationsForElement(@PathVariable String serverName, @PathVariable String elementGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the list of annotations that describe the supplied element (AssociatedAnnotation relationship).- Parameters:
serverName
- name of the service to route the request toelementGUID
- unique identifier of the starting elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getNewAnnotations
@PostMapping(path="/survey-reports/{surveyReportGUID}/new-annotations") public OpenMetadataRootElementsResponse getNewAnnotations(@PathVariable String serverName, @PathVariable String surveyReportGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the annotations created under the supplied survey report.- Parameters:
serverName
- name of the service to route the request tosurveyReportGUID
- unique identifier of the starting elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAnnotationExtensions
@PostMapping(path="/annotations/{annotationGUID}/annotation-extensions") public OpenMetadataRootElementsResponse getAnnotationExtensions(@PathVariable String serverName, @PathVariable String annotationGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the list of annotations that extend the supplied annotation (AnnotationExtension relationship).- Parameters:
serverName
- name of the service to route the request toannotationGUID
- unique identifier of the starting elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getPreviousAnnotations
@PostMapping(path="/annotations/{annotationGUID}/previous-annotations") public OpenMetadataRootElementsResponse getPreviousAnnotations(@PathVariable String serverName, @PathVariable String annotationGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the list of annotations that are extended by the supplied annotation (AnnotationExtension relationship).- Parameters:
serverName
- name of the service to route the request toannotationGUID
- unique identifier of the starting elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findAnnotations
@PostMapping(path="/annotations/by-search-string") public OpenMetadataRootElementsResponse findAnnotations(@PathVariable String serverName, @RequestBody(required=false) SearchStringRequestBody requestBody) Retrieve the list of annotation metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request torequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAnnotationByGUID
@PostMapping(path="/annotations/{annotationGUID}/retrieve") public OpenMetadataRootElementResponse getAnnotationByGUID(@PathVariable String serverName, @PathVariable String annotationGUID, @RequestBody(required=false) GetRequestBody requestBody) Return the properties of a specific annotation.- Parameters:
serverName
- name of the service to route the request toannotationGUID
- unique identifier of the required elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-