Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

FunctionApi

OCP App SDK / FunctionApi

FunctionApi

Provides access to function endpoint urls

Index

Methods

Methods

getAuthorizationGrantUrl()

Retrieves the base url for an authorization grant. This can be used as the returning redirect url for an OAuth
request to an external service. The url does not contain a trailing slash.

Signature

getAuthorizationGrantUrl(): string;

Returns

string

authorization grant url

Defined in: src/functions/FunctionApi.ts:40

getEndpoints()

Retrieves the current set of available function endpoints urls. The urls do not contain a trailing slash.

Signature

getEndpoints(installId?: number): Promise<FunctionEndpoints>;

Parameters

NameTypeDescription
installId?numberthe id of the install to look up, defaults to current install.
Note: From global functions, installId must be provided. For other uses it should be left undefined.

Returns

Promise<FunctionEndpoints>

hash of function name to endpoint url

Defined in: src/functions/FunctionApi.ts:24

getGlobalEndpoints()

Retrieves the set of available global function endpoints urls for this app.
The urls do not contain a trailing slash.

Signature

getGlobalEndpoints(): Promise<FunctionEndpoints>;

Returns

Promise<FunctionEndpoints>

hash of function name to endpoint url

Defined in: src/functions/FunctionApi.ts:32