Usage¶
Public Client Layout¶
TargetClient is organized by explicit API namespaces instead of a flat list of loosely named methods.
The generated method-by-method wrapper reference lives in Methods Reference.
Core groups:
client.activitiesclient.audiencesclient.propertiesclient.offersclient.reportsclient.environmentsclient.mboxesclient.profile_attributesclient.batch
Activities¶
from adobe_target_admin import ActivitiesListParams
activities = client.activities.list(
params=ActivitiesListParams(mbox="homepage-hero", viewId="hero-view"),
)
activity = client.activities.ab.get(activity_id)
created = client.activities.ab.create(payload)
updated = client.activities.xt.update(activity_id, payload)
description = client.activities.update_state(activity_id, payload)
changelog = client.activities.changelog(activity_id)
The ab and xt subgroups map directly to Adobe activity-type endpoints.
Return models:
activities.list() -> ActivityListactivities.ab.get/create/update/delete -> ABActivityactivities.xt.get/create/update/delete -> ABActivityactivities.update_name/update_state/update_priority/update_schedule -> ActivityDescriptionactivities.changelog(activity_id) -> ActivityChangelogList
Request models:
activities.list(params: ActivitiesListParams)activities.ab.create/update(payload: ABActivity)activities.xt.create/update(payload: ABActivity)activities.update_name(payload: Name)activities.update_state(payload: State)activities.update_priority(payload: Priority)activities.update_schedule(payload: Schedule)
Audiences¶
audiences = client.audiences.list()
audience = client.audiences.get(audience_id)
created = client.audiences.create(payload)
updated = client.audiences.update(audience_id, payload)
deleted = client.audiences.delete(audience_id)
Return models:
audiences.list() -> AudienceListaudiences.get/create/update/delete -> Audience
Request models:
audiences.list(params: AudiencesListParams)audiences.create/update(payload: Audience)
AudiencesListParams exists for consistency with the typed query model pattern, but the
current vendored OpenAPI spec does not define any documented audience list query fields.
Properties¶
properties = client.properties.list()
property_ = client.properties.get(property_id)
Return models:
properties.list() -> PropertyListproperties.get(property_id) -> Property
Offers¶
offers = client.offers.list()
offer = client.offers.content.get(offer_id)
created = client.offers.content.create(payload)
updated = client.offers.content.update(offer_id, payload)
deleted = client.offers.content.delete(offer_id)
offers.list() returns the mixed Adobe offer collection. Content-offer CRUD lives under offers.content because that is the implemented offer subtype today.
Return models:
offers.list() -> OfferListoffers.content.get/create/update/delete -> ContentOffer
Request models:
offers.content.create/update(payload: ContentOffer)
Reports¶
ab_performance = client.reports.ab.performance(activity_id)
ab_orders = client.reports.ab.orders(activity_id)
xt_performance = client.reports.xt.performance(activity_id)
abt_orders = client.reports.abt.orders(activity_id)
Report methods are grouped by activity type so the endpoint shape is visible from the call site.
Return models:
reports.ab.performance -> AbstractActivityPerformanceReportreports.ab.orders -> ActivityOrdersReportreports.xt.performance -> AbstractActivityPerformanceReportreports.xt.orders -> ActivityOrdersReportreports.abt.performance -> AbstractActivityPerformanceReportreports.abt.orders -> ActivityOrdersReport
Other Namespaces¶
environments = client.environments.list()
mboxes = client.mboxes.list()
mbox = client.mboxes.parameters("homepage-hero")
attributes = client.profile_attributes.list()
batch_result = client.batch.execute(payload)
Return models:
environments.list() -> EnvironmentListmboxes.list() -> MboxListmboxes.parameters(mbox_name) -> Mboxprofile_attributes.list() -> MboxProfileAttributesDTObatch.execute(payload) -> BatchResponse
Request models:
batch.execute(payload: BatchRequest)
Escape Hatches¶
When the convenience namespaces do not yet cover a documented endpoint:
- use
client.request(...) -> httpx.Responsefor raw transport access
The transport still applies Adobe's documented media-type versioning automatically.