Skip to content

Marketplace Demo Presets

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/marketplace-demo-presets/list/ List demo presets
Other Actions
GET /api/marketplace-demo-presets/info/{name}/ Get demo preset details
POST /api/marketplace-demo-presets/load/{name}/ Load demo preset

Core CRUD

List demo presets

Returns a list of available demo data presets. Staff access only.

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-demo-presets/list/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.marketplace_demo_presets import marketplace_demo_presets_list_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_demo_presets_list_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: marketplace_demo_presets_list_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { marketplaceDemoPresetsListList } from 'waldur-js-client';

try {
  const response = await marketplaceDemoPresetsListList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
name string
title string
description string
version string
entity_counts object (free-form)
scenarios array of strings

Other Actions

Get demo preset details

Returns detailed information about a specific demo preset. Staff access only.

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-demo-presets/info/my-awesome-resource/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.marketplace_demo_presets import marketplace_demo_presets_info_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_demo_presets_info_retrieve.sync(
    name="my-awesome-resource",
    client=client
)

print(response)
  1. API Source: marketplace_demo_presets_info_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { marketplaceDemoPresetsInfoRetrieve } from 'waldur-js-client';

try {
  const response = await marketplaceDemoPresetsInfoRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "name": "my-awesome-resource"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required Description
name string Name of the preset

200 -

Field Type
name string
title string
description string
version string
entity_counts object (free-form)
scenarios array of strings

404 - No response body


Load demo preset

Load a demo preset into the database. This operation will optionally clean up existing data before loading. Staff access only.

1
2
3
4
http \
  POST \
  https://api.example.com/api/marketplace-demo-presets/load/my-awesome-resource/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.demo_preset_load_request_request import DemoPresetLoadRequestRequest # (1)
from waldur_api_client.api.marketplace_demo_presets import marketplace_demo_presets_load # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = DemoPresetLoadRequestRequest()
response = marketplace_demo_presets_load.sync(
    name="my-awesome-resource",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: DemoPresetLoadRequestRequest
  2. API Source: marketplace_demo_presets_load
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { marketplaceDemoPresetsLoad } from 'waldur-js-client';

try {
  const response = await marketplaceDemoPresetsLoad({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "name": "my-awesome-resource"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required Description
name string Name of the preset to load
Field Type Required Description
dry_run boolean Preview changes without applying them
Constraints: default: False
cleanup_first boolean Clean up existing data before loading the preset
Constraints: default: True
skip_users boolean Skip user import/cleanup
Constraints: default: False
skip_roles boolean Skip role import/cleanup
Constraints: default: False

200 -

Field Type
success boolean
message string
output string
users array of objects
users.username string
users.password string
users.email string
users.is_staff boolean
users.is_support boolean

400 - No response body


404 - No response body