Skip to content

Marketplace Attributes

Operations Summary

Method Endpoint Description
GET /api/marketplace-attributes/ List attributes
GET /api/marketplace-attributes/{uuid}/ Retrieve an attribute
POST /api/marketplace-attributes/ Create an attribute
PUT /api/marketplace-attributes/{uuid}/ Update an attribute
PATCH /api/marketplace-attributes/{uuid}/ Partially update an attribute
DELETE /api/marketplace-attributes/{uuid}/ Delete an attribute

List attributes

Returns a paginated list of all attributes. Attributes define form fields within section. Filter by section (URL).

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-attributes/ \
  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_attributes import marketplace_attributes_list # (1)

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

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

try {
  const response = await marketplaceAttributesList({
  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.
section string (uri) Section URL

200 -

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

Field Type Description
url string (uri)
uuid string (uuid)
key string
created string (date-time)
title string
section string (uri)
section_title string
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

Retrieve an attribute

Returns the details of a specific attribute, identified by its UUID.

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-attributes/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_attributes import marketplace_attributes_retrieve # (1)

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

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

try {
  const response = await marketplaceAttributesRetrieve({
  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 Description
url string (uri)
uuid string (uuid)
key string
created string (date-time)
title string
section string (uri)
section_title string
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

Create an attribute

Creates a new attribute within a section. Requires staff permissions.

1
2
3
4
5
6
7
8
http \
  POST \
  https://api.example.com/api/marketplace-attributes/ \
  Authorization:"Token YOUR_API_TOKEN" \
  key="ssh-rsa AAAAB3NzaC1yc2EAAA..." \
  title="string-value" \
  section="https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  type="boolean"
 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_request import AttributeRequest # (1)
from waldur_api_client.api.marketplace_attributes import marketplace_attributes_create # (2)

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

body_data = AttributeRequest(
    key="ssh-rsa AAAAB3NzaC1yc2EAAA...",
    title="string-value",
    section="https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    type="boolean"
)
response = marketplace_attributes_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await marketplaceAttributesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAA...",
    "title": "string-value",
    "section": "https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "type": "boolean"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
key string
title string
section string (uri)
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

201 -

Field Type Description
url string (uri)
uuid string (uuid)
key string
created string (date-time)
title string
section string (uri)
section_title string
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

Update an attribute

Updates an existing attribute. Requires staff permissions.

1
2
3
4
5
6
7
8
http \
  PUT \
  https://api.example.com/api/marketplace-attributes/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  key="ssh-rsa AAAAB3NzaC1yc2EAAA..." \
  title="string-value" \
  section="https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  type="boolean"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.attribute_request import AttributeRequest # (1)
from waldur_api_client.api.marketplace_attributes import marketplace_attributes_update # (2)

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

body_data = AttributeRequest(
    key="ssh-rsa AAAAB3NzaC1yc2EAAA...",
    title="string-value",
    section="https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    type="boolean"
)
response = marketplace_attributes_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: AttributeRequest
  2. API Source: marketplace_attributes_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import { marketplaceAttributesUpdate } from 'waldur-js-client';

try {
  const response = await marketplaceAttributesUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAA...",
    "title": "string-value",
    "section": "https://api.example.com/api/section/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "type": "boolean"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
key string
title string
section string (uri)
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
key string
created string (date-time)
title string
section string (uri)
section_title string
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

Partially update an attribute

Partially updates an existing attribute. Requires staff permissions.

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/marketplace-attributes/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_attribute_request import PatchedAttributeRequest # (1)
from waldur_api_client.api.marketplace_attributes import marketplace_attributes_partial_update # (2)

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

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

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

try {
  const response = await marketplaceAttributesPartialUpdate({
  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 Description
key string
title string
section string (uri)
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
key string
created string (date-time)
title string
section string (uri)
section_title string
type string
Enum: boolean, string, text, integer, choice, list
required boolean A value must be provided for the attribute.
default object (free-form)

Delete an attribute

Deletes an attribute. Requires staff permissions.

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/marketplace-attributes/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_attributes import marketplace_attributes_destroy # (1)

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

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

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