Skip to main content

decentriq_platform.ab_media.publisher_api

Classes

PublisherApi

PublisherApi(
dcr: AbMediaDcr,
)

Provides the API for interacting with an Audience Builder DCR as a publisher.

deprovision_data_lab

def deprovision_data_lab(
self,
)

Deprovision a DataLab from the Audience Builder DCR.

estimate_audience_size

def estimate_audience_size(
self,
audience_name: str,
)> int

Estimate the audience size for the publisher.

get_audience_user_list

def get_audience_user_list(
self,
audience_name: str,
)> List[str]

Get the audience user list for the publisher.

get_audiences

def get_audiences(
self,
)> List[Union[decentriq_platform.ab_media.audience_definitions.RuleBasedAudienceDefinition, decentriq_platform.ab_media.audience_definitions.LookalikeAudienceDefinition, decentriq_platform.ab_media.audience_definitions.AdvertiserAudienceDefinition]]

Get the audiences for the publisher.

get_insights

def get_insights(
self,
)> Dict[str, Any]

Get the insights.

get_overlap_statistics

def get_overlap_statistics(
self,
)> Dict[str, list[Any]]

Get a report on how many users per audience were matched in the publisher's dataset. All numbers are rounded for privacy.

Returns: A report with the following structure:

{
"overlap_statistics": [
{
"audience_type": string,
"overlap_size": integer,
"andvertiser_size": integer
}
]
}

If the DCR was configured to hide absolute audience counts, the values are omitted from the report.

get_validation_report

def get_validation_report(
self,
)> dict[str, typing.Any]

Get the validation reports for the advertiser datasets.

Validation reports contain information about issues that were found in the provisioned data (e.g. values that don't match the expected schema or duplicated rows).

Returns: A dictionary with keys "matching", "segments", "demographics". Each key points to the validation report of the respective dataset.

provision_from_data_lab

def provision_from_data_lab(
self,
data_lab_id: str,
)

Provision the DataLab with the given ID to the Audience Builder DCR.

Parameters:

  • data_lab_id: ID of the DataLab to provision to the Audience Builder DCR.