x/windmill/windmill-api/ScriptApi.md
.ScriptApi
All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
archiveScriptByHash | POST /w/{workspace}/scripts/archive/h/{hash} | archive script by hash |
archiveScriptByPath | POST /w/{workspace}/scripts/archive/p/{path} | archive script by path |
createScript | POST /w/{workspace}/scripts/create | create script |
deleteScriptByHash | POST /w/{workspace}/scripts/delete/h/{hash} | delete script by hash (erase content but keep hash) |
denoToJsonschema | POST /scripts/deno/tojsonschema | inspect deno code to infer jsonschema of arguments |
getHubScriptContentByPath | GET /scripts/hub/get/{path} | get hub script content by path |
getScriptByHash | GET /w/{workspace}/scripts/get/h/{hash} | get script by hash |
getScriptByPath | GET /w/{workspace}/scripts/get/p/{path} | get script by path |
getScriptDeploymentStatus | GET /w/{workspace}/scripts/deployment_status/h/{hash} | get script deployment status |
listHubScripts | GET /scripts/hub/list | list all available hub scripts |
listScripts | GET /w/{workspace}/scripts/list | list all available scripts |
pythonToJsonschema | POST /scripts/python/tojsonschema | inspect python code to infer jsonschema of arguments |
archiveScriptByHash
Script archiveScriptByHash()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiArchiveScriptByHashRequest = {
// string
workspace: "workspace_example",
// string
hash: "hash_example",
};
apiInstance.archiveScriptByHash(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
hash | [string] | defaults to undefined |
Return type
Script
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
archiveScriptByPath
string archiveScriptByPath()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiArchiveScriptByPathRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
};
apiInstance.archiveScriptByPath(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
path | [string] | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script archived | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createScript
string createScript(inlineObject10)
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiCreateScriptRequest = {
// string
workspace: "workspace_example",
// InlineObject10
inlineObject10: {
path: "path_example",
parentHash: "parentHash_example",
summary: "summary_example",
description: "description_example",
content: "content_example",
schema: {},
isTemplate: true,
lock: [
"lock_example",
],
language: "python3",
},
};
apiInstance.createScript(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inlineObject10 | InlineObject10 | ||
workspace | [string] | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: text/plain
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | script created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteScriptByHash
Script deleteScriptByHash()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiDeleteScriptByHashRequest = {
// string
workspace: "workspace_example",
// string
hash: "hash_example",
};
apiInstance.deleteScriptByHash(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
hash | [string] | defaults to undefined |
Return type
Script
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
denoToJsonschema
MainArgSignature denoToJsonschema(body)
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiDenoToJsonschemaRequest = {
// string | deno code with the main function
body: "body_example",
};
apiInstance.denoToJsonschema(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | string | deno code with the main function |
Return type
MainArgSignature
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | parsed args | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getHubScriptContentByPath
string getHubScriptContentByPath()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiGetHubScriptContentByPathRequest = {
// string
path: "path_example",
};
apiInstance.getHubScriptContentByPath(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
path | [string] | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getScriptByHash
Script getScriptByHash()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiGetScriptByHashRequest = {
// string
workspace: "workspace_example",
// string
hash: "hash_example",
};
apiInstance.getScriptByHash(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
hash | [string] | defaults to undefined |
Return type
Script
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getScriptByPath
Script getScriptByPath()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiGetScriptByPathRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
};
apiInstance.getScriptByPath(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
path | [string] | defaults to undefined |
Return type
Script
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getScriptDeploymentStatus
InlineResponse2002 getScriptDeploymentStatus()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:.ScriptApiGetScriptDeploymentStatusRequest = {
// string
workspace: "workspace_example",
// string
hash: "hash_example",
};
apiInstance.getScriptDeploymentStatus(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
workspace | [string] | defaults to undefined | |
hash | [string] | defaults to undefined |
Return type
InlineResponse2002
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | script details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listHubScripts
Array listHubScripts()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ScriptApi(configuration);
let body:any = {};
apiInstance.listHubScripts(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
This endpoint does not need any parameter.
Return type
Array
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | hub scripts list | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listScripts
Array