Marketplace Attribute Options
Operations Summary
List attribute options
Returns a paginated list of options for choice-type attributes. Filter by attribute (URL). Default option is determined by attribute.default.
Retrieve an attribute option
Returns the details of a specific attribute option.
Create an attribute option
Creates a new option for a choice-type attribute. Requires staff permissions.
Update an attribute option
Updates an existing attribute option. Requires staff permissions.
| http \
PUT \
https://api.example.com/api/marketplace-attribute-options/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
Authorization:"Token YOUR_API_TOKEN" \
key="ssh-rsa AAAAB3NzaC1yc2EAAA..." \
title="string-value" \
attribute="https://api.example.com/api/attribute/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.attribute_option_request import AttributeOptionRequest # (1)
from waldur_api_client.api.marketplace_attribute_options import marketplace_attribute_options_update # (2)
client = AuthenticatedClient(
base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
body_data = AttributeOptionRequest(
key="ssh-rsa AAAAB3NzaC1yc2EAAA...",
title="string-value",
attribute="https://api.example.com/api/attribute/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = marketplace_attribute_options_update.sync(
uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
client=client,
body=body_data
)
print(response)
|
- Model Source:
AttributeOptionRequest
- API Source:
marketplace_attribute_options_update
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | import { marketplaceAttributeOptionsUpdate } from 'waldur-js-client';
try {
const response = await marketplaceAttributeOptionsUpdate({
auth: "Token YOUR_API_TOKEN",
path: {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
body: {
"key": "ssh-rsa AAAAB3NzaC1yc2EAAA...",
"title": "string-value",
"attribute": "https://api.example.com/api/attribute/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
}
});
console.log('Success:', response);
} catch (error) {
console.error('Error:', error);
}
|
| Name |
Type |
Required |
uuid |
string (uuid) |
✓ |
| Field |
Type |
Required |
key |
string |
✓ |
title |
string |
✓ |
attribute |
string (uri) |
✓ |
200 -
| Field |
Type |
Description |
url |
string (uri) |
|
uuid |
string (uuid) |
|
id |
integer |
|
key |
string |
|
title |
string |
|
attribute |
string (uri) |
|
attribute_title |
string |
|
is_default |
boolean |
Return True if this option is the default for its attribute. |
Partially update an attribute option
Partially updates an existing attribute option. To set the default option, PATCH the attribute with default=. Requires staff permissions.
Delete an attribute option
Deletes an attribute option. Requires staff permissions.