Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/windmill-api/ResourceApi.md

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
File

.ResourceApi

All URIs are relative to /api

Method HTTP request Description
createResource POST /w/{workspace}/resources/create create resource
createResourceType POST /w/{workspace}/resources/type/create create resource_type
deleteResource DELETE /w/{workspace}/resources/delete/{path} delete resource
deleteResourceType DELETE /w/{workspace}/resources/type/delete/{path} delete resource_type
existsResource GET /w/{workspace}/resources/exists/{path} does resource exists
existsResourceType GET /w/{workspace}/resources/type/exists/{path} does resource_type exists
getResource GET /w/{workspace}/resources/get/{path} get resource
getResourceType GET /w/{workspace}/resources/type/get/{path} get resource_type
listResource GET /w/{workspace}/resources/list list resources
listResourceType GET /w/{workspace}/resources/type/list list resource_types
listResourceTypeNames GET /w/{workspace}/resources/type/listnames list resource_types names
updateResource POST /w/{workspace}/resources/update/{path} update resource
updateResourceType POST /w/{workspace}/resources/type/update/{path} update resource_type

createResource

string createResource(createResource)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiCreateResourceRequest = {
  // string
  workspace: "workspace_example",
  // CreateResource | new resource
  createResource: {
    path: "path_example",
    value: {},
    description: "description_example",
    resourceType: "resourceType_example",
    isOauth: true,
  },
};

apiInstance.createResource(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createResource CreateResource new resource
workspace [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
201 resource created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createResourceType

string createResourceType(resourceType)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiCreateResourceTypeRequest = {
  // string
  workspace: "workspace_example",
  // ResourceType | new resource_type
  resourceType: {
    workspaceId: "workspaceId_example",
    name: "name_example",
    schema: null,
    description: "description_example",
  },
};

apiInstance.createResourceType(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resourceType ResourceType new resource_type
workspace [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
201 resource_type created -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteResource

string deleteResource()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiDeleteResourceRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.deleteResource(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 resource deleted -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteResourceType

string deleteResourceType()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiDeleteResourceTypeRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.deleteResourceType(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 resource_type deleted -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

existsResource

boolean existsResource()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiExistsResourceRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.existsResource(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 does resource exists -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

existsResourceType

boolean existsResourceType()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiExistsResourceTypeRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.existsResourceType(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 does resource_type exist -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getResource

Resource getResource()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiGetResourceRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.getResource(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

Resource

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 resource deleted -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getResourceType

ResourceType getResourceType()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiGetResourceTypeRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
};

apiInstance.getResourceType(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

ResourceType

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 resource_type deleted -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listResource

Array listResource()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiListResourceRequest = {
  // string
  workspace: "workspace_example",
  // number | which page to return (start at 1, default 1) (optional)
  page: 1,
  // number | number of items to return for a given page (default 30, max 100) (optional)
  perPage: 1,
  // string | resource_type to list from (optional)
  resourceType: "resource_type_example",
};

apiInstance.listResource(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
page [number] which page to return (start at 1, default 1) (optional) defaults to undefined
perPage [number] number of items to return for a given page (default 30, max 100) (optional) defaults to undefined
resourceType [string] resource_type to list from (optional) defaults to undefined

Return type

Array

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 resource list -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listResourceType

Array listResourceType()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiListResourceTypeRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.listResourceType(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 resource_type list -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listResourceTypeNames

Array listResourceTypeNames()

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiListResourceTypeNamesRequest = {
  // string
  workspace: "workspace_example",
};

apiInstance.listResourceTypeNames(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

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 resource_type list -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateResource

string updateResource(editResource)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiUpdateResourceRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
  // EditResource | updated resource
  editResource: {
    path: "path_example",
    description: "description_example",
    value: {},
  },
};

apiInstance.updateResource(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
editResource EditResource updated resource
workspace [string] defaults to undefined
path [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 resource updated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateResourceType

string updateResourceType(editResourceType)

Example

import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ResourceApi(configuration);

let body:.ResourceApiUpdateResourceTypeRequest = {
  // string
  workspace: "workspace_example",
  // string
  path: "path_example",
  // EditResourceType | updated resource_type
  editResourceType: {
    schema: "schema_example",
    description: "description_example",
  },
};

apiInstance.updateResourceType(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
editResourceType EditResourceType updated resource_type
workspace [string] defaults to undefined
path [string] defaults to undefined

Return type

string

Authorization

bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 resource_type updated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]