Skip to content

Marketplace Openstack Duplicate Offerings

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/marketplace-openstack-duplicate-offerings/ List Marketplace Openstack Duplicate Offerings
Other Actions
POST /api/marketplace-openstack-duplicate-offerings/remediate/ Remediate

Core CRUD

List Marketplace Openstack Duplicate Offerings

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-openstack-duplicate-offerings/ \
  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_openstack_duplicate_offerings import marketplace_openstack_duplicate_offerings_list # (1)

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

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

try {
  const response = await marketplaceOpenstackDuplicateOfferingsList({
  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
tenant_id integer
tenant_uuid string (uuid)
tenant_name string
customer_name string
customer_uuid string (uuid)
offering_type string
recommended_keeper_id integer
orphan_count integer
candidates array of objects
candidates.id integer
candidates.uuid string (uuid)
candidates.name string
candidates.state string
candidates.active_resources integer
candidates.total_resources integer
candidates.is_recommended_keeper boolean

Other Actions

Remediate

Collapse one duplicate per-tenant offering group onto its keeper. Previews by default; pass dry_run=false to apply. Refuses to run when history (billing periods, usage records) cannot be re-pointed.

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/marketplace-openstack-duplicate-offerings/remediate/ \
  Authorization:"Token YOUR_API_TOKEN" \
  tenant_id=123 \
  offering_type="string-value"
 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.duplicate_offering_remediate_request import DuplicateOfferingRemediateRequest # (1)
from waldur_api_client.api.marketplace_openstack_duplicate_offerings import marketplace_openstack_duplicate_offerings_remediate # (2)

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

body_data = DuplicateOfferingRemediateRequest(
    tenant_id=123,
    offering_type="string-value"
)
response = marketplace_openstack_duplicate_offerings_remediate.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await marketplaceOpenstackDuplicateOfferingsRemediate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "tenant_id": 123,
    "offering_type": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
tenant_id integer
offering_type string
dry_run boolean Preview the changes without applying them. Mirrors the dry-run-by-default behaviour of the dedupe_tenant_offerings command.
Constraints: default: True

200 -

Field Type Description
tenant_id integer
offering_type string
keeper_id integer
keeper_name string
dry_run boolean
duplicates array of objects
duplicates.duplicate_id integer
duplicates.duplicate_name string
duplicates.keeper_id integer
duplicates.keeper_name string
duplicates.action string delete (nothing attached), merge, or skip.
duplicates.is_empty boolean
duplicates.resource_count integer
duplicates.order_count integer
duplicates.plan_period_count integer
duplicates.component_usage_count integer
duplicates.component_quota_count integer
duplicates.blockers array of strings
blockers array of strings