---
title: FunctionApi
slug: data-platform/connect-platform/app-sdk-api-reference-interfaces-functionapi
docTags: 
createdAt: 2026-08-05T20:06:33.394Z
---

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT)

***

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT) / FunctionApi

# Interface: FunctionApi

Defined in: [src/functions/FunctionApi.ts:16](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/functions/FunctionApi.ts#L16)

Provides access to function endpoint urls

## Methods

### getAuthorizationGrantUrl()

:::BlockQuote
**getAuthorizationGrantUrl**(): `string`
:::

Defined in: [src/functions/FunctionApi.ts:40](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/functions/FunctionApi.ts#L40)

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.

### Returns

`string`

authorization grant url

***

### getEndpoints()

:::BlockQuote
**getEndpoints**(`installId?`): `Promise`\<[`` `FunctionEndpoints` ``](docId\:FwMtR1hXNEeNQdp1YssKp)>
:::

Defined in: [src/functions/FunctionApi.ts:24](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/functions/FunctionApi.ts#L24)

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

### Parameters

### installId?

`number`

the 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` ``](docId\:FwMtR1hXNEeNQdp1YssKp)>

hash of function name to endpoint url

***

### getGlobalEndpoints()

:::BlockQuote
**getGlobalEndpoints**(): `Promise`\<[`` `FunctionEndpoints` ``](docId\:FwMtR1hXNEeNQdp1YssKp)>
:::

Defined in: [src/functions/FunctionApi.ts:32](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/functions/FunctionApi.ts#L32)

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

### Returns

`Promise`\<[`` `FunctionEndpoints` ``](docId\:FwMtR1hXNEeNQdp1YssKp)>

hash of function name to endpoint url
