(project.run)
Run Project's exposed APIs
Runs a project API synchronously.
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const result = await intunedClient.project.run.sync("my-project", {
api: "get-contracts",
parameters: [
{
"page": 1,
"isLastPage": false,
},
],
retry: {
maximumAttempts: 3,
},
proxy: "http://username:password@domain:port",
});
// Handle the result
console.log(result)
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectRunSync } from "@intuned/client/funcs/projectRunSync.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectRunSync(intunedClient, "my-project", {
api: "get-contracts",
parameters: {
"page": 1,
"isLastPage": false,
},
retry: {
maximumAttempts: 3,
},
proxy: "http://username:password@domain:port",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
runProjectApiRequest |
components.RunProjectApiRequest | ✔️ | run project api 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.SyncResultResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |
Starts a project API run operation
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const result = await intunedClient.project.run.start("my-project", {
api: "get-contracts",
parameters: {
"page": 1,
"isLastPage": false,
},
retry: {
maximumAttempts: 3,
},
proxy: "http://username:password@domain:port",
});
// Handle the result
console.log(result)
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectRunStart } from "@intuned/client/funcs/projectRunStart.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectRunStart(intunedClient, "my-project", {
api: "get-contracts",
parameters: [
{
"page": 1,
"isLastPage": false,
},
],
retry: {
maximumAttempts: 3,
},
proxy: "http://username:password@domain:port",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
runProjectApiRequest |
components.RunProjectApiRequest | ✔️ | run project api 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.AsyncRunPendingResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |
Retrieves the result of a started project API run operation.
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const result = await intunedClient.project.run.result("my-project", "aabbccddeeffggh");
// Handle the result
console.log(result)
}
run();
The standalone function version of this method:
import { IntunedClientCore } from "@intuned/client/core.js";
import { projectRunResult } from "@intuned/client/funcs/projectRunResult.js";
// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
apiKey: "<YOUR_API_KEY_HERE>",
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
async function run() {
const res = await projectRunResult(intunedClient, "my-project", "aabbccddeeffggh");
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName |
string | ✔️ | Your project name. It is the name you provide when creating a project. | [object Object] |
runId |
string | ✔️ | Run ID | [object Object] |
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.AsyncResultResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.SDKError | 4xx-5xx | / |