x/windmill/windmill-api/VariableApi.md
.VariableApi
All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
createVariable | POST /w/{workspace}/variables/create | create variable |
deleteVariable | DELETE /w/{workspace}/variables/delete/{path} | delete variable |
existsVariable | GET /w/{workspace}/variables/exists/{path} | does variable exists at path |
getVariable | GET /w/{workspace}/variables/get/{path} | get variable |
listContextualVariables | GET /w/{workspace}/variables/list_contextual | list contextual variables |
listVariable | GET /w/{workspace}/variables/list | list variables |
updateVariable | POST /w/{workspace}/variables/update/{path} | update variable |
createVariable
string createVariable(createVariable)
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiCreateVariableRequest = {
// string
workspace: "workspace_example",
// CreateVariable | new variable
createVariable: {
path: "path_example",
value: "value_example",
isSecret: true,
description: "description_example",
account: 1,
isOauth: true,
},
};
apiInstance.createVariable(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createVariable | CreateVariable | new variable | |
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 | variable created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteVariable
string deleteVariable()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiDeleteVariableRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
};
apiInstance.deleteVariable(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 | variable deleted | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
existsVariable
boolean existsVariable()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiExistsVariableRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
};
apiInstance.existsVariable(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
boolean
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | variable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getVariable
ListableVariable getVariable()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiGetVariableRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
// boolean | ask to decrypt secret if this variable is secret (if not secret no effect, default: true) (optional)
decryptSecret: true,
};
apiInstance.getVariable(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 | |
decryptSecret | [boolean] | ask to decrypt secret if this variable is secret (if not secret no effect, default: true) | (optional) defaults to undefined |
Return type
ListableVariable
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | variable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listContextualVariables
Array listContextualVariables()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiListContextualVariablesRequest = {
// string
workspace: "workspace_example",
};
apiInstance.listContextualVariables(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 |
Return type
Array
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | contextual variable list | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listVariable
Array listVariable()
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiListVariableRequest = {
// string
workspace: "workspace_example",
};
apiInstance.listVariable(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 |
Return type
Array
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | variable list | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateVariable
string updateVariable(editVariable)
Example
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .VariableApi(configuration);
let body:.VariableApiUpdateVariableRequest = {
// string
workspace: "workspace_example",
// string
path: "path_example",
// EditVariable | updated variable
editVariable: {
path: "path_example",
value: "value_example",
isSecret: true,
description: "description_example",
},
};
apiInstance.updateVariable(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Parameters
Name | Type | Description | Notes |
---|---|---|---|
editVariable | EditVariable | updated variable | |
workspace | [string] | defaults to undefined | |
path | [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 |
---|---|---|
200 | variable updated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]