Skip to main content
Glama
get-opening.ts1.21 kB
import { createAction, Property } from '@activepieces/pieces-framework'; import { httpClient, HttpMethod } from '@activepieces/pieces-common'; import { fountainAuth } from '../../'; import { getAuthHeaders, getApiUrl } from '../common/auth'; import { getFunnelsDropdown } from '../common/dropdowns'; export const fountainGetOpening = createAction({ name: 'get_opening', auth: fountainAuth, displayName: 'Get Opening', description: 'Get details for a specific job opening', props: { id: Property.Dropdown({ displayName: 'Opening', description: 'The opening to retrieve details for', required: true, refreshers: [], auth: fountainAuth, options: async ({ auth }) => { if (!auth) return { disabled: true, options: [], placeholder: 'Connect account first' }; return { disabled: false, options: await getFunnelsDropdown(auth) }; }, }), }, async run(context) { const openingId = context.propsValue.id; const response = await httpClient.sendRequest({ method: HttpMethod.GET, url: getApiUrl(context.auth, `/funnels/${openingId}`), headers: getAuthHeaders(context.auth), }); return response.body; }, });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server