-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] New Platform server shim: update results service routes to use new platform router #56886
[ML] New Platform server shim: update results service routes to use new platform router #56886
Conversation
Pinging @elastic/ml-ui (:ml) |
0e2d2c8
to
ddb9d9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor text edits for the API docs. You also need to add the apiGroup and apiNames to the apidoc.json
file to ensure they get added to the docs.
* | ||
* @api {post} /api/ml/results/max_anomaly_score Returns the maximum anomaly_score | ||
* @apiName GetMaxAnomalyScore | ||
* @apiDescription Returns the maximum anomaly_score for result_type:bucket over jobIds for the interval passed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit to Returns the maximum anomaly score of the bucket results for the request job ID(s) and time range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 0574d51
/** | ||
* @apiGroup ResultsService | ||
* | ||
* @api {post} /api/ml/results/category_examples Returns the maximum anomaly_score |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy / paste error - should be Returns category examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 0574d51
* | ||
* @api {post} /api/ml/results/category_examples Returns the maximum anomaly_score | ||
* @apiName GetCategoryExamples | ||
* @apiDescription Returns the categorization examples for the categories with the specified IDs from the given index and job ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit to Returns examples for the categories with the specified IDs from the job with the supplied ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 0574d51
/** | ||
* @apiGroup ResultsService | ||
* | ||
* @api {post} /api/ml/results/partition_fields_values Returns partition fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit to Returns partition fields values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 0574d51
* | ||
* @api {post} /api/ml/results/partition_fields_values Returns partition fields | ||
* @apiName GetPartitionFieldsValues | ||
* @apiDescription Returns the record of partition fields with possible values that fit the provided queries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the partition fields with values that match the provided criteria for the specified job ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 0574d51
{ | ||
path: '/api/ml/results/anomalies_table_data', | ||
validate: { | ||
body: schema.object({ ...anomaliesTableDataSchema }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need a shallow copy here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and all the other places with validate schemas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this pattern initially when I was looking for examples 🤔 Though you're right, we don't really need it. Happy to change these if it makes sense. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ddb9d9f
to
20d3ea8
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest edits LGTM
…ew platform router (elastic#56886) * migrate resultsService routes to NP. begin conversion of model file to TS * add schema validation to routes * add types to results service model file * add docs for routes * update route description and add routes to doc json file
…b.com:jloleysens/kibana into console/feature/text-objects-in-saved-objects * 'console/feature/text-objects-in-saved-objects' of github.com:jloleysens/kibana: (103 commits) fix auto closing new vis modal when navigating to lens or when navigating away with browser history (elastic#56998) TS of esKuery\node_types (elastic#56857) Kibana app migration: Move static code dependencies into kibana_legacy plugin, part 1 (elastic#56408) Retry ES API calls that fail with 410/Gone (elastic#56950) [APM] Show missing permissions message to the user on the Services overview (elastic#56374) Fixing flaky CI tests for custom appRoutes (elastic#55763) [State Management][Docs] State syncing utils docs (elastic#56479) [Index management] Remove index mapper setting in tests (elastic#57066) Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types (elastic#56466) [SIEM] update url state between page if date is relative (elastic#56813) fix for chart_types test (elastic#57056) chore(NA): remove compress from dll minimizer (elastic#57023) [File upload] Migrate routing to NP & add route validation (elastic#52313) Adding docs for grouped nav advanced setting (elastic#57013) Use i18n titles for field formatters, human names for numeral locales (elastic#56348) [Maps] Remove EMS catalogue url from docs (elastic#57020) [Endpoint] ERT-82 ERT-83 ERT-84: Alert list API with pagination (elastic#56538) [DOCS] Adds Apple notarization info to install doc (elastic#57042) [ML] New Platform server shim: update results service routes to use new platform router (elastic#56886) Fix typo on detection engine rule (elastic#56993) ...
Summary
Related meta issue: #49743
Validation audit: https://github.com/elastic/kibana-team/issues/167
Updates all
results_service
routes to use new platform router.Updates
results_service
model tots
file. It should still be able to be used by legacy code still usingcallWithRequest
Checklist
Delete any items that are not applicable to this PR.