Share your feedback about the Display & Video 360 API. Take the 2022 Display & Video 360 API Annual Survey.

REST Resource: customBiddingAlgorithms.scripts

Resource: CustomBiddingScript

A single custom bidding script.

JSON representation
{
  "name": string,
  "customBiddingAlgorithmId": string,
  "customBiddingScriptId": string,
  "createTime": string,
  "active": boolean,
  "state": enum (State),
  "errors": [
    {
      object (ScriptError)
    }
  ],
  "script": {
    object (CustomBiddingScriptRef)
  }
}
Fields
name

string

Output only. The resource name of the custom bidding script.

customBiddingAlgorithmId

string (int64 format)

Output only. The unique ID of the custom bidding algorithm the script belongs to.

customBiddingScriptId

string (int64 format)

Output only. The unique ID of the custom bidding script.

createTime

string (Timestamp format)

Output only. The time when the script was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

active

boolean

Output only. Whether the script is currently being used for scoring by the parent algorithm.

state

enum (State)

Output only. The state of the custom bidding script.

errors[]

object (ScriptError)

Output only. Error details of a rejected custom bidding script. This field will only be populated when [Script.state][] is REJECTED.

script

object (CustomBiddingScriptRef)

The reference to the uploaded script file.

State

Possible states of a custom bidding script.

Enums
STATE_UNSPECIFIED The script state is not specified or is unknown in this version.
ACCEPTED The script has been accepted for scoring impressions.
REJECTED The script has been rejected by backend pipelines. It may have errors.
PENDING The script is being processed for backend pipelines.

ScriptError

An error message for a custom bidding script.

JSON representation
{
  "errorCode": enum (ErrorCode),
  "line": string,
  "column": string,
  "errorMessage": string
}
Fields
errorCode

enum (ErrorCode)

The type of error.

line

string (int64 format)

The line number in the script where the error was thrown.

column

string (int64 format)

The column number in the script where the error was thrown.

errorMessage

string

The detailed error message.

ErrorCode

Possible error codes of a custom bidding script error.

Enums
ERROR_CODE_UNSPECIFIED The script error is not specified or is unknown in this version.
SYNTAX_ERROR The script has a syntax error.
DEPRECATED_SYNTAX The script uses deprecated syntax.
INTERNAL_ERROR Internal errors were thrown while processing the script.

CustomBiddingScriptRef

The reference to the uploaded custom bidding script file.

JSON representation
{
  "resourceName": string
}
Fields
resourceName

string

A resource name to be used in media.download to Download the script files. Or media.upload to Upload the script files. Resource names have the format customBiddingAlgorithms/{customBiddingAlgorithmId}/scriptRef/{ref_id}.

Methods

create

Creates a new custom bidding script.

get

Gets a custom bidding script.

list

Lists custom bidding scripts that belong to the given algorithm.