Skip to content

Marketplace Course Accounts

Operations Summary

Method Endpoint Description
GET /api/marketplace-course-accounts/ List Marketplace Course Accounts
GET /api/marketplace-course-accounts/{uuid}/ Retrieve
POST /api/marketplace-course-accounts/ Create
POST /api/marketplace-course-accounts/create_bulk/ Create bulk
DELETE /api/marketplace-course-accounts/{uuid}/ Delete

List Marketplace Course Accounts

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-course-accounts/ \
  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_course_accounts import marketplace_course_accounts_list # (1)

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

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

try {
  const response = await marketplaceCourseAccountsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
email string
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project_end_date_after string (date)
project_end_date_before string (date)
project_start_date_after string (date)
project_start_date_before string (date)
project_uuid string (uuid)
state array
username string

200 -

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

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
project string (uuid)
project_uuid string (uuid)
project_name string
project_slug string
project_start_date string (date)
project_end_date string (date)
user_uuid string (uuid)
username string
customer_uuid string (uuid)
customer_name string
state any
email string (email)
description string
error_message string
error_traceback string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-course-accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  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_course_accounts import marketplace_course_accounts_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_course_accounts_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

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

try {
  const response = await marketplaceCourseAccountsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
project string (uuid)
project_uuid string (uuid)
project_name string
project_slug string
project_start_date string (date)
project_end_date string (date)
user_uuid string (uuid)
username string
customer_uuid string (uuid)
customer_name string
state any
email string (email)
description string
error_message string
error_traceback string

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/marketplace-course-accounts/ \
  Authorization:"Token YOUR_API_TOKEN" \
  project="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.course_account_request import CourseAccountRequest # (1)
from waldur_api_client.api.marketplace_course_accounts import marketplace_course_accounts_create # (2)

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

body_data = CourseAccountRequest(
    project="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
response = marketplace_course_accounts_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await marketplaceCourseAccountsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "project": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
project string (uuid)
email string (email)
description string

201 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
project string (uuid)
project_uuid string (uuid)
project_name string
project_slug string
project_start_date string (date)
project_end_date string (date)
user_uuid string (uuid)
username string
customer_uuid string (uuid)
customer_name string
state any
email string (email)
description string
error_message string
error_traceback string

Create bulk

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/marketplace-course-accounts/create_bulk/ \
  Authorization:"Token YOUR_API_TOKEN" \
  course_accounts:='[]' \
  project="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.course_accounts_bulk_create_request import CourseAccountsBulkCreateRequest # (1)
from waldur_api_client.api.marketplace_course_accounts import marketplace_course_accounts_create_bulk # (2)

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

body_data = CourseAccountsBulkCreateRequest(
    course_accounts=[],
    project="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
response = marketplace_course_accounts_create_bulk.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await marketplaceCourseAccountsCreateBulk({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "course_accounts": [],
    "project": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
course_accounts array of objects
course_accounts.email string (email)
course_accounts.description string
project string (uuid)

200 -

Field Type
course_accounts array of objects
course_accounts.email string (email)
course_accounts.description string
project string (uuid)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/marketplace-course-accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  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_course_accounts import marketplace_course_accounts_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_course_accounts_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

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

try {
  const response = await marketplaceCourseAccountsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body