Class APIManagerRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.server.APIManagerRESTServices
APIManagerRESTServices is the server-side implementation of the Data Manager OMAS's
support for apis. It matches the APIManagerClient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateAPI
(String serverName, String userId, boolean apiManagerIsHome, String endpointGUID, APIRequestBody requestBody) Create a new metadata element to represent a api.createAPIFromTemplate
(String serverName, String userId, String endpointGUID, String templateGUID, boolean apiManagerIsHome, TemplateRequestBody requestBody) Create a new metadata element to represent a API using an existing metadata element as a template.createAPIOperation
(String serverName, String userId, String apiGUID, APIOperationRequestBody requestBody) Create a new metadata element to represent a API operation.createAPIOperationFromTemplate
(String serverName, String userId, String templateGUID, String apiGUID, TemplateRequestBody requestBody) Create a new metadata element to represent an API operation using an existing metadata element as a template.createAPIParameterList
(String serverName, String userId, String apiOperationGUID, APIParameterListType parameterListType, APIParameterListRequestBody requestBody) Create a new metadata element to represent a API parameter list.createAPIParameterListFromTemplate
(String serverName, String userId, String templateGUID, String apiOperationGUID, APIParameterListType parameterListType, TemplateRequestBody requestBody) Create a new metadata element to represent an API parameter list using an existing metadata element as a template.findAPIOperations
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API operation metadata elements that contain the search string.findAPIParameterLists
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API parameter list metadata elements that contain the search string.findAPIs
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API metadata elements that contain the search string.getAPIByGUID
(String serverName, String userId, String guid) Retrieve the API metadata element with the supplied unique identifier.getAPIOperationByGUID
(String serverName, String userId, String guid) Retrieve the API operation metadata element with the supplied unique identifier.getAPIOperationsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API operation metadata elements with a matching qualified or display name.getAPIOperationsForAPI
(String serverName, String userId, String apiGUID, int startFrom, int pageSize) Return the list of operation associated with an API.getAPIParameterListByGUID
(String serverName, String userId, String guid) Retrieve the API parameter list metadata element with the supplied unique identifier.getAPIParameterListsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API parameter list metadata elements with a matching qualified or display name.getAPIParameterListsForOperation
(String serverName, String userId, String apiOperationGUID, int startFrom, int pageSize) Return the list of schemas associated with a topic.getAPIsByEndpoint
(String serverName, String userId, String endpointGUID, int startFrom, int pageSize) Retrieve the list of API metadata elements linked to the requested endpoint.getAPIsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API metadata elements with a matching qualified or display name.getAPIsForAPIManager
(String serverName, String userId, String apiManagerGUID, String apiManagerName, int startFrom, int pageSize) Retrieve the list of apis created by this caller.publishAPI
(String serverName, String userId, String apiGUID, NullRequestBody nullRequestBody) Update the zones for the API asset so that it becomes visible to consumers.removeAPI
(String serverName, String userId, String apiGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an api.removeAPIOperation
(String serverName, String userId, String apiOperationGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an API operation.removeAPIParameterList
(String serverName, String userId, String apiParameterListGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an API parameter list.updateAPI
(String serverName, String userId, String apiGUID, boolean isMergeUpdate, APIRequestBody requestBody) Update the metadata element representing a api.updateAPIOperation
(String serverName, String userId, String apiOperationGUID, boolean isMergeUpdate, APIOperationRequestBody requestBody) Update the metadata element representing a API operation.updateAPIParameterList
(String serverName, String userId, String apiParameterListGUID, boolean isMergeUpdate, APIParameterListRequestBody requestBody) Update the metadata element representing an API parameter list.withdrawAPI
(String serverName, String userId, String apiGUID, NullRequestBody nullRequestBody) Update the zones for the API asset so that it is no longer visible to consumers.
-
Constructor Details
-
APIManagerRESTServices
public APIManagerRESTServices()Default constructor
-
-
Method Details
-
createAPI
public GUIDResponse createAPI(String serverName, String userId, boolean apiManagerIsHome, String endpointGUID, APIRequestBody requestBody) Create a new metadata element to represent a api.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiManagerIsHome
- should the API be marked as owned by the event broker so others can not update?endpointGUID
- unique identifier of the endpoint where this API is locatedrequestBody
- properties to store- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createAPIFromTemplate
public GUIDResponse createAPIFromTemplate(String serverName, String userId, String endpointGUID, String templateGUID, boolean apiManagerIsHome, TemplateRequestBody requestBody) Create a new metadata element to represent a API using an existing metadata element as a template.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userendpointGUID
- unique identifier of the endpoint where this API is locatedtemplateGUID
- unique identifier of the metadata element to copyapiManagerIsHome
- should the API be marked as owned by the event broker so others can not update?requestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateAPI
public VoidResponse updateAPI(String serverName, String userId, String apiGUID, boolean isMergeUpdate, APIRequestBody requestBody) Update the metadata element representing a api.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with the existing properties of overlay them?requestBody
- new properties for this element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
publishAPI
public VoidResponse publishAPI(String serverName, String userId, String apiGUID, NullRequestBody nullRequestBody) Update the zones for the API asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Data Manager OMAS).- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the metadata element to publishnullRequestBody
- empty request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
withdrawAPI
public VoidResponse withdrawAPI(String serverName, String userId, String apiGUID, NullRequestBody nullRequestBody) Update the zones for the API asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the API is first created).- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the metadata element to withdrawnullRequestBody
- empty request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeAPI
public VoidResponse removeAPI(String serverName, String userId, String apiGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an api.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findAPIs
public APIsResponse findAPIs(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIsByName
public APIsResponse getAPIsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIsForAPIManager
public APIsResponse getAPIsForAPIManager(String serverName, String userId, String apiManagerGUID, String apiManagerName, int startFrom, int pageSize) Retrieve the list of apis created by this caller.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the event brokerapiManagerName
- unique name of software server capability representing the event brokerstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIsByEndpoint
public APIsResponse getAPIsByEndpoint(String serverName, String userId, String endpointGUID, int startFrom, int pageSize) Retrieve the list of API metadata elements linked to the requested endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userendpointGUID
- endpointGUID to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIByGUID
Retrieve the API metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createAPIOperation
public GUIDResponse createAPIOperation(String serverName, String userId, String apiGUID, APIOperationRequestBody requestBody) Create a new metadata element to represent a API operation.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the topic where the schema is locatedrequestBody
- properties about the API operation- Returns:
- unique identifier of the new API operation or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createAPIOperationFromTemplate
public GUIDResponse createAPIOperationFromTemplate(String serverName, String userId, String templateGUID, String apiGUID, TemplateRequestBody requestBody) Create a new metadata element to represent an API operation using an existing metadata element as a template.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usertemplateGUID
- unique identifier of the metadata element to copyapiGUID
- unique identifier of the topic where the schema is locatedrequestBody
- properties that override the template- Returns:
- unique identifier of the new API operation or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateAPIOperation
public VoidResponse updateAPIOperation(String serverName, String userId, String apiOperationGUID, boolean isMergeUpdate, APIOperationRequestBody requestBody) Update the metadata element representing a API operation.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiOperationGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?requestBody
- new properties for the metadata element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeAPIOperation
public VoidResponse removeAPIOperation(String serverName, String userId, String apiOperationGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an API operation.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiOperationGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findAPIOperations
public APIOperationsResponse findAPIOperations(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API operation metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIOperationsForAPI
public APIOperationsResponse getAPIOperationsForAPI(String serverName, String userId, String apiGUID, int startFrom, int pageSize) Return the list of operation associated with an API.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiGUID
- unique identifier of the asset to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the schemas associated with the requested topic or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIOperationsByName
public APIOperationsResponse getAPIOperationsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API operation metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIOperationByGUID
Retrieve the API operation metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createAPIParameterList
public GUIDResponse createAPIParameterList(String serverName, String userId, String apiOperationGUID, APIParameterListType parameterListType, APIParameterListRequestBody requestBody) Create a new metadata element to represent a API parameter list.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiOperationGUID
- unique identifier of the topic where the schema is locatedparameterListType
- is this a header, request or responserequestBody
- properties about the API parameter list- Returns:
- unique identifier of the new API parameter list or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createAPIParameterListFromTemplate
public GUIDResponse createAPIParameterListFromTemplate(String serverName, String userId, String templateGUID, String apiOperationGUID, APIParameterListType parameterListType, TemplateRequestBody requestBody) Create a new metadata element to represent an API parameter list using an existing metadata element as a template.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usertemplateGUID
- unique identifier of the metadata element to copyapiOperationGUID
- unique identifier of the topic where the schema is locatedparameterListType
- is this a header, request or responserequestBody
- properties that override the template- Returns:
- unique identifier of the new API parameter list or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateAPIParameterList
public VoidResponse updateAPIParameterList(String serverName, String userId, String apiParameterListGUID, boolean isMergeUpdate, APIParameterListRequestBody requestBody) Update the metadata element representing an API parameter list.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiParameterListGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?requestBody
- new properties for the metadata element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeAPIParameterList
public VoidResponse removeAPIParameterList(String serverName, String userId, String apiParameterListGUID, String qualifiedName, MetadataSourceRequestBody requestBody) Remove the metadata element representing an API parameter list.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiParameterListGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findAPIParameterLists
public APIParameterListsResponse findAPIParameterLists(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API parameter list metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIParameterListsForOperation
public APIParameterListsResponse getAPIParameterListsForOperation(String serverName, String userId, String apiOperationGUID, int startFrom, int pageSize) Return the list of schemas associated with a topic.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userapiOperationGUID
- unique identifier of the topic to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the schemas associated with the requested topic or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIParameterListsByName
public APIParameterListsResponse getAPIParameterListsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of API parameter list metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getAPIParameterListByGUID
public APIParameterListResponse getAPIParameterListByGUID(String serverName, String userId, String guid) Retrieve the API parameter list metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-