Class APIManagerClient
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
org.odpi.openmetadata.accessservices.datamanager.client.APIManagerClient
- All Implemented Interfaces:
APIManagerInterface
,SchemaManagerInterface
APIManagerClient is the client for managing APIs from an API Manager.
-
Constructor Summary
ConstructorDescriptionAPIManagerClient
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.APIManagerClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.APIManagerClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.APIManagerClient
(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.APIManagerClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptioncreateAPI
(String userId, String apiManagerGUID, String apiManagerName, boolean apiManagerIsHome, String endpointGUID, APIProperties apiProperties) Create a new metadata element to represent an API.createAPIFromTemplate
(String userId, String apiManagerGUID, String apiManagerName, boolean apiManagerIsHome, String endpointGUID, String templateGUID, TemplateProperties templateProperties) Create a new metadata element to represent an API using an existing metadata element as a template.createAPIOperation
(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, APIOperationProperties properties) Create a new metadata element to represent an API Operation.createAPIOperationFromTemplate
(String userId, String apiManagerGUID, String apiManagerName, String templateGUID, String apiGUID, TemplateProperties templateProperties) Create a new metadata element to represent an API operation using an existing metadata element as a template.createAPIParameter
(String userId, String apiManagerGUID, String apiManagerName, String schemaElementGUID, APIParameterProperties apiParameterProperties) Create a new metadata element to represent a API parameter.createAPIParameterFromTemplate
(String userId, String apiManagerGUID, String apiManagerName, String schemaElementGUID, String templateGUID, TemplateProperties templateProperties) Create a new metadata element to represent a API parameter using an existing metadata element as a template.createAPIParameterList
(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, APIParameterListType parameterListType, APIParameterListProperties properties) Create a new metadata element to represent an API Operation's Parameter list.createAPIParameterListFromTemplate
(String userId, String apiManagerGUID, String apiManagerName, String templateGUID, String apiOperationGUID, APIParameterListType parameterListType, TemplateProperties templateProperties) Create a new metadata element to represent an API Parameter List using an existing API Parameter List as a template.findAPIOperations
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of API operation metadata elements that contain the search string.findAPIParameterLists
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of API Parameter List metadata elements that contain the search string.findAPIParameters
(String userId, String searchString, String typeName, int startFrom, int pageSize) Retrieve the list of API parameter metadata elements that contain the search string.Retrieve the list of api metadata elements that contain the search string.getAPIByGUID
(String userId, String guid) Retrieve the api metadata element with the supplied unique identifier.getAPIOperationByGUID
(String userId, String guid) Retrieve the API operation metadata element with the supplied unique identifier.getAPIOperationsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of API operation metadata elements with a matching qualified or display name.getAPIParameterByGUID
(String userId, String apiParameterGUID) Retrieve the API parameter metadata element with the supplied unique identifier.getAPIParameterListByGUID
(String userId, String guid) Retrieve the API Parameter List metadata element with the supplied unique identifier.getAPIParameterListsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of API Parameter List metadata elements with a matching qualified or display name.getAPIParametersByName
(String userId, String name, String typeName, int startFrom, int pageSize) Retrieve the list of API parameter metadata elements with a matching qualified or display name.getAPIsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of api metadata elements with a matching qualified or display name.getAPIsForAPIManager
(String userId, String apiManagerGUID, String apiManagerName, int startFrom, int pageSize) Retrieve the list of apis created by this caller.getAPIsForEndpoint
(String userId, String endpointGUID, int startFrom, int pageSize) Retrieve the list of APIs connected to the requested endpoint.getNestedAPIParameters
(String userId, String parentElementGUID, int startFrom, int pageSize) Retrieve the list of API parameters associated with a parameter list or nested underneath another parameter.getOperationsForAPI
(String userId, String apiGUID, int startFrom, int pageSize) Return the list of api-operations associated with an API.getParameterListsForAPIOperation
(String userId, String apiOperationGUID, int startFrom, int pageSize) Return the list of API Parameter Lists associated with an API Operation.void
publishAPI
(String userId, String apiGUID) Update the zones for the api asset so that it becomes visible to consumers.void
removeAPI
(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, String qualifiedName) Remove the metadata element representing an API.void
removeAPIOperation
(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, String qualifiedName) Remove the metadata element representing a API operation.void
removeAPIParameter
(String userId, String apiManagerGUID, String apiManagerName, String apiParameterGUID) Remove the metadata element representing a API parameter.void
removeAPIParameterList
(String userId, String apiManagerGUID, String apiManagerName, String apiParameterListGUID, String qualifiedName) Remove an API Parameter List and all of its parameters.void
setupSchemaType
(String userId, String apiManagerGUID, String apiManagerName, String relationshipTypeName, String apiParameterGUID, String schemaTypeGUID) Connect a schema type to an API parameter.void
updateAPI
(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, boolean isMergeUpdate, APIProperties apiProperties) Update the metadata element representing an API.void
updateAPIOperation
(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, boolean isMergeUpdate, APIOperationProperties properties) Update the metadata element representing a API operation.void
updateAPIParameter
(String userId, String apiManagerGUID, String apiManagerName, String apiParameterGUID, boolean isMergeUpdate, APIParameterProperties apiParameterProperties) Update the properties of the metadata element representing an API parameter.void
updateAPIParameterList
(String userId, String apiManagerGUID, String apiManagerName, String apiParameterListGUID, boolean isMergeUpdate, APIParameterListProperties properties) Update the metadata element representing an API Parameter List.void
withdrawAPI
(String userId, String apiGUID) Update the zones for the api asset so that it is no longer visible to consumers.Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
clearCalculatedValue, clearQueryTargetRelationship, clearSchemaElementRelationship, clearSchemaTypes, createEnumSchemaType, createLiteralSchemaType, createMapSchemaType, createPrimitiveSchemaType, createSchemaAttribute, createSchemaAttributeFromTemplate, createSchemaTypeChoice, createSchemaTypeFromTemplate, createStructSchemaType, findSchemaAttributes, findSchemaType, findValidValueSet, getNestedAttributes, getSchemaAttributeByGUID, getSchemaAttributesByName, getSchemaTypeByGUID, getSchemaTypeByName, getSchemaTypeForElement, getSchemaTypeParent, getValidValueSetByName, removeSchemaAttribute, removeSchemaType, setupCalculatedValue, setupQueryTargetRelationship, setupSchemaElementRelationship, updateQueryTargetRelationship, updateSchemaAttribute, updateSchemaType
Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
removeReferenceable
-
Constructor Details
-
APIManagerClient
public APIManagerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
APIManagerClient
public APIManagerClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
APIManagerClient
public APIManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
APIManagerClient
public APIManagerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- client that issues the REST API callsmaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
APIManagerClient
public APIManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createAPI
public String createAPI(String userId, String apiManagerGUID, String apiManagerName, boolean apiManagerIsHome, String endpointGUID, APIProperties apiProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API.- Specified by:
createAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiManagerIsHome
- should the API be marked as owned by the API manager so others can not update?endpointGUID
- unique identifier of the endpoint where this API is locatedapiProperties
- properties to store- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIFromTemplate
public String createAPIFromTemplate(String userId, String apiManagerGUID, String apiManagerName, boolean apiManagerIsHome, String endpointGUID, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API using an existing metadata element as a template.- Specified by:
createAPIFromTemplate
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiManagerIsHome
- should the API be marked as owned by the API manager so others can not update?endpointGUID
- unique identifier of the endpoint where this API is locatedtemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- properties that override the template- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateAPI
public void updateAPI(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, boolean isMergeUpdate, APIProperties apiProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing an API.- Specified by:
updateAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?apiProperties
- new properties for this element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
publishAPI
public void publishAPI(String userId, String apiGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException 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).- Specified by:
publishAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiGUID
- unique identifier of the metadata element to publish- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
withdrawAPI
public void withdrawAPI(String userId, String apiGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException 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).- Specified by:
withdrawAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiGUID
- unique identifier of the metadata element to withdraw- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeAPI
public void removeAPI(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing an API.- Specified by:
removeAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findAPIs
public List<APIElement> findAPIs(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of api metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findAPIs
in interfaceAPIManagerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIsByName
public List<APIElement> getAPIsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of api metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getAPIsByName
in interfaceAPIManagerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIsForAPIManager
public List<APIElement> getAPIsForAPIManager(String userId, String apiManagerGUID, String apiManagerName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of apis created by this caller.- Specified by:
getAPIsForAPIManager
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the api managerapiManagerName
- unique name of software server capability representing the api managerstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIsForEndpoint
public List<APIElement> getAPIsForEndpoint(String userId, String endpointGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of APIs connected to the requested endpoint.- Specified by:
getAPIsForEndpoint
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userendpointGUID
- unique identifier of the endpointstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIByGUID
public APIElement getAPIByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the api metadata element with the supplied unique identifier.- Specified by:
getAPIByGUID
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIOperation
public String createAPIOperation(String userId, String apiManagerGUID, String apiManagerName, String apiGUID, APIOperationProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API Operation.- Specified by:
createAPIOperation
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiGUID
- unique identifier of the api where the API operation is locatedproperties
- properties about the API operation- Returns:
- unique identifier of the new API operation
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIOperationFromTemplate
public String createAPIOperationFromTemplate(String userId, String apiManagerGUID, String apiManagerName, String templateGUID, String apiGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API operation using an existing metadata element as a template.- Specified by:
createAPIOperationFromTemplate
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managertemplateGUID
- unique identifier of the metadata element to copyapiGUID
- unique identifier of the api where the API operation is locatedtemplateProperties
- properties that override the template- Returns:
- unique identifier of the new API operation
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateAPIOperation
public void updateAPIOperation(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, boolean isMergeUpdate, APIOperationProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a API operation.- Specified by:
updateAPIOperation
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiOperationGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?properties
- new properties for the metadata element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeAPIOperation
public void removeAPIOperation(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a API operation.- Specified by:
removeAPIOperation
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the API managerapiManagerName
- unique name of software server capability representing the API managerapiOperationGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findAPIOperations
public List<APIOperationElement> findAPIOperations(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API operation metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findAPIOperations
in interfaceAPIManagerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getOperationsForAPI
public List<APIOperationElement> getOperationsForAPI(String userId, String apiGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of api-operations associated with an API.- Specified by:
getOperationsForAPI
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiGUID
- unique identifier of the api to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the api-operations associated with the requested api
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIOperationsByName
public List<APIOperationElement> getAPIOperationsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API operation metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getAPIOperationsByName
in interfaceAPIManagerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIOperationByGUID
public APIOperationElement getAPIOperationByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the API operation metadata element with the supplied unique identifier.- Specified by:
getAPIOperationByGUID
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIParameterList
public String createAPIParameterList(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, APIParameterListType parameterListType, APIParameterListProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API Operation's Parameter list. This describes the structure of the payload supported by the API's operation. The structure of this API Operation is added using API Parameter schema attributes. These parameters can have a simple type or a nested structure.- Specified by:
createAPIParameterList
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerapiOperationGUID
- unique identifier of an APIOperationparameterListType
- is this a header, request or responseproperties
- properties about the API parameter list- Returns:
- unique identifier of the new API parameter list
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIParameterListFromTemplate
public String createAPIParameterListFromTemplate(String userId, String apiManagerGUID, String apiManagerName, String templateGUID, String apiOperationGUID, APIParameterListType parameterListType, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent an API Parameter List using an existing API Parameter List as a template.- Specified by:
createAPIParameterListFromTemplate
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callertemplateGUID
- unique identifier of the metadata element to copyapiOperationGUID
- unique identifier of the API Operation where the API Parameter List is locatedparameterListType
- is this a header, request or responsetemplateProperties
- properties that override the template- Returns:
- unique identifier of the new API Parameter List
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateAPIParameterList
public void updateAPIParameterList(String userId, String apiManagerGUID, String apiManagerName, String apiParameterListGUID, boolean isMergeUpdate, APIParameterListProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing an API Parameter List.- Specified by:
updateAPIParameterList
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerapiParameterListGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?properties
- new properties for the metadata element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeAPIParameterList
public void removeAPIParameterList(String userId, String apiManagerGUID, String apiManagerName, String apiParameterListGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove an API Parameter List and all of its parameters.- Specified by:
removeAPIParameterList
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerapiParameterListGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findAPIParameterLists
public List<APIParameterListElement> findAPIParameterLists(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API Parameter List metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findAPIParameterLists
in interfaceAPIManagerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getParameterListsForAPIOperation
public List<APIParameterListElement> getParameterListsForAPIOperation(String userId, String apiOperationGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of API Parameter Lists associated with an API Operation.- Specified by:
getParameterListsForAPIOperation
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userapiOperationGUID
- unique identifier of the API Operation to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the API Parameter Lists associated with the requested API Operation
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIParameterListsByName
public List<APIParameterListElement> getAPIParameterListsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API Parameter List metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getAPIParameterListsByName
in interfaceAPIManagerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIParameterListByGUID
public APIParameterListElement getAPIParameterListByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the API Parameter List metadata element with the supplied unique identifier.- Specified by:
getAPIParameterListByGUID
in interfaceAPIManagerInterface
- Parameters:
userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIParameter
public String createAPIParameter(String userId, String apiManagerGUID, String apiManagerName, String schemaElementGUID, APIParameterProperties apiParameterProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a API parameter.- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerschemaElementGUID
- unique identifier of the schemaType or Schema Attribute where the API parameter is nested underneathapiParameterProperties
- properties for the API parameter- Returns:
- unique identifier of the new metadata element for the API parameter
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createAPIParameterFromTemplate
public String createAPIParameterFromTemplate(String userId, String apiManagerGUID, String apiManagerName, String schemaElementGUID, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a API parameter using an existing metadata element as a template.- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerschemaElementGUID
- unique identifier of the schemaType or Schema Attribute where the API parameter is connected totemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- properties that override the template- Returns:
- unique identifier of the new metadata element for the API parameter
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupSchemaType
public void setupSchemaType(String userId, String apiManagerGUID, String apiManagerName, String relationshipTypeName, String apiParameterGUID, String schemaTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Connect a schema type to an API parameter.- Specified by:
setupSchemaType
in interfaceSchemaManagerInterface
- Overrides:
setupSchemaType
in classSchemaManagerClient
- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerrelationshipTypeName
- name of relationship to createapiParameterGUID
- unique identifier of the API parameterschemaTypeGUID
- unique identifier of the schema type to connect- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateAPIParameter
public void updateAPIParameter(String userId, String apiManagerGUID, String apiManagerName, String apiParameterGUID, boolean isMergeUpdate, APIParameterProperties apiParameterProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of the metadata element representing an API parameter.- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerapiParameterGUID
- unique identifier of the API parameter to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?apiParameterProperties
- new properties for the API parameter- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeAPIParameter
public void removeAPIParameter(String userId, String apiManagerGUID, String apiManagerName, String apiParameterGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a API parameter.- Parameters:
userId
- calling userapiManagerGUID
- unique identifier of software server capability representing the callerapiManagerName
- unique name of software server capability representing the callerapiParameterGUID
- unique identifier of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findAPIParameters
public List<APIParameterElement> findAPIParameters(String userId, String searchString, String typeName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API parameter metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiestypeName
- optional type name for the API parameter - used to restrict the search resultsstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNestedAPIParameters
public List<APIParameterElement> getNestedAPIParameters(String userId, String parentElementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API parameters associated with a parameter list or nested underneath another parameter.- Parameters:
userId
- calling userparentElementGUID
- unique identifier of the element of intereststartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIParametersByName
public List<APIParameterElement> getAPIParametersByName(String userId, String name, String typeName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of API parameter metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
userId
- calling username
- name to search fortypeName
- optional type name for the schema type - used to restrict the search resultsstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAPIParameterByGUID
public APIParameterElement getAPIParameterByGUID(String userId, String apiParameterGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the API parameter metadata element with the supplied unique identifier.- Parameters:
userId
- calling userapiParameterGUID
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-