# DCM/DFA Reporting And Trafficking API . directorySites

## Instance Methods

Gets one directory site by ID.

Inserts a new directory site.

Retrieves a list of directory sites, possibly filtered. This method supports paging.

Retrieves the next page of results.

### Method Details

`get(profileId, id)`

    Gets one directory site by ID.

    Args:
      profileId: string, User profile ID associated with this request. (required)
      id: string, Directory site ID. (required)

    Returns:
      An object of the form:

        { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
          "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
          "countryId": "A String", # Country ID of this directory site. This is a read-only field.
          "description": "A String", # Description of this directory site. This is a read-only field.
          "settings": { # Directory Site Settings # Directory site settings.
            "nielsenOcrOptOut": True or False, # Whether this directory site has disabled Nielsen OCR reach ratings.
            "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
            "dfp_settings": { # DFP Settings # Directory site DFP settings.
              "publisherPortalOnly": True or False, # Whether this directory site is available only via DoubleClick Publisher Portal.
              "dfp_network_name": "A String", # DFP network name for this directory site.
              "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
              "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
              "dfp_network_code": "A String", # DFP network code for this directory site.
            },
            "verificationTagOptOut": True or False, # Whether this directory site has disabled generation of Verification ins tags.
            "instream_video_placement_accepted": True or False, # Whether this site accepts in-stream video ads.
            "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
            "videoActiveViewOptOut": True or False, # Whether this directory site has disabled active view for in-stream video creatives.
          },
          "currencyId": "A String", # Currency ID of this directory site. This is a read-only field.
              # Possible values are:
              # - "1" for USD
              # - "2" for GBP
              # - "3" for ESP
              # - "4" for SEK
              # - "5" for CAD
              # - "6" for JPY
              # - "7" for DEM
              # - "8" for AUD
              # - "9" for FRF
              # - "10" for ITL
              # - "11" for DKK
              # - "12" for NOK
              # - "13" for FIM
              # - "14" for ZAR
              # - "15" for IEP
              # - "16" for NLG
              # - "17" for EUR
              # - "18" for KRW
              # - "19" for TWD
              # - "20" for SGD
              # - "21" for CNY
              # - "22" for HKD
              # - "23" for NZD
              # - "24" for MYR
              # - "25" for BRL
              # - "26" for PTE
              # - "27" for MXP
              # - "28" for CLP
              # - "29" for TRY
              # - "30" for ARS
              # - "31" for PEN
              # - "32" for ILS
              # - "33" for CHF
              # - "34" for VEF
              # - "35" for COP
              # - "36" for GTQ
              # - "37" for PLN
              # - "39" for INR
              # - "40" for THB
              # - "41" for IDR
              # - "42" for CZK
              # - "43" for RON
              # - "44" for HUF
              # - "45" for RUB
              # - "46" for AED
              # - "47" for BGN
              # - "48" for HRK
              # - "49" for MXN
          "inpageTagFormats": [ # Tag types for regular placements.
              #
              # Acceptable values are:
              # - "STANDARD"
              # - "IFRAME_JAVASCRIPT_INPAGE"
              # - "INTERNAL_REDIRECT_INPAGE"
              # - "JAVASCRIPT_INPAGE"
            "A String",
          ],
          "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
            "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
            "value": "A String", # The value of the dimension.
            "dimensionName": "A String", # The name of the dimension.
            "etag": "A String", # The eTag of this response for caching purposes.
            "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
            "id": "A String", # The ID associated with the value if available.
          },
          "interstitialTagFormats": [ # Tag types for interstitial placements.
              #
              # Acceptable values are:
              # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
              # - "INTERNAL_REDIRECT_INTERSTITIAL"
              # - "JAVASCRIPT_INTERSTITIAL"
            "A String",
          ],
          "contactAssignments": [ # Directory site contacts.
            { # Directory Site Contact Assignment
              "contactId": "A String", # ID of this directory site contact. This is a read-only, auto-generated field.
              "visibility": "A String", # Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site.
            },
          ],
          "url": "A String", # URL of this directory site.
          "parentId": "A String", # Parent directory site ID.
          "active": True or False, # Whether this directory site is active.
          "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
          "name": "A String", # Name of this directory site.
        }

