Get User Defined Function - Get User Defined Function
Gets a user defined function.
Returns the user defined function in the Confidential Ledger
GET {ledgerEndpoint}/app/userDefinedFunctions/{functionId}?api-version=2024-12-09-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
function
|
path | True |
string |
Identifies a user defined function. |
|
ledger
|
path | True |
string (uri) |
The Confidential Ledger URL, for example |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
Examples
Get User Defined Function
Sample request
GET {ledgerEndpoint}/app/userDefinedFunctions/myFunction?api-version=2024-12-09-preview
Sample response
{
"id": "myFunction",
"code": "export function main() { return true }"
}
Definitions
| Name | Description |
|---|---|
|
Confidential |
An error response from Confidential Ledger. |
|
Confidential |
An error response from Confidential Ledger. |
|
User |
A user defined function in the ledger. |
ConfidentialLedgerCommon.ConfidentialLedgerError
An error response from Confidential Ledger.
| Name | Type | Description |
|---|---|---|
| error |
An error response from Confidential Ledger. |
ConfidentialLedgerCommon.ConfidentialLedgerErrorBody
An error response from Confidential Ledger.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| message |
string |
The error message. |
UserDefinedFunction
A user defined function in the ledger.
| Name | Type | Description |
|---|---|---|
| code |
string |
Code of the user defined function in JavaScript. |
| id |
string |
ID of the user defined function. |