@@ -24,10 +24,15 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
2424 const ELASTIC_WEBSITE_URL = meta . elasticWebsiteUrl ;
2525 const ELASTIC_GITHUB = meta . elasticGithubUrl ;
2626 const SEARCH_LABS_URL = meta . searchLabsUrl ;
27+ const API_DOCS = meta . apiDocsUrl ;
2728 const ELASTIC_DOCS = meta . docsWebsiteUrl ;
2829
2930 const ELASTICSEARCH_DOCS = `${ ELASTIC_WEBSITE_URL } guide/en/elasticsearch/reference/${ DOC_LINK_VERSION } /` ;
31+ const ELASTICSEARCH_APIS = `${ API_DOCS } doc/elasticsearch/v9/` ;
32+ const ELASTICSEARCH_SERVERLESS_APIS = `${ API_DOCS } doc/elasticsearch-serverless/` ;
3033 const KIBANA_DOCS = `${ ELASTIC_WEBSITE_URL } guide/en/kibana/${ DOC_LINK_VERSION } /` ;
34+ const KIBANA_APIS = `${ API_DOCS } doc/kibana/v9/` ;
35+ const KIBANA_SERVERLESS_APIS = `{$API_DOCS}doc/serverless/` ;
3136 const FLEET_DOCS = `${ ELASTIC_WEBSITE_URL } guide/en/fleet/${ DOC_LINK_VERSION } /` ;
3237 const INTEGRATIONS_DEV_DOCS = `${ ELASTIC_WEBSITE_URL } guide/en/integrations-developer/current/` ;
3338 const PLUGIN_DOCS = `${ ELASTIC_WEBSITE_URL } guide/en/elasticsearch/plugins/${ DOC_LINK_VERSION } /` ;
@@ -46,7 +51,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
4651 elasticStackGetStarted : isServerless
4752 ? `${ ELASTIC_DOCS } deploy-manage/deploy/elastic-cloud/serverless`
4853 : `${ ELASTIC_DOCS } get-started` ,
49- apiReference : `${ ELASTIC_DOCS } apis ` ,
54+ apiReference : `${ API_DOCS } ` ,
5055 upgrade : {
5156 upgradingStackOnPrem : `${ ELASTIC_WEBSITE_URL } guide/en/elastic-stack/current/upgrading-elastic-stack-on-prem.html` ,
5257 upgradingStackOnCloud : `${ ELASTIC_WEBSITE_URL } guide/en/elastic-stack/current/upgrade-elastic-stack-for-elastic-cloud.html` ,
@@ -128,7 +133,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
128133 behavioralAnalyticsCORS : `${ ELASTICSEARCH_DOCS } behavioral-analytics-cors.html` ,
129134 behavioralAnalyticsEvents : `${ ELASTICSEARCH_DOCS } behavioral-analytics-event.html` ,
130135 buildConnector : `${ ELASTICSEARCH_DOCS } es-build-connector.html` ,
131- bulkApi : `${ ELASTICSEARCH_DOCS } docs-bulk.html` ,
136+ bulkApi : isServerless
137+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-bulk`
138+ : `${ ELASTICSEARCH_APIS } operation/operation-bulk` ,
132139 configuration : `${ ENTERPRISE_SEARCH_DOCS } configuration.html` ,
133140 connectors : `${ ELASTICSEARCH_DOCS } es-connectors.html` ,
134141 connectorsClientDeploy : `${ ELASTICSEARCH_DOCS } es-build-connector.html#es-connectors-deploy-connector-service` ,
@@ -171,9 +178,13 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
171178 e5Model : `${ MACHINE_LEARNING_DOCS } ml-nlp-e5.html` ,
172179 elser : `${ ELASTICSEARCH_DOCS } semantic-search-semantic-text.html` ,
173180 engines : `${ ENTERPRISE_SEARCH_DOCS } engines.html` ,
174- indexApi : `${ ELASTICSEARCH_DOCS } docs-index_.html` ,
175- inferenceApiCreate : `${ ELASTICSEARCH_DOCS } put-inference-api.html` ,
176- inferenceApisConfigureChunking : `${ ELASTICSEARCH_DOCS } inference-apis.html#infer-chunking-config` ,
181+ indexApi : isServerless
182+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-create`
183+ : `${ ELASTICSEARCH_APIS } operation/operation-create` ,
184+ inferenceApiCreate : isServerless
185+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-inference-put`
186+ : `${ ELASTICSEARCH_APIS } operation/operation-inference-put` ,
187+ inferenceApisConfigureChunking : `${ ELASTIC_DOCS } explore-analyze/elastic-inference/inference-api#infer-chunking-config` ,
177188 ingestionApis : `${ ELASTICSEARCH_DOCS } search-with-elasticsearch.html` ,
178189 ingestPipelines : `${ ELASTICSEARCH_DOCS } ingest-pipeline-search.html` ,
179190 knnSearch : `${ ELASTICSEARCH_DOCS } knn-search.html` ,
@@ -294,15 +305,15 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
294305 autocompleteSuggestions : `${ KIBANA_DOCS } kibana-concepts-analysts.html#autocomplete-suggestions` ,
295306 secureSavedObject : `${ KIBANA_DOCS } xpack-security-secure-saved-objects.html` ,
296307 xpackSecurity : `${ KIBANA_DOCS } xpack-security.html` ,
297- restApis : `${ KIBANA_DOCS } api.html ` ,
308+ restApis : isServerless ? `${ KIBANA_SERVERLESS_APIS } ` : ` ${ KIBANA_APIS } `,
298309 dashboardImportExport : `${ KIBANA_DOCS } dashboard-api.html` ,
299310 upgradeNotes : `${ KIBANA_DOCS } breaking-changes-summary.html` ,
300311 } ,
301312 upgradeAssistant : {
302313 overview : `${ KIBANA_DOCS } upgrade-assistant.html` ,
303314 batchReindex : `${ KIBANA_DOCS } batch-start-resume-reindex.html` ,
304315 remoteReindex : `${ ELASTICSEARCH_DOCS } docs-reindex.html#reindex-from-remote` ,
305- unfreezeApi : `${ ELASTICSEARCH_DOCS } unfreeze-index-api. html` ,
316+ unfreezeApi : `https://www.elastic.co/guide/en/elastic-stack/9.0/release-notes-elasticsearch-9.0.0. html#remove_unfreeze_rest_endpoint ` ,
306317 reindexWithPipeline : `${ ELASTICSEARCH_DOCS } docs-reindex.html#reindex-with-an-ingest-pipeline` ,
307318 } ,
308319 rollupJobs : `${ KIBANA_DOCS } data-rollups.html` ,
@@ -495,7 +506,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
495506 visualizationSettings : `${ KIBANA_DOCS } advanced-options.html#kibana-visualization-settings` ,
496507 timelionSettings : `${ KIBANA_DOCS } advanced-options.html#kibana-timelion-settings` ,
497508 generalSettings : `${ KIBANA_DOCS } advanced-options.html#kibana-general-settings` ,
498- savedObjectsApiList : `${ KIBANA_DOCS } saved-objects-api.html#saved-objects-api` ,
509+ savedObjectsApiList : isServerless
510+ ? `${ KIBANA_SERVERLESS_APIS } group/endpoint-saved-objects`
511+ : `${ KIBANA_APIS } group/endpoint-saved-objects` ,
499512 apiKeys : `${ KIBANA_DOCS } api-keys.html` ,
500513 } ,
501514 ml : {
@@ -686,41 +699,78 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
686699 skippingDisconnectedClusters : `${ ELASTICSEARCH_DOCS } modules-cross-cluster-search.html#skip-unavailable-clusters` ,
687700 } ,
688701 apis : {
689- bulkIndexAlias : `${ ELASTICSEARCH_DOCS } indices-aliases.html` ,
690- indexStats : `${ ELASTICSEARCH_DOCS } indices-stats.html` ,
691- byteSizeUnits : `${ ELASTICSEARCH_DOCS } api-conventions.html#byte-units` ,
692- createAutoFollowPattern : `${ ELASTICSEARCH_DOCS } ccr-put-auto-follow-pattern.html` ,
693- createFollower : `${ ELASTICSEARCH_DOCS } ccr-put-follow.html` ,
694- createIndex : `${ ELASTICSEARCH_DOCS } indices-create-index.html` ,
695- createSnapshotLifecyclePolicy : `${ ELASTICSEARCH_DOCS } slm-api-put-policy.html` ,
696- createRoleMapping : `${ ELASTICSEARCH_DOCS } security-api-put-role-mapping.html` ,
697- createRoleMappingTemplates : `${ ELASTICSEARCH_DOCS } security-api-put-role-mapping.html#_role_templates` ,
698- createRollupJobsRequest : `${ ELASTICSEARCH_DOCS } rollup-put-job.html#rollup-put-job-api-request-body` ,
699- createApiKey : `${ ELASTICSEARCH_DOCS } security-api-create-api-key.html` ,
700- createPipeline : `${ ELASTICSEARCH_DOCS } put-pipeline-api.html` ,
701- createTransformRequest : `${ ELASTICSEARCH_DOCS } put-transform.html#put-transform-request-body` ,
702- cronExpressions : `${ ELASTICSEARCH_DOCS } cron-expressions.html` ,
703- executeWatchActionModes : `${ ELASTICSEARCH_DOCS } watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode` ,
704- indexExists : `${ ELASTICSEARCH_DOCS } indices-exists.html` ,
705- inferTrainedModel : `${ ELASTICSEARCH_DOCS } infer-trained-model.html` ,
706- multiSearch : `${ ELASTICSEARCH_DOCS } search-multi-search.html` ,
707- openIndex : `${ ELASTICSEARCH_DOCS } indices-open-close.html` ,
708- putComponentTemplate : `${ ELASTICSEARCH_DOCS } indices-component-template.html` ,
709- painlessExecute : `${ ELASTIC_WEBSITE_URL } guide/en/elasticsearch/painless/${ DOC_LINK_VERSION } /painless-execute-api.html` ,
710- painlessExecuteAPIContexts : `${ ELASTIC_WEBSITE_URL } guide/en/elasticsearch/painless/${ DOC_LINK_VERSION } /painless-execute-api.html#_contexts` ,
711- putComponentTemplateMetadata : `${ ELASTICSEARCH_DOCS } indices-component-template.html#component-templates-metadata` ,
712- putEnrichPolicy : `${ ELASTICSEARCH_DOCS } put-enrich-policy-api.html` ,
713- putIndexTemplateV1 : `${ ELASTICSEARCH_DOCS } indices-templates-v1.html` ,
714- putSnapshotLifecyclePolicy : `${ ELASTICSEARCH_DOCS } slm-api-put-policy.html` ,
715- putWatch : `${ ELASTICSEARCH_DOCS } watcher-api-put-watch.html` ,
716- restApis : `${ ELASTICSEARCH_DOCS } rest-apis.html` ,
717- searchPreference : `${ ELASTICSEARCH_DOCS } search-search.html#search-preference` ,
718- securityApis : `${ ELASTICSEARCH_DOCS } security-api.html` ,
719- simulatePipeline : `${ ELASTICSEARCH_DOCS } simulate-pipeline-api.html` ,
720- tasks : `${ ELASTICSEARCH_DOCS } tasks.html` ,
721- timeUnits : `${ ELASTICSEARCH_DOCS } api-conventions.html#time-units` ,
722- unfreezeIndex : `${ ELASTICSEARCH_DOCS } unfreeze-index-api.html` ,
723- updateTransform : `${ ELASTICSEARCH_DOCS } update-transform.html` ,
702+ bulkIndexAlias : isServerless
703+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-indices-update-aliases`
704+ : `${ ELASTICSEARCH_APIS } operation/operation-indices-update-aliases` ,
705+ indexStats : isServerless
706+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-indices-update-aliases`
707+ : `${ ELASTICSEARCH_APIS } operation/operation-indices-stats` ,
708+ byteSizeUnits : `${ ELASTIC_DOCS } reference/elasticsearch/rest-apis/api-conventions#byte-units` ,
709+ createAutoFollowPattern : `${ ELASTICSEARCH_APIS } operation/operation-ccr-put-auto-follow-pattern` ,
710+ createFollower : `${ ELASTICSEARCH_APIS } operation/operation-ccr-follow` ,
711+ createIndex : isServerless
712+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-indices-create`
713+ : `${ ELASTICSEARCH_APIS } operation/operation-indices-create` ,
714+ createSnapshotLifecyclePolicy : `${ ELASTICSEARCH_APIS } operation/operation-slm-put-lifecycle` ,
715+ createRoleMapping : `${ ELASTICSEARCH_APIS } operation/operation-security-put-role-mapping` ,
716+ createRoleMappingTemplates : `${ ELASTICSEARCH_APIS } operation/operation-security-put-role-mapping` ,
717+ createRollupJobsRequest : `${ ELASTICSEARCH_APIS } operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json` ,
718+ createApiKey : isServerless
719+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-security-create-api-key`
720+ : `${ ELASTICSEARCH_APIS } operation/operation-security-create-api-key` ,
721+ createPipeline : isServerless
722+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-ingest-put-pipeline`
723+ : `${ ELASTICSEARCH_APIS } operation/operation-ingest-put-pipeline` ,
724+ createTransformRequest : isServerless
725+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-transform-put-transform`
726+ : `${ ELASTICSEARCH_APIS } operation/operation-transform-put-transform` ,
727+ cronExpressions : `${ ELASTIC_DOCS } reference/elasticsearch/rest-apis/api-conventions#api-cron-expressions` ,
728+ executeWatchActionModes : `${ ELASTICSEARCH_APIS } operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json` ,
729+ indexExists : isServerless
730+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-indices-exists`
731+ : `${ ELASTICSEARCH_APIS } operation/operation-indices-exists` ,
732+ inferTrainedModel : isServerless
733+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-ml-infer-trained-model`
734+ : `${ ELASTICSEARCH_APIS } operation/operation-ml-infer-trained-model` ,
735+ multiSearch : isServerless
736+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-msearch`
737+ : `${ ELASTICSEARCH_APIS } operation/operation-msearch` ,
738+ openIndex : `${ ELASTICSEARCH_APIS } operation/operation-indices-open` ,
739+ putComponentTemplate : isServerless
740+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-cluster-put-component-template`
741+ : `${ ELASTICSEARCH_APIS } operation/operation-cluster-put-component-template` ,
742+ painlessExecute : isServerless
743+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-scripts-painless-execute`
744+ : `${ ELASTICSEARCH_APIS } operation/operation-scripts-painless-execute` ,
745+ painlessExecuteAPIContexts : isServerless
746+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`
747+ : `${ ELASTICSEARCH_APIS } operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json` ,
748+ putComponentTemplateMetadata : isServerless
749+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`
750+ : `${ ELASTICSEARCH_APIS } operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta` ,
751+ putEnrichPolicy : isServerless
752+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-enrich-put-policy`
753+ : `${ ELASTICSEARCH_APIS } operation/operation-enrich-put-policy` ,
754+ putIndexTemplateV1 : `${ ELASTICSEARCH_APIS } operation/operation-indices-put-template` ,
755+ putSnapshotLifecyclePolicy : `${ ELASTICSEARCH_APIS } operation/operation-slm-put-lifecycle` ,
756+ putWatch : `${ ELASTICSEARCH_APIS } operation/operation-watcher-put-watch` ,
757+ restApis : isServerless ? `${ ELASTICSEARCH_SERVERLESS_APIS } ` : `${ ELASTICSEARCH_APIS } ` ,
758+ searchPreference : isServerless
759+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-search#operation-search-preference`
760+ : `${ ELASTICSEARCH_APIS } operation/operation-search#operation-search-preference` ,
761+ securityApis : isServerless
762+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } group/endpoint-security`
763+ : `${ ELASTICSEARCH_APIS } group/endpoint-security` ,
764+ simulatePipeline : isServerless
765+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-ingest-simulate`
766+ : `${ ELASTICSEARCH_APIS } operation/operation-ingest-simulate` ,
767+ tasks : isServerless
768+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } group/endpoint-tasks`
769+ : `${ ELASTICSEARCH_APIS } group/endpoint-tasks` ,
770+ timeUnits : `${ ELASTIC_DOCS } reference/elasticsearch/rest-apis/api-conventions#time-units` ,
771+ updateTransform : isServerless
772+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-transform-update-transform`
773+ : `${ ELASTICSEARCH_APIS } operation/operation-transform-update-transform` ,
724774 } ,
725775 plugins : {
726776 azureRepo : `${ ELASTICSEARCH_DOCS } repository-azure.html` ,
@@ -735,14 +785,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
735785 guide : `${ ELASTICSEARCH_DOCS } snapshot-restore.html` ,
736786 changeIndexSettings : `${ ELASTICSEARCH_DOCS } index-modules.html` ,
737787 createSnapshot : `${ ELASTICSEARCH_DOCS } snapshots-take-snapshot.html` ,
738- getSnapshot : `${ ELASTICSEARCH_DOCS } get -snapshot-api.html ` ,
788+ getSnapshot : `${ ELASTICSEARCH_APIS } operation/operation -snapshot-get ` ,
739789 registerSharedFileSystem : `${ ELASTICSEARCH_DOCS } snapshots-filesystem-repository.html#filesystem-repository-settings` ,
740790 registerSourceOnly : `${ ELASTICSEARCH_DOCS } snapshots-source-only-repository.html#source-only-repository-settings` ,
741791 registerUrl : `${ ELASTICSEARCH_DOCS } snapshots-read-only-repository.html#read-only-url-repository-settings` ,
742792 restoreSnapshot : `${ ELASTICSEARCH_DOCS } snapshots-restore-snapshot.html` ,
743- restoreSnapshotApi : `${ ELASTICSEARCH_DOCS } restore -snapshot-api.html# restore-snapshot-api-request-body ` ,
793+ restoreSnapshotApi : `${ ELASTICSEARCH_APIS } operation/operation -snapshot-restore` ,
744794 searchableSnapshotSharedCache : `${ ELASTICSEARCH_DOCS } searchable-snapshots.html#searchable-snapshots-shared-cache` ,
745- slmStart : `${ ELASTICSEARCH_DOCS } slm-api- start.html ` ,
795+ slmStart : `${ ELASTICSEARCH_APIS } operation/operation- slm-start` ,
746796 } ,
747797 ingest : {
748798 append : `${ ELASTICSEARCH_DOCS } append-processor.html` ,
@@ -954,7 +1004,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
9541004 hiddenFields : `${ KIBANA_DOCS } playground-query.html#playground-hidden-fields` ,
9551005 } ,
9561006 inferenceManagement : {
957- inferenceAPIDocumentation : `${ ELASTIC_WEBSITE_URL } docs/api/doc/elasticsearch/operation/operation-inference-put` ,
1007+ inferenceAPIDocumentation : isServerless
1008+ ? `${ ELASTICSEARCH_SERVERLESS_APIS } operation/operation-inference-put`
1009+ : `${ ELASTICSEARCH_APIS } operation/operation-inference-put` ,
9581010 } ,
9591011 synonyms : {
9601012 synonymsAPIDocumentation : `${ ELASTIC_WEBSITE_URL } guide/en/elasticsearch/reference/current/synonyms-apis.html` ,
0 commit comments