`insert(profileId, body)`

    Inserts a new directory site.

    Args:
      profileId: string, User profile ID associated with this request. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
        "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
        "countryId": "A String", # Country ID of this directory site. This is a read-only field.
        "description": "A String", # Description of this directory site. This is a read-only field.
        "settings": { # Directory Site Settings # Directory site settings.
          "nielsenOcrOptOut": True or False, # Whether this directory site has disabled Nielsen OCR reach ratings.
          "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
          "dfp_settings": { # DFP Settings # Directory site DFP settings.
            "publisherPortalOnly": True or False, # Whether this directory site is available only via DoubleClick Publisher Portal.
            "dfp_network_name": "A String", # DFP network name for this directory site.
            "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
            "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
            "dfp_network_code": "A String", # DFP network code for this directory site.
          },
          "verificationTagOptOut": True or False, # Whether this directory site has disabled generation of Verification ins tags.
          "instream_video_placement_accepted": True or False, # Whether this site accepts in-stream video ads.
          "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
          "videoActiveViewOptOut": True or False, # Whether this directory site has disabled active view for in-stream video creatives.
        },
        "currencyId": "A String", # Currency ID of this directory site. This is a read-only field.
            # Possible values are:
            # - "1" for USD
            # - "2" for GBP
            # - "3" for ESP
            # - "4" for SEK
            # - "5" for CAD
            # - "6" for JPY
            # - "7" for DEM
            # - "8" for AUD
            # - "9" for FRF
            # - "10" for ITL
            # - "11" for DKK
            # - "12" for NOK
            # - "13" for FIM
            # - "14" for ZAR
            # - "15" for IEP
            # - "16" for NLG
            # - "17" for EUR
            # - "18" for KRW
            # - "19" for TWD
            # - "20" for SGD
            # - "21" for CNY
            # - "22" for HKD
            # - "23" for NZD
            # - "24" for MYR
            # - "25" for BRL
            # - "26" for PTE
            # - "27" for MXP
            # - "28" for CLP
            # - "29" for TRY
            # - "30" for ARS
            # - "31" for PEN
            # - "32" for ILS
            # - "33" for CHF
            # - "34" for VEF
            # - "35" for COP
            # - "36" for GTQ
            # - "37" for PLN
            # - "39" for INR
            # - "40" for THB
            # - "41" for IDR
            # - "42" for CZK
            # - "43" for RON
            # - "44" for HUF
            # - "45" for RUB
            # - "46" for AED
            # - "47" for BGN
            # - "48" for HRK
            # - "49" for MXN
        "inpageTagFormats": [ # Tag types for regular placements.
            #
            # Acceptable values are:
            # - "STANDARD"
            # - "IFRAME_JAVASCRIPT_INPAGE"
            # - "INTERNAL_REDIRECT_INPAGE"
            # - "JAVASCRIPT_INPAGE"
          "A String",
        ],
        "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
          "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
          "value": "A String", # The value of the dimension.
          "dimensionName": "A String", # The name of the dimension.
          "etag": "A String", # The eTag of this response for caching purposes.
          "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
          "id": "A String", # The ID associated with the value if available.
        },
        "interstitialTagFormats": [ # Tag types for interstitial placements.
            #
            # Acceptable values are:
            # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
            # - "INTERNAL_REDIRECT_INTERSTITIAL"
            # - "JAVASCRIPT_INTERSTITIAL"
          "A String",
        ],
        "contactAssignments": [ # Directory site contacts.
          { # Directory Site Contact Assignment
            "contactId": "A String", # ID of this directory site contact. This is a read-only, auto-generated field.
            "visibility": "A String", # Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site.
          },
        ],
        "url": "A String", # URL of this directory site.
        "parentId": "A String", # Parent directory site ID.
        "active": True or False, # Whether this directory site is active.
        "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
        "name": "A String", # Name of this directory site.
      }

    Returns:
      An object of the form:

        { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
          "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
          "countryId": "A String", # Country ID of this directory site. This is a read-only field.
          "description": "A String", # Description of this directory site. This is a read-only field.
          "settings": { # Directory Site Settings # Directory site settings.
            "nielsenOcrOptOut": True or False, # Whether this directory site has disabled Nielsen OCR reach ratings.
            "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
            "dfp_settings": { # DFP Settings # Directory site DFP settings.
              "publisherPortalOnly": True or False, # Whether this directory site is available only via DoubleClick Publisher Portal.
              "dfp_network_name": "A String", # DFP network name for this directory site.
              "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
              "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
              "dfp_network_code": "A String", # DFP network code for this directory site.
            },
            "verificationTagOptOut": True or False, # Whether this directory site has disabled generation of Verification ins tags.
            "instream_video_placement_accepted": True or False, # Whether this site accepts in-stream video ads.
            "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
            "videoActiveViewOptOut": True or False, # Whether this directory site has disabled active view for in-stream video creatives.
          },
          "currencyId": "A String", # Currency ID of this directory site. This is a read-only field.
              # Possible values are:
              # - "1" for USD
              # - "2" for GBP
              # - "3" for ESP
              # - "4" for SEK
              # - "5" for CAD
              # - "6" for JPY
              # - "7" for DEM
              # - "8" for AUD
              # - "9" for FRF
              # - "10" for ITL
              # - "11" for DKK
              # - "12" for NOK
              # - "13" for FIM
              # - "14" for ZAR
              # - "15" for IEP
              # - "16" for NLG
              # - "17" for EUR
              # - "18" for KRW
              # - "19" for TWD
              # - "20" for SGD
              # - "21" for CNY
              # - "22" for HKD
              # - "23" for NZD
              # - "24" for MYR
              # - "25" for BRL
              # - "26" for PTE
              # - "27" for MXP
              # - "28" for CLP
              # - "29" for TRY
              # - "30" for ARS
              # - "31" for PEN
              # - "32" for ILS
              # - "33" for CHF
              # - "34" for VEF
              # - "35" for COP
              # - "36" for GTQ
              # - "37" for PLN
              # - "39" for INR
              # - "40" for THB
              # - "41" for IDR
              # - "42" for CZK
              # - "43" for RON
              # - "44" for HUF
              # - "45" for RUB
              # - "46" for AED
              # - "47" for BGN
              # - "48" for HRK
              # - "49" for MXN
          "inpageTagFormats": [ # Tag types for regular placements.
              #
              # Acceptable values are:
              # - "STANDARD"
              # - "IFRAME_JAVASCRIPT_INPAGE"
              # - "INTERNAL_REDIRECT_INPAGE"
              # - "JAVASCRIPT_INPAGE"
            "A String",
          ],
          "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
            "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
            "value": "A String", # The value of the dimension.
            "dimensionName": "A String", # The name of the dimension.
            "etag": "A String", # The eTag of this response for caching purposes.
            "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
            "id": "A String", # The ID associated with the value if available.
          },
          "interstitialTagFormats": [ # Tag types for interstitial placements.
              #
              # Acceptable values are:
              # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
              # - "INTERNAL_REDIRECT_INTERSTITIAL"
              # - "JAVASCRIPT_INTERSTITIAL"
            "A String",
          ],
          "contactAssignments": [ # Directory site contacts.
            { # Directory Site Contact Assignment
              "contactId": "A String", # ID of this directory site contact. This is a read-only, auto-generated field.
              "visibility": "A String", # Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site.
            },
          ],
          "url": "A String", # URL of this directory site.
          "parentId": "A String", # Parent directory site ID.
          "active": True or False, # Whether this directory site is active.
          "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
          "name": "A String", # Name of this directory site.
        }

