diff --git a/src/plugins/saved_objects_management/common/types/v1.ts b/src/plugins/saved_objects_management/common/types/v1.ts index 78bd4a50c036e..241188d035a6e 100644 --- a/src/plugins/saved_objects_management/common/types/v1.ts +++ b/src/plugins/saved_objects_management/common/types/v1.ts @@ -129,13 +129,6 @@ export interface FindQueryHTTP { sortOrder?: FindSortOrderHTTP; hasReference?: ReferenceHTTP | ReferenceHTTP[]; hasReferenceOperator?: FindSearchOperatorHTTP; - /** - * It is not clear who might be using this API option, the SOM UI only ever passes in "id" here. - * - * TODO: Determine use. If not in use we should remove this option. If in use we must deprecate and eventually - * remove. - */ - fields?: string | string[]; } export interface FindResponseHTTP { diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx index 264823dd8e991..48d428a9f087f 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx @@ -236,7 +236,6 @@ export class SavedObjectsTable extends Component typeRegistry.isImportableAndExportable(type) @@ -90,9 +86,6 @@ export const registerFindRoute = ( saved_objects: savedObjects.map((so) => { const obj = injectMetaAttributes(so, managementService); const result = { ...obj, attributes: {} as Record }; - for (const field of includedFields) { - result.attributes[field] = (obj.attributes as Record)[field]; - } return result; }), total: findResponse.total, diff --git a/test/api_integration/apis/saved_objects_management/find.ts b/test/api_integration/apis/saved_objects_management/find.ts index ca891986f609a..ca78702925d5c 100644 --- a/test/api_integration/apis/saved_objects_management/find.ts +++ b/test/api_integration/apis/saved_objects_management/find.ts @@ -37,7 +37,7 @@ export default function ({ getService }: FtrProviderContext) { it('should return 200 with individual responses', async () => await supertest - .get('/api/kibana/management/saved_objects/_find?type=visualization&fields=title') + .get('/api/kibana/management/saved_objects/_find?type=visualization') .expect(200) .then((resp: Response) => { expect(resp.body.saved_objects.map((so: { id: string }) => so.id)).to.eql([ diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts index 5a31da2b57a8e..c73edfc106668 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts @@ -27,7 +27,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { it('returns empty response for importableAndExportable types', async () => await supertest - .get('/api/saved_objects/_find?type=test-hidden-importable-exportable&fields=title') + .get('/api/saved_objects/_find?type=test-hidden-importable-exportable') .set('kbn-xsrf', 'true') .expect(200) .then((resp) => { @@ -41,7 +41,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { it('returns empty response for non importableAndExportable types', async () => await supertest - .get('/api/saved_objects/_find?type=test-hidden-non-importable-exportable&fields=title') + .get('/api/saved_objects/_find?type=test-hidden-non-importable-exportable') .set('kbn-xsrf', 'true') .expect(200) .then((resp) => { diff --git a/test/plugin_functional/test_suites/saved_objects_management/find.ts b/test/plugin_functional/test_suites/saved_objects_management/find.ts index fdeb2c6f8b124..6492f7439079b 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/find.ts @@ -27,9 +27,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { ); it('returns saved objects with importableAndExportable types', async () => await supertest - .get( - '/api/kibana/management/saved_objects/_find?type=test-hidden-importable-exportable&fields=title' - ) + .get('/api/kibana/management/saved_objects/_find?type=test-hidden-importable-exportable') .set('kbn-xsrf', 'true') .expect(200) .then((resp) => { diff --git a/test/plugin_functional/test_suites/saved_objects_management/hidden_from_http_apis.ts b/test/plugin_functional/test_suites/saved_objects_management/hidden_from_http_apis.ts index ce441d9d1b353..d9516ee0331c4 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/hidden_from_http_apis.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/hidden_from_http_apis.ts @@ -107,9 +107,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { describe('find', () => { it('returns saved objects registered as hidden from the http Apis', async () => { await supertest - .get( - `/api/kibana/management/saved_objects/_find?type=${hiddenFromHttpApisType.type}&fields=title` - ) + .get(`/api/kibana/management/saved_objects/_find?type=${hiddenFromHttpApisType.type}`) .set('kbn-xsrf', 'true') .expect(200) .then((resp) => {