info
POST /API/v2/info
Provides information about a particular slicer. This information includes the list of available key and data fields, as well as their descriptions. See example.
Request body¶
slicer_name: the name of the report.project_name: the name of the project.
Response¶
status: the status of the request.success, if the request was processed successfully, or error code, if any error occurred. If the status is notsuccess**, then the response contains thestatusandreasonfields only. Possible values:success: the request was processed successfully.bad_request: invalid request parameters, please see thereasonfield for more details.timeout: the request took too long to complete.access_error: the user doesn't have access to the specified project/slicer, or a wrong token was used.internal_error: the request failed due to an unknown problem.
-
reason: user-friendly description of the occurred error. This field is displayed for failed requests only. -
annotation: slicer annotation. Possible values:null(if no annotation exists for the slicer specified by theslicer_namePOST argument).annotation text(if any annotation exists for the slicer specified by theslicer_namePOST argument).
key_fields: the list of key fields available for the report specified by theproject_nameandslicer_namePOST arguments.name: key field name.aliases: the list of all aliases for the key field name.description: key field full name.type: key field type. Possible values:intandtext.mapping: key field mapping ornull(if key field mapping doesn't exist).is_segmented: key field segmentation sign. Possible values:1: the field is segmented.0: the field is not segmented.
data_fields: the list of data fields available for the report specified by theproject_nameandslicer_namePOST arguments.name: data field name.aliases: the list of all aliases for the data field name.description: data field full name.type: data field type, eitherint,float, orpercentdisplay_precision: default precision for visual display.is_optional: defines data field display importance. Possible values:1- data field display is optional (the data field is not displayed in UI when the Slicer is initially opened, but it can be added later),0- data field display is required (the data field is displayed in UI when the Slicer is initially opened).show_percent: defines whether to show percent column in the user interface. Possible values:0- don’t show percent,1- show percent only when sorting by the field,2- always show percent.formula: data field formula. Possible values:nullfor common data fields, data field calculation logic for derived fields.formula_description: data field formula description. Possible values:nullfor common data fields, data field formula description for derived data fields.access: access permission. Possible values:null/shared/private.nullvalue is set for common data fields only.shared/privatevalues are set for custom data fields only.sharedvalue means that the custom data column is available for all users.privatevalue means that the custom data column is available for its creator only.display_pattern: display pattern for the data column. Possible values: null for common data columns andany_characters{}any_charactersfor custom data columns, where{}represents custom data column value.is_currency: Indicates whether the field represents a currency value.
Currency fields are eligible for currency conversion in thequery,exportortime_seriesmethods. For calculated fields defined by formulas, this property is derived automatically: if at least one operand in the formula is a currency field, the resulting calculated field is also marked as a currency field. For example, ifrevenueis a currency, then(revenue / imps) * 1000will become currency as well.
timezone: default slicer time zone.supports_timezone: time zone support sign.Possible values:1: time zone is supported,0: time zone is not supported.first_date: thefirstdate with available data for the slicer specified by theslicer_namePOST argument. Format:YYYY-MM-DD.last_date: thelastdate with available data for the slicer specified by theslicer_namePOST argument. Format:YYYY-MM-DD.additional_info: the dictionary with additional information about the slicer specified by theproject_nameandslicer_namePOST arguments.slicer_id: theidof the slicer specified by theproject_nameandslicer_namePOST arguments.project_limited: the maximum number of simultaneous connections from the user interface. Possible values: any integer number from0to MAX_INT32.api_limited: the maximum number of simultaneous connections from the API. Possible values: any integer number from0toMAX_INT32. Used for bots only.tracking: defines whether a customized logo is used. Possible values:0- a customized logo is used,1- no customized logo is used.show_audience: defines whether to showAudiencein the user interface. Possible values:0- don’t showAudience,1- showAudience.autocomplete: defines whether to autocomplete key field names in filters. Possible values:0- don’t autocomplete,1- autocomplete.
has_microsoft_token: defines whether a Microsoft token exists. This token is used for exporting reports to OneDrive. Possible values:false- Microsoft token doesn't exist,true- Microsoft token exists.default_currency: The ISO 4217 currency code representing the default currency of the dataset. May benullif currency conversion is not enabled.available_currencies: An array of ISO 4217 currency codes representing all supported target currencies for conversion. This list defines the set of currencies available for use with thecurrency_conversionparameter inquery,exportortime_seriesmethods.
Example¶
Get the list of key and data fields (with their descriptions)available for the Traffic Demo slicer of the demo project.
Path:
https://uslicer.iponweb.com/API/v2/info
Request
{
"slicer_name": "Traffic Demo",
"project_name": "demo",
}
curl --data '{
"slicer_name": "Traffic Demo",
"project_name": "demo",
}' \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>" \
"https://uslicer.iponweb.com/API/v2/info"
Response
{
"key_fields" : [
{
"description" : "Campaign ID",
"type" : "int",
"name" : "campaign_id",
"is_segmented" : 0
},
{
"description" : "Creative ID",
"type" : "int",
"name" : "creative_id",
"is_segmented" : 0
},
{
"name" : "conversion_id",
"is_segmented" : 0,
"description" : "Conversion ID",
"type" : "int"
},
{
"name" : "size",
"is_segmented" : 0,
"description" : "Size",
"type" : "text"
},
{
"name" : "geo_country",
"is_segmented" : 0,
"description" : "Geo Country",
"type" : "text"
},
{
"description" : "Geo Region",
"type" : "text",
"name" : "geo_region",
"is_segmented" : 0
},
{
"type" : "text",
"description" : "Geo City",
"is_segmented" : 0,
"name" : "geo_city"
},
{
"description" : "Geo Dma",
"type" : "int",
"name" : "geo_dma",
"is_segmented" : 0
},
{
"name" : "geo_zip",
"is_segmented" : 0,
"description" : "Geo Zip",
"type" : "text"
},
{
"name" : "browser",
"is_segmented" : 0,
"description" : "Browser",
"type" : "text"
},
{
"name" : "operating_system",
"is_segmented" : 0,
"description" : "Operating System",
"type" : "text"
},
{
"name" : "google_main_vertical",
"is_segmented" : 0,
"description" : "Google Main Vertical",
"type" : "int"
},
{
"name" : "language",
"is_segmented" : 0,
"description" : "Language",
"type" : "text"
},
{
"description" : "Slot Visibility",
"type" : "text",
"name" : "slot_visibility",
"is_segmented" : 0
},
{
"link" : "domain",
"name" : "domain",
"is_segmented" : 0,
"description" : "Domain",
"type" : "text"
},
{
"description" : "Segments",
"type" : "int",
"name" : "segments",
"is_segmented" : 1
},
{
"type" : "text",
"description" : "Year",
"is_segmented" : 0,
"name" : "granularity_year"
},
{
"name" : "granularity_quarter",
"is_segmented" : 0,
"description" : "Quarter",
"type" : "text"
},
{
"name" : "granularity_month",
"is_segmented" : 0,
"description" : "Month",
"type" : "text"
},
{
"type" : "text",
"description" : "Week",
"is_segmented" : 0,
"name" : "granularity_week"
},
{
"is_segmented" : 0,
"name" : "granularity_day",
"type" : "text",
"description" : "Day"
}
],
"timezone" : 0,
"first_date" : "2012-02-01",
"status" : "success",
"last_date" : "2012-03-31",
"annotation" : null,
"data_fields" : [
{
"display_type" : "int",
"show_percents" : 2,
"display_precision" : 0,
"is_optional" : 0,
"access" : null,
"description" : "Impressions",
"formula" : null,
"name" : "imps",
"formula_description" : null
},
{
"formula" : null,
"description" : "Bids",
"access" : null,
"formula_description" : null,
"name" : "bids",
"display_type" : "int",
"is_optional" : 0,
"display_precision" : 0,
"show_percents" : 2
},
{
"access" : null,
"description" : "Clicks",
"formula" : null,
"name" : "clicks",
"formula_description" : null,
"display_type" : "int",
"show_percents" : 1,
"display_precision" : 0,
"is_optional" : 0
},
{
"show_percents" : 0,
"display_precision" : 3,
"is_optional" : 0,
"display_type" : "percent",
"name" : "ctr",
"formula_description" : "clicks / imps",
"description" : "CTR",
"formula" : "clicks / imps",
"access" : null
},
{
"display_type" : "int",
"display_precision" : 0,
"show_percents" : 1,
"is_optional" : 0,
"description" : "PVC",
"access" : null,
"formula" : null,
"name" : "pvc",
"formula_description" : null
},
{
"formula_description" : null,
"name" : "pcc",
"access" : null,
"description" : "PCC",
"formula" : null,
"is_optional" : 0,
"display_precision" : 0,
"show_percents" : 1,
"display_type" : "int"
},
{
"description" : "Win Bid CPM",
"formula" : "winner_bid_price / imps * 1000",
"access" : null,
"name" : "win_bid_shown",
"formula_description" : "winner_bid_price / imps * 1000",
"display_type" : "float",
"display_precision" : 2,
"show_percents" : 0,
"is_optional" : 0
},
{
"name" : "pub_payout",
"formula_description" : null,
"description" : "Cost",
"access" : null,
"formula" : null,
"show_percents" : 1,
"display_precision" : 2,
"is_optional" : 0,
"display_type" : "float"
},
{
"display_type" : "float",
"show_percents" : 0,
"display_precision" : 3,
"is_optional" : 0,
"description" : "eCPM",
"access" : null,
"formula" : "pub_payout / imps * 1000",
"name" : "ecpm",
"formula_description" : "pub_payout / imps * 1000"
},
{
"is_optional" : 0,
"display_precision" : 3,
"show_percents" : 0,
"display_type" : "float",
"formula_description" : "pub_payout / clicks",
"name" : "ecpc",
"description" : "eCPC",
"formula" : "pub_payout / clicks",
"access" : null
},
{
"display_type" : "int",
"show_percents" : 0,
"display_precision" : 0,
"is_optional" : 1,
"description" : "country",
"access" : "private",
"formula" : "map(test_mapping)",
"name" : "custom_column_8565",
"formula_description" : "map(test_mapping)"
}
],
"supports_timezone" : 0
}