`list(profileId, countryId=None, acceptsInStreamVideoPlacements=None, pageToken=None, sortOrder=None, parentId=None, acceptsPublisherPaidPlacements=None, acceptsInterstitialPlacements=None, maxResults=None, active=None, searchString=None, sortField=None, ids=None, dfp_network_code=None)`

    Retrieves a list of directory sites, possibly filtered. This method supports paging.

    Args:
      profileId: string, User profile ID associated with this request. (required)
      countryId: string, Select only directory sites with this country ID.
      acceptsInStreamVideoPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
      pageToken: string, Value of the nextPageToken from the previous result page.
      sortOrder: string, Order of sorted results.
        Allowed values
          ASCENDING -
          DESCENDING -
      parentId: string, Select only directory sites with this parent ID.
      acceptsPublisherPaidPlacements: boolean, Select only directory sites that accept publisher paid placements. This field can be left blank.
      acceptsInterstitialPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
      maxResults: integer, Maximum number of results to return.
      active: boolean, Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.
      searchString: string, Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply, "directory site".
      sortField: string, Field by which to sort the list.
        Allowed values
          ID -
          NAME -
      ids: string, Select only directory sites with these IDs. (repeated)
      dfp_network_code: string, Select only directory sites with this DFP network code.

    Returns:
      An object of the form:

        { # Directory Site List Response
        "nextPageToken": "A String", # Pagination token to be used for the next list operation.
        "kind": "dfareporting#directorySitesListResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse".
        "directorySites": [ # Directory site collection.
          { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
              "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
              "countryId": "A String", # Country ID of this directory site. This is a read-only field.
              "description": "A String", # Description of this directory site. This is a read-only field.
              "settings": { # Directory Site Settings # Directory site settings.
                "nielsenOcrOptOut": True or False, # Whether this directory site has disabled Nielsen OCR reach ratings.
                "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
                "dfp_settings": { # DFP Settings # Directory site DFP settings.
                  "publisherPortalOnly": True or False, # Whether this directory site is available only via DoubleClick Publisher Portal.
                  "dfp_network_name": "A String", # DFP network name for this directory site.
                  "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
                  "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
                  "dfp_network_code": "A String", # DFP network code for this directory site.
                },
                "verificationTagOptOut": True or False, # Whether this directory site has disabled generation of Verification ins tags.
                "instream_video_placement_accepted": True or False, # Whether this site accepts in-stream video ads.
                "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
                "videoActiveViewOptOut": True or False, # Whether this directory site has disabled active view for in-stream video creatives.
              },
              "currencyId": "A String", # Currency ID of this directory site. This is a read-only field.
                  # Possible values are:
                  # - "1" for USD
                  # - "2" for GBP
                  # - "3" for ESP
                  # - "4" for SEK
                  # - "5" for CAD
                  # - "6" for JPY
                  # - "7" for DEM
                  # - "8" for AUD
                  # - "9" for FRF
                  # - "10" for ITL
                  # - "11" for DKK
                  # - "12" for NOK
                  # - "13" for FIM
                  # - "14" for ZAR
                  # - "15" for IEP
                  # - "16" for NLG
                  # - "17" for EUR
                  # - "18" for KRW
                  # - "19" for TWD
                  # - "20" for SGD
                  # - "21" for CNY
                  # - "22" for HKD
                  # - "23" for NZD
                  # - "24" for MYR
                  # - "25" for BRL
                  # - "26" for PTE
                  # - "27" for MXP
                  # - "28" for CLP
                  # - "29" for TRY
                  # - "30" for ARS
                  # - "31" for PEN
                  # - "32" for ILS
                  # - "33" for CHF
                  # - "34" for VEF
                  # - "35" for COP
                  # - "36" for GTQ
                  # - "37" for PLN
                  # - "39" for INR
                  # - "40" for THB
                  # - "41" for IDR
                  # - "42" for CZK
                  # - "43" for RON
                  # - "44" for HUF
                  # - "45" for RUB
                  # - "46" for AED
                  # - "47" for BGN
                  # - "48" for HRK
                  # - "49" for MXN
              "inpageTagFormats": [ # Tag types for regular placements.
                  #
                  # Acceptable values are:
                  # - "STANDARD"
                  # - "IFRAME_JAVASCRIPT_INPAGE"
                  # - "INTERNAL_REDIRECT_INPAGE"
                  # - "JAVASCRIPT_INPAGE"
                "A String",
              ],
              "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
                "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
                "value": "A String", # The value of the dimension.
                "dimensionName": "A String", # The name of the dimension.
                "etag": "A String", # The eTag of this response for caching purposes.
                "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
                "id": "A String", # The ID associated with the value if available.
              },
              "interstitialTagFormats": [ # Tag types for interstitial placements.
                  #
                  # Acceptable values are:
                  # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
                  # - "INTERNAL_REDIRECT_INTERSTITIAL"
                  # - "JAVASCRIPT_INTERSTITIAL"
                "A String",
              ],
              "contactAssignments": [ # Directory site contacts.
                { # Directory Site Contact Assignment
                  "contactId": "A String", # ID of this directory site contact. This is a read-only, auto-generated field.
                  "visibility": "A String", # Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site.
                },
              ],
              "url": "A String", # URL of this directory site.
              "parentId": "A String", # Parent directory site ID.
              "active": True or False, # Whether this directory site is active.
              "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
              "name": "A String", # Name of this directory site.
            },
        ],
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.