Skip to content

Latest commit

 

History

History
119 lines (84 loc) · 5.43 KB

File metadata and controls

119 lines (84 loc) · 5.43 KB

Dmp

Overview

Available Operations

get_first_party_data_job

When a first-party data query is submitted, a job ID is returned. This job ID can be used to poll for the job's status using the associated operation under "Job Status".

Example Usage

import os
from ttd_workflows import Workflows


with Workflows(
    ttd_auth=os.getenv("WORKFLOWS_TTD_AUTH", ""),
) as workflows:

    res = workflows.dmp.get_first_party_data_job(request={
        "advertiser_id": "<id>",
        "name_filter": "<value>",
        "query_shape": "<value>",
        "callback_input": {
            "callback_url": "https://difficult-pocket-watch.com",
            "callback_headers": {
                "key": "<value>",
                "key1": "<value>",
                "key2": "<value>",
            },
        },
    })

    assert res.standard_job_submit_response is not None

    # Handle response
    print(res.standard_job_submit_response)

Parameters

Parameter Type Required Description
request models.FirstPartyDataInput ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetFirstPartyDataJobResponse

Errors

Error Type Status Code Content Type
models.ProblemDetailsError 400, 401, 403, 404 application/json
models.APIError 4XX, 5XX */*

get_third_party_data_job

When a third-party data query is submitted, a job ID is returned. This job ID can be used to poll for the job's status, and when complete, the results download link, using the associated operation under "Job Status".

Example Usage

import os
from ttd_workflows import Workflows


with Workflows(
    ttd_auth=os.getenv("WORKFLOWS_TTD_AUTH", ""),
) as workflows:

    res = workflows.dmp.get_third_party_data_job(request={
        "partner_id": "<id>",
        "query_shape": "<value>",
        "callback_input": {
            "callback_url": "https://extroverted-intent.net",
            "callback_headers": {
                "key": "<value>",
                "key1": "<value>",
            },
        },
    })

    assert res.standard_job_submit_response is not None

    # Handle response
    print(res.standard_job_submit_response)

Parameters

Parameter Type Required Description
request models.ThirdPartyDataInput ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetThirdPartyDataJobResponse

Errors

Error Type Status Code Content Type
models.ProblemDetailsError 400, 401, 403, 404 application/json
models.APIError 4XX, 5XX */*