Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Create a Rest Handler to add GET method for the detector #213

Closed
owaiskazi19 opened this issue Nov 1, 2022 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@owaiskazi19
Copy link
Member

owaiskazi19 commented Nov 1, 2022

Is your feature request related to a problem?

Similar to the Rest Handler created for Create Detector or Hello World Extension, create an action implementing ExtensionRestHandler with routes for the get detector API calls handled by appropriate methods with placeholder code:

GET detectors/{detectorId}
GET detectors/{detectorId}?job=true

Java code:

private ExtensionRestResponse handleGetRequest(ExtensionRestRequest request) {
    // do things with request
    return new ExtensionRestResponse(request, OK, "placeholder");
}}

Create a GET Rest handler for get detector similar to this. The business logic will be later done in #214

@mloufra
Copy link
Contributor

mloufra commented Nov 11, 2022

  • Create RestGetDetectorAction.java placed in AnomalyDetector repository feature/extensions branch
  • Add Route method
  • Add handleGetRequest method
  • Add Get action to the list of Rest Handlers in the AnomalyDetectorExtension.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants