Skip to content

Marketplace Customer Service Accounts

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/marketplace-customer-service-accounts/ List service accounts
GET /api/marketplace-customer-service-accounts/{uuid}/ Retrieve a service account
POST /api/marketplace-customer-service-accounts/ Create a customer service account
PUT /api/marketplace-customer-service-accounts/{uuid}/ Update a service account
PATCH /api/marketplace-customer-service-accounts/{uuid}/ Partially update a service account
DELETE /api/marketplace-customer-service-accounts/{uuid}/ Close a customer service account
Other Actions
POST /api/marketplace-customer-service-accounts/{uuid}/rotate_api_key/ Rotate API key for a customer service account

Core CRUD

List service accounts

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-customer-service-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_customer_service_accounts import marketplace_customer_service_accounts_list # (1)

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

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

try {
  const response = await marketplaceCustomerServiceAccountsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
customer string Customer URL
customer_uuid string (uuid) Customer UUID
email string Email contains
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
state array Service account state

username string Username

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)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string

Retrieve a service account

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-customer-service-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_customer_service_accounts import marketplace_customer_service_accounts_retrieve # (1)

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

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

try {
  const response = await marketplaceCustomerServiceAccountsRetrieve({
  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)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string

Create a customer service account

Creates a new service account scoped to a specific customer (organization). This generates an API key that can be used for automated access to resources across all projects within that customer.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/marketplace-customer-service-accounts/ \
  Authorization:"Token YOUR_API_TOKEN" \
  customer="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.customer_service_account_request import CustomerServiceAccountRequest # (1)
from waldur_api_client.api.marketplace_customer_service_accounts import marketplace_customer_service_accounts_create # (2)

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

body_data = CustomerServiceAccountRequest(
    customer="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
response = marketplace_customer_service_accounts_create.sync(
    client=client,
    body=body_data
)

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

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

201 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string

Update a service account

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/marketplace-customer-service-accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  customer="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.customer_service_account_request import CustomerServiceAccountRequest # (1)
from waldur_api_client.api.marketplace_customer_service_accounts import marketplace_customer_service_accounts_update # (2)

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

body_data = CustomerServiceAccountRequest(
    customer="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
response = marketplace_customer_service_accounts_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

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

200 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string

Partially update a service account

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/marketplace-customer-service-accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  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.patched_customer_service_account_request import PatchedCustomerServiceAccountRequest # (1)
from waldur_api_client.api.marketplace_customer_service_accounts import marketplace_customer_service_accounts_partial_update # (2)

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

body_data = PatchedCustomerServiceAccountRequest()
response = marketplace_customer_service_accounts_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await marketplaceCustomerServiceAccountsPartialUpdate({
  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)
Field Type Required
username string
description string
error_traceback string
email string (email)
preferred_identifier string
customer string (uuid)

200 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
modified string (date-time)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string

Close a customer service account

Deactivates a customer service account and revokes its API key.

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/marketplace-customer-service-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_customer_service_accounts import marketplace_customer_service_accounts_destroy # (1)

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

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

try {
  const response = await marketplaceCustomerServiceAccountsDestroy({
  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


Other Actions

Rotate API key for a customer service account

Generates a new API key for the service account, immediately invalidating the old one. The new key is returned in the response.

1
2
3
4
http \
  POST \
  https://api.example.com/api/marketplace-customer-service-accounts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/rotate_api_key/ \
  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_customer_service_accounts import marketplace_customer_service_accounts_rotate_api_key # (1)

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

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

try {
  const response = await marketplaceCustomerServiceAccountsRotateApiKey({
  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)
username string
description string
error_message string
error_traceback string
state any
token string
email string (email)
expires_at string
preferred_identifier string
customer string (uuid)
customer_uuid string (uuid)
customer_name string