(apps)
Operations related to apps
- getApps - Returns a list of
Appobjects. - getApp - Returns an
Appobject. - getSyncErrors - Returns a list of recent sync errors that have occurred since the last successful sync.
Returns a list of App objects.
import { OpalMcp } from "opal-mcp";
const opalMcp = new OpalMcp({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await opalMcp.apps.getApps({
appTypeFilter: [
"OKTA_DIRECTORY",
"GIT_HUB",
],
ownerFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac",
});
console.log(result);
}
run();The standalone function version of this method:
import { OpalMcpCore } from "opal-mcp/core.js";
import { appsGetApps } from "opal-mcp/funcs/appsGetApps.js";
// Use `OpalMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const opalMcp = new OpalMcpCore({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await appsGetApps(opalMcp, {
appTypeFilter: [
"OKTA_DIRECTORY",
"GIT_HUB",
],
ownerFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("appsGetApps failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetAppsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.AppsList>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Returns an App object.
import { OpalMcp } from "opal-mcp";
const opalMcp = new OpalMcp({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await opalMcp.apps.getApp({
appId: "32acc112-21ff-4669-91c2-21e27683eaa1",
});
console.log(result);
}
run();The standalone function version of this method:
import { OpalMcpCore } from "opal-mcp/core.js";
import { appsGetApp } from "opal-mcp/funcs/appsGetApp.js";
// Use `OpalMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const opalMcp = new OpalMcpCore({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await appsGetApp(opalMcp, {
appId: "32acc112-21ff-4669-91c2-21e27683eaa1",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("appsGetApp failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetAppRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.App>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Returns a list of recent sync errors that have occurred since the last successful sync.
import { OpalMcp } from "opal-mcp";
const opalMcp = new OpalMcp({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await opalMcp.apps.getSyncErrors({
appId: "29827fb8-f2dd-4e80-9576-28e31e9934ac",
resourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5",
groupId: "9546209c-42c2-4801-96d7-9ec42df0f59c",
});
console.log(result);
}
run();The standalone function version of this method:
import { OpalMcpCore } from "opal-mcp/core.js";
import { appsGetSyncErrors } from "opal-mcp/funcs/appsGetSyncErrors.js";
// Use `OpalMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const opalMcp = new OpalMcpCore({
bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await appsGetSyncErrors(opalMcp, {
appId: "29827fb8-f2dd-4e80-9576-28e31e9934ac",
resourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5",
groupId: "9546209c-42c2-4801-96d7-9ec42df0f59c",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("appsGetSyncErrors failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetSyncErrorsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.SyncErrorList[]>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |