java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.server.spring.APIManagerResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/data-manager/users/{userId}") public class APIManagerResource extends Object
APIManagerResource is the server-side implementation of the Data Manager OMAS's support for APIs. It matches the APIManagerClient.
  • Constructor Details

    • APIManagerResource

      public APIManagerResource()
      Default constructor
  • Method Details

    • createAPI

      @PostMapping(path="/apis") public GUIDResponse createAPI(@PathVariable String serverName, @PathVariable String userId, @RequestParam boolean apiManagerIsHome, @RequestBody APIRequestBody requestBody)
      Create a new metadata element to represent a api.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiManagerIsHome - should the API be marked as owned by the event broker so others can not update?
      requestBody - 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)
    • createAPI

      @PostMapping(path="/apis/for-endpoint/{endpointGUID}") public GUIDResponse createAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, @RequestParam boolean apiManagerIsHome, @RequestBody APIRequestBody requestBody)
      Create a new metadata element to represent a api.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      endpointGUID - unique identifier of the endpoint where this API is located
      apiManagerIsHome - should the API be marked as owned by the event broker so others can not update?
      requestBody - 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

      @PostMapping(path="/apis/from-template/{templateGUID}") public GUIDResponse createAPIFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, @RequestParam boolean apiManagerIsHome, @RequestBody 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 user
      templateGUID - unique identifier of the metadata element to copy
      apiManagerIsHome - 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)
    • createAPIFromTemplate

      @PostMapping(path="/apis/for-endpoint/{endpointGUID}/from-template/{templateGUID}") public GUIDResponse createAPIFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, @PathVariable String templateGUID, @RequestParam boolean apiManagerIsHome, @RequestBody 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 user
      endpointGUID - unique identifier of the endpoint where this API is located
      templateGUID - unique identifier of the metadata element to copy
      apiManagerIsHome - 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

      @PostMapping(path="/apis/{apiGUID}") public VoidResponse updateAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @RequestParam boolean isMergeUpdate, @RequestBody APIRequestBody requestBody)
      Update the metadata element representing a api.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiGUID - unique identifier of the metadata element to update
      isMergeUpdate - 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

      @PostMapping(path="/apis/{apiGUID}/publish") public VoidResponse publishAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @RequestBody(required=false) 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 user
      apiGUID - unique identifier of the metadata element to publish
      nullRequestBody - 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

      @PostMapping(path="/apis/{apiGUID}/withdraw") public VoidResponse withdrawAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @RequestBody(required=false) 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 user
      apiGUID - unique identifier of the metadata element to withdraw
      nullRequestBody - 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

      @PostMapping(path="/apis/{apiGUID}/{qualifiedName}/delete") public VoidResponse removeAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @PathVariable String qualifiedName, @RequestBody MetadataSourceRequestBody requestBody)
      Remove the metadata element representing a api.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiGUID - unique identifier of the metadata element to remove
      qualifiedName - unique endpointGUID of the metadata element to remove
      requestBody - 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

      @PostMapping(path="/apis/by-search-string") public APIsResponse findAPIs(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - 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

      @PostMapping(path="/apis/by-name") public APIsResponse getAPIsByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve the list of API metadata elements with a matching qualified or display endpointGUID. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/api-managers/{apiManagerGUID}/{apiManagerName}") public APIsResponse getAPIsForAPIManager(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiManagerGUID, @PathVariable String apiManagerName, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve the list of apis created by this caller.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiManagerGUID - unique identifier of software server capability representing the event broker
      apiManagerName - unique endpointGUID of software server capability representing the event broker
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/by-endpoint/{endpointGUID}") public APIsResponse getAPIsByEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve the list of API metadata elements that are linked to the requested endpoint.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      endpointGUID - endpointGUID to search for
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/{apiGUID}") public APIResponse getAPIByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID)
      Retrieve the API metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiGUID - 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

      @PostMapping(path="/apis/{apiGUID}/api-operations") public GUIDResponse createAPIOperation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @RequestBody 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 user
      apiGUID - unique identifier of the topic where the schema is located
      requestBody - 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

      @PostMapping(path="/apis/{apiGUID}/api-operations/from-template/{templateGUID}") public GUIDResponse createAPIOperationFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, @PathVariable String apiGUID, @RequestBody TemplateRequestBody requestBody)
      Create a new metadata element to represent a API operation using an existing metadata element as a template.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      templateGUID - unique identifier of the metadata element to copy
      apiGUID - unique identifier of the topic where the schema is located
      requestBody - 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

      @PostMapping(path="/apis/api-operations/{apiOperationGUID}") public VoidResponse updateAPIOperation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiOperationGUID, @RequestParam boolean isMergeUpdate, @RequestBody APIOperationRequestBody requestBody)
      Update the metadata element representing a API operation.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiOperationGUID - unique identifier of the metadata element to update
      isMergeUpdate - 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

      @PostMapping(path="/apis/api-operations/{apiOperationGUID}/{qualifiedName}/delete") public VoidResponse removeAPIOperation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiOperationGUID, @PathVariable String qualifiedName, @RequestBody MetadataSourceRequestBody requestBody)
      Remove the metadata element representing an API operation.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiOperationGUID - unique identifier of the metadata element to remove
      qualifiedName - unique endpointGUID of the metadata element to remove
      requestBody - 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

      @PostMapping(path="/apis/api-operations/by-search-string") public APIOperationsResponse findAPIOperations(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/{apiGUID}/api-operations") public APIOperationsResponse getAPIOperationsForAPI(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiGUID, @RequestParam int startFrom, @RequestParam int pageSize)
      Return the list of operation associated with an API.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiGUID - unique identifier of the topic to query
      startFrom - paging start point
      pageSize - 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

      @PostMapping(path="/apis/api-operations/by-name") public APIOperationsResponse getAPIOperationsByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve the list of API operation metadata elements with a matching qualified or display endpointGUID. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/api-operations/{apiOperationGUID}") public APIOperationResponse getAPIOperationByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiOperationGUID)
      Retrieve the API operation metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiOperationGUID - 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

      @PostMapping(path="/apis/api-operations/{apiOperationGUID}/api-parameter-lists/{parameterListType}") public GUIDResponse createAPIParameterList(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiOperationGUID, @PathVariable APIParameterListType parameterListType, @RequestBody 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 user
      apiOperationGUID - unique identifier of the topic where the schema is located
      parameterListType - is this a header, request or response
      requestBody - 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

      @PostMapping(path="/apis/api-operations/{apiOperationGUID}/api-parameter-lists/{parameterListType}/from-template/{templateGUID}") public GUIDResponse createAPIParameterListFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, @PathVariable String apiOperationGUID, @PathVariable APIParameterListType parameterListType, @RequestBody TemplateRequestBody requestBody)
      Create a new metadata element to represent a API parameter list using an existing metadata element as a template.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      templateGUID - unique identifier of the metadata element to copy
      apiOperationGUID - unique identifier of the topic where the schema is located
      parameterListType - is this a header, request or response
      requestBody - 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

      @PostMapping(path="/apis/api-operations/api-parameter-lists/{apiParameterListGUID}") public VoidResponse updateAPIParameterList(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiParameterListGUID, @RequestParam boolean isMergeUpdate, @RequestBody APIParameterListRequestBody requestBody)
      Update the metadata element representing a API parameter list.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiParameterListGUID - unique identifier of the metadata element to update
      isMergeUpdate - 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

      @PostMapping(path="/apis/api-operations/api-parameter-lists/{apiParameterListGUID}/{qualifiedName}/delete") public VoidResponse removeAPIParameterList(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiParameterListGUID, @PathVariable String qualifiedName, @RequestBody MetadataSourceRequestBody requestBody)
      Remove the metadata element representing a API parameter list.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiParameterListGUID - unique identifier of the metadata element to remove
      qualifiedName - unique endpointGUID of the metadata element to remove
      requestBody - 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

      @PostMapping(path="/apis/api-operations/api-parameter-lists/by-search-string") public APIParameterListsResponse findAPIParameterLists(@PathVariable String serverName, @PathVariable String userId, @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam 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 user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/api-operations/{apiOperationGUID}/api-parameter-lists") public APIParameterListsResponse getAPIParameterListsForOperation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiOperationGUID, @RequestParam int startFrom, @RequestParam int pageSize)
      Return the list of schemas associated with a topic.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      apiOperationGUID - unique identifier of the topic to query
      startFrom - paging start point
      pageSize - 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

      @PostMapping(path="/apis/api-operations/api-parameter-lists/by-name") public APIParameterListsResponse getAPIParameterListsByName(@PathVariable String serverName, @PathVariable String userId, @RequestBody NameRequestBody requestBody, @RequestParam int startFrom, @RequestParam int pageSize)
      Retrieve the list of API parameter list metadata elements with a matching qualified or display endpointGUID. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - 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

      @GetMapping(path="/apis/api-operations/api-parameter-lists/{apiParameterListGUID}") public APIParameterListResponse getAPIParameterListByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String apiParameterListGUID)
      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 user
      apiParameterListGUID - 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)