import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
elastic_cloud: {
type: "app",
app: "elastic_cloud",
}
},
async run({steps, $}) {
//gets cluster info
//see: https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-info
return await axios($, {
url: `${this.elastic_cloud.$auth.api_url}`,
headers: {
"authorization": `ApiKey ${this.elastic_cloud.$auth.api_key}`,
},
})
},
})
Elastic Cloud uses API keys for authentication. When you connect your Elastic Cloud account, Pipedream securely stores the keys so you can easily authenticate to Elastic Cloud APIs in both code and no-code steps.
To get your Elasticsearch URL and API Key, sign in to Elastic Cloud and go to your dashboard and then: