Application Programming Interface (API)
-
API - Frequently Asked Questions
Overview What is an API? API is the acronym for Application Programming Interface, which is a computing term for a set of functions and procedures that one system – typically a software application or web service – can use to access features or data in another system. Essentially, APIs allow systems to talk to each other. What type is the API? It is a RESTful API. Is there any additional cost for the OE API service? Yes, there is. Please get in touch with your account manager to find out more information. Can I access all databanks I have already subscribed to? Yes. The API will provide access to all online databanks you have subscribed to. How many users can use it? A single technical account is used for your organisation and thus is not user-specific. However, please note that having an API doesn’t change the terms of your subscription agreement regarding the number of authorised users nor the permitted usage of the data. Please refer to your subscription agreement or contact your account manager if you are in doubt about your organisation’s subscription terms. Can I have a trial on Databank API? Yes, you can ask for a trial to explore our API and verify if it meets your needs before subscribing to the service. Please get in touch with your Account Manager to find out more information. Using the API Can I connect to OE API from third-party software, e.g. Tableau and Microsoft Power BI? Yes, you can. PowerBI has a native feature to connect to API, Tableau however requires to build a custom connector application on clients side. You can see our Power BI guide on connecting to our API. Additionally, you may explore the Power BI sample report on our Github repository What programming language should I use to be able to communicate with OE API? You can use any programming language capable of making HTTP requests. We have examples in various programming languages in our GitHub repository. What is the format of the response? The data are returned in JSON format. However, there are API endpoints where you can get the data in CSV or XLSX flat files. Can I get the reports via the API? No. This API service is for the Global Data Workstation. If you are interested in retrieving reports, please ask your Account Manager about our Report Feeds service. Can I get the data from the OE model applications (GMW or/and GMWO) via the API? No. This API service is for the Global Data Workstation. Can we request the data of the entire databank? Yes, you can. However, if you need to download the entire databank at once, you need to use paging. You may find all the details, page limits, and examples here. Are there limitations on how many requests we can make per day? There are no limits on the number of requests you can make per day. However, to prevent abuse and keep the service fast and accessible to everyone, there is a soft rate limit of 60 requests per minute. A delay will be imposed on subsequent requests if this limit is reached. Please see our detailed guide on rate limits. How do I know if a dataset is updated or not? Each data series contains a metadata value called “Date of last update”, which includes the data that this data series was updated. If the date does not match the date on your previous request, it has been updated. How frequently are the databanks updated? Oxford Economics offers a large variety of databanks that are updated at various frequencies (twice per month, monthly, quarterly or annually). Please ask your account manager about the update frequency on the databanks you have subscribed to. Are the data returned from the API the same as what we can view on the databank website? Yes. The data you can retrieve from the API is exactly the same as the ones on the website.
-
The latest updates for the Excel Data Workstation V3
Overview The software development team at Oxford Economics is continually working to bring better performance and new features to the Excel Data Workstation. Whether you’ve been holding on to Version 2 or haven’t updated since last month, there should be something new for you among our latest updates. Click here to download the latest plugin The latest updates: GMW Online connectivity: This new service includes a custom browser for online model databases. Built-in Excel dashboards: Available for the Global Economics Model, Global Economics Databank, Global Scenarios Service Databank, and Global Industry Databank. Access control: All functions in the add-in are enabled based on user subscription. New look and feel: An extensive ribbon makeover, speed improvements and careful handling of errors provides a more intuitive and better user experience overall. In case you missed these previous updates: Direct model database connectivity, retrieval can include residuals, stacked quarters layout, and multiple measurements Direct export of sheet data to local model databases and Eviews A browser for viewing the latest analysis from Oxford Economics from within Excel New scripting commands, including the ability to automate direct model database connections Improved high quality charts Saved selections now available from Global Data Workstation V2. With that, you can leverage its unique features like currency conversions, year re-basing, and cross-databank series. New export formats. In addition to being able to export to local model bases on your computer, you can transform your worksheet data into Eviews formats as well as Oxford Economics’ toolkit style. Transpose data. Much like the Toggle Fold feature in previous versions of the Excel Data Workstation, Transpose allows you to reshape your worksheet data to and from columnar format. For those who prefer the output from the Global Model Workstation, this matches that style. Post-pull commands. Previously, your Excel Data Workstation-enabled workbooks were refreshed simply with new data. Now you can customize these as you see fit, adding from among transpose, fold, and a few export formats to automatically reshape your data on refresh. Customers must have a subscription to one or more of the following products/services to take advantage of the facilities in Excel Data Workstation: Global Data Workstation Global Model Workstation Download Download the latest EXE installer file by clicking the link below: https://tools.oxfordeconomics.com/ExcelPlugin/Downloads.aspx Installation Follow the instructions below to download and install the latest version of the Excel Data Workstation. Once installed, an Oxford Economics menu item will appear in Microsoft Excel. Click on this menu to show a ribbon holding a number of functions, as shown in the figure following. Prerequisites Microsoft Windows versions greater than Windows XP (i.e. will not work in Windows XP) Microsoft Excel 2007 | 2010 | 2013 | 2016 (64-bit recommended) An active internet connection to use the online Global Data Workstation Remove or disable all older versions of the Excel Data Workstation Instructions To begin, first ensure you meet all of the prerequisites listed above. Especially, check that all earlier versions (prior to version 3) of the Excel Data Workstation are removed or disabled. If not, please go into Add/Remove Programs find the Oxford Economics Excel Data Workstation, and uninstall. Next, extract the .XLL files from your download, select and double click the version corresponding to your version of Excel (i.e. either 64- or 32-bit), and Excel will open with the Oxford Economics menu loaded. You will be prompted to load the plug-in automatically. To configure Global Model Workstation Online (GMWO) data source, you need to configure the GMWO data source API url. To do so, please go to General > Options > Configure Data Sources, and paste your dedicated API url in the “URL” text box and press the “OK” button. We recommend you mouse over the controls to read the fairly detailed tooltips provided. This is a good way to get an idea of the features available quickly. Mondrian Dashboards v4 & v5 You can access pre-built Excel dashboards in our Excel add-in or you can download them from here. Dashboards available for both annual and quarterly data series. Dashboards cover all locations and 36 indicators in all measurements. Reproduces all the built-in dashboards of the new Global Model Workstation and Global Data Workstation: Forecast/Scenario Overview GDP and its components Inflation and its determinants Trade and balance of payments Labour market (Documentation for v4 Mondrian dashboards is the same as v3, which can be found here.) Training Videos User Guide The user guide is available in Excel Data Workstation by clicking on General > Options. The version number of the user guide distributed with EDW is consistent with the installed version of the add-in.
-
API Databank – Python GET request to retrieve a saved selection
Code Example Useful Information The id of the saved selection can be found by sending a GET request to endpoint /users/me and looking through the response containing all ids of the saved selections under your account. Make sure to indicate the selection id on the URL of the request and indicate your API-Key in the header of the request. This code example sends a GET request to /download/selection_id endpoint.
-
API Databank – Python POST request with customized request body
Code Example Useful Information This Python example sends a POST request to /download endpoint and indicates to include the metadata. Make sure to paste your API key in the field marked as API-Key in the header of the request. The json selection in the body can be adjusted based on data you are looking to retrieve.
-
API Databank – Saved selection to PowerBI
Open Swagger by accessing following path – https://services.oxfordeconomics.com/Swagger Click on /Users directory. In the dropdown, click on GET /api/users/{id} option. Next to id parameter, in the value column, type “me”. Once done, click on Try it out! button. The new sections will appear. In the Response Body section, find “SavedSelection” part, which contain the information on every saved selection in databank under your account. Copy id of a saved selection you wish to access. In PowerBI new project, click on button Get data and chose the Web option. If Web option is not available please select More… option, a new window will pop-up, please select Web option under Other tab. Select Advanced tab Fill the first URL part line with https://services.oxfordeconomics.com/api/download/ Second line must be filled with the id you copied in step 3 (Saved Selection Id) Third line contains ?includeMetadata=true text. Finally for header parameters, you would have to type them manually as drop down menu will not give you options we are looking for. Copy Method and (e) Content-Type parameters just as they are on image. For Api-Key parameter, you would have to paste the API access key previously provided to you or you can find it in step 3 as ApiKey. Click Ok once all ready. If you are connecting to API from Power BI for the first time, following window will pop-up. Please proceed by clicking Connect, so we can set up anonymous access. Finally, PowerQuery editor should open up with the established connection to saved selection table Click File -> Close & Apply The saved data should now be available under the Data tab
-
API Databank – Downloading Entire Databanks
In most circumstances, narrowly-defined selections are the best and quickest method to download data with the API. However, in some cases it may be necessary to fetch everything all at once. The way to do this is nearly identical to any other download but for the following two conditions: The Regions and Variables fields in the selection dictionary are assigned empty lists (see example below). There is a hard upper limit on the number of rows of data that can be downloaded in a given page. In fact, if employing the method described in this section, we recommend using a page size of 5000 – 20000 rows. A simple example Python implementation using a custom selection: # # Copyright (c) 2022 Oxford Economics Ltd. All rights reserved. # Licensed under the MIT License. See LICENSE file in the # project root for full license information. # import json import requests API_KEY = # insert api key BASE_URL = ‘https://services.oxfordeconomics.com’ sample_selection = { ‘DatabankCode’: ‘WDMacro’, ‘Frequency’: ‘Annual’, ‘GroupingMode’: ‘false’, ‘IndicatorSortOrder’: ‘AlphabeticalOrder’, ‘IsTemporarySelection’: ‘true’, ‘ListingType’: ‘Private’, ‘LocationSortOrder’: ‘AlphabeticalOrder’, ‘Order’: ‘IndicatorLocation’, ‘Sequence’: ‘EarliestToLatest’, ‘StackedQuarters’: ‘false’, ‘StartYear’: 1980, ‘EndYear’: 2045, # note: the fields below have been assigned empty lists ‘Regions’: [ ], ‘Variables’: [ ] } def databank_download(selection_dictionary): headers = {‘Accept’: ‘application/json’, ‘Api-Key’: API_KEY, ‘Content-Type’: ‘application/json; charset=utf8’ } def _download_url(base_url, page, pagesize): url = base_url + ‘/api/download?includemetadata=true’ return url + ‘&page={1}+&pagesize={2}’.format(base_url, page, page_size) page = 0 page_size = 5000 data = None while True: # note: _download_url returns a link of the form # ../api/download?includemetadata=true&page={page}+&page_size={page_size} response = requests.post(_download_url(BASE_URL, page, page_size), headers=headers, data=json.dumps(selection_dictionary)) new_data = response.json() page += 1 if data is None: data = new_data else: data.extend(new_data) if len(new_data) < page_size: break return data if __name__ == ‘__main__’: data = databank_download(sample_selection) data_file = open(‘data_file.tmp’, ‘w’) json.dump(data, data_file) A more advanced example Python implementation, using a saved selection ID: # # Copyright (c) 2017 Oxford Economics Ltd. All rights reserved. # Licensed under the MIT License. See LICENSE file in the # project root for full license information. # import sys import json import requests import time # WARNING: In production these values should be provided via environment or command line args API_KEY = ‘<>’ SELECTION = {‘ID’: ‘<>’, ‘NAME’: ‘<>’} PAGE_SIZE = 20000 # set to number of records per page (20k is the max allowed by API) MAX_PAGES = None # set to None for as many pages as possible CHECKPOINT = 5 # checkpoint (save) after this many pages def databank_download(f, selection_id, show_progress=True): BASE_URL = ‘https://services.oxfordeconomics.com’ INCLUDE_METADATA=’false’ # or set = ‘true’ headers = { ‘Accept’: ‘application/json’, ‘Api-Key’: API_KEY, ‘Content-Type’: ‘application/json; charset=utf8’ } def _download_url(base_url, page, pagesize): return f'{base_url}/api/download/{selection_id}?includemetadata={INCLUDE_METADATA}&page={page}&pagesize={page_size}’ page = 0 page_size = PAGE_SIZE max_pages = MAX_PAGES data = None api_request_time_total = 0.0 disk_write_time_total = 0.0 while True: # download selection_id with some escalating wait retry logic max_retries = 5 retries = 0 while retries < max_retries: try: start = time.time() response = requests.get(_download_url(BASE_URL, page, page_size), headers=headers) end = time.time() api_request_time_total += (end – start) break except ConnectionError as msg: print(f’ConnectionError Exception!\n{msg}’) retries += 1 print(f’Waiting to retry ({retries}/5) in {retries*5} seconds…\n{msg}’) time.sleep(retries*5) pass except TimeoutError as msg: print(f’ConnectionError Exception!\n{msg}’) retries += 1 print(f’Waiting to retry ({retries}/5) in {retries*5} seconds…\n{msg}’) time.sleep(retries*5) pass except Exception as msg: print(f’Exception!\n{msg}’) raise RuntimeError(‘Something bad happened!’) if retries == max_retries: return page, api_request_time_total, disk_write_time_total page_data = response.json() page += 1 if show_progress: sys.stdout.write(‘#’) sys.stdout.flush() # accumulate data if data is None: data = page_data else: data.extend(page_data) # dump to file every so many pages if page % CHECKPOINT == 0 and data != None: sys.stdout.write(‘+’) sys.stdout.flush() start = time.time() json.dump(data, f) end = time.time() disk_write_time_total += (end – start) data = None # get all pages or limit to max_pages if max_pages == None: pass elif page == max_pages: break # have we got to the end if len(page_data) < page_size: break # dump the last chunk of data, if any if not data is None: start = time.time() json.dump(data, f) end = time.time() disk_write_time_total += (end – start) return page, api_request_time_total, disk_write_time_total if __name__ == ‘__main__’: SELECTION_ID = SELECTION[‘ID’] DATA_FILE = SELECTION[‘NAME’] + ‘.tmp’ start = time.asctime(time.localtime(time.time())) print(f’Started @ {start} | DATA_FILE={DATA_FILE}, PAGE_SIZE={PAGE_SIZE}, MAX_PAGES={MAX_PAGES}, CHECKPOINT={CHECKPOINT}’) with open(DATA_FILE, ‘w’) as f: pages, api_request_time_total, disk_write_time_total = databank_download(f, SELECTION_ID) end = time.asctime(time.localtime(time.time())) print(f’\nCOMPLETE! Downloaded {pages} pages’) print(f’Started @ {start}’) print(f’Ended @ {end}’) print(‘Total API Request Time: %.1f secs, %.1f mins’ % (api_request_time_total, api_request_time_total/60)) print(‘Total Disk Write Time: %.1f secs, %.1f mins’ % (disk_write_time_total, disk_write_time_total/60)) ”’ Please note: If you’re using vscode to develop/debug this program and it encounters an SSL error, then do the following: # mklink “\Anaconda3\DLLs\libcrypto-1_1-x64.dll” “\Anaconda3\Library\bin\libcrypto-1_1-x64.dll” # mklink “\Anaconda3\DLLs\libssl-1_1-x64.dll” “\Anaconda3\Library\bin\libssl-1_1-x64.dll” You can also physically copy them over. The exception you may see will be something like this: # HTTPSConnectionPool(host=’services.oxfordeconomics.com’, port=443): # Max retries exceeded with url: /api/download/…?includemetadata=false&page=0+&pagesize=2000 # (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”))
-
API Databank – Redirects and CORS restrictions
The File Download and Queue Download endpoints employ a redirect response to indicate successful completion and to pass along the newly generated download URL. Any client-side API call must expose this redirect URL (i.e. the download URL). However, in many web browsers this is will not be possible because of CORS restrictions. Therefore, setting up an intermediary application is necessary to make these calls and forward along the redirect URL. In our example code, we have included a simple Webtask script (js/file-download.js) to indicate one way this can be done. Webtasks are one method for launching simple, lightweight web applications like this, so your code can run remotely without the need to configure server hardware or software. This particular framework uses Javascript and a wide range of NPM modules. More on Webtasks at https://webtask.io/. var request = require(‘request@2.67.0’) API_URL = ‘https://services.oxfordeconomics.com’; // this function takes a saved selection id and makes a GET // request to the filedownload endpoint, forwarding the download // url, which appears as the redirect location in the response headers // from the api // // note: request headers and body are accessible via the context // object e.g. context.data.*, context.headers.* and the response // data is simply handed off to the callback function. in this // case we’re returning the redirect url as plain text module.exports = function (context, callback) { var api_url = API_URL + ‘/api/filedownload’; var api_key = context.data.api_key; var api_resource_id = context.data.api_resource_id || “”; if (!api_resource_id || !api_key) { callback(400, null); } else { api_resource_id = “/” + api_resource_id; var options = { method: ‘GET’, followRedirect: false, uri: api_url + api_resource_id, headers: { ‘Api-Key’: api_key } }; request(options, function(error, response, body) { if (response.statusCode >= 300 && response.statusCode < 400) { callback(null, response.headers.location); } else { callback(response.statusCode, error); } }); }
-
API Databank – Conventions and Limits
Conventions The following list describes common conventions used by our API and should help to inform the construction of valid HTTP requests: The ending/character can be included or omitted as preferred from the request URL. For example: GET https://services.oxfordeconomics.com/api/databank is functionally the same as… GET https://services.oxfordeconomics.com/api/databank/. URL paths are not case sensitive. Field names (i.e. in request queries or bodies) are case sensitive. For example: GET /api/tree/Locations_{id} might be a valid URL provided an ID is inserted. However, GET /api/tree/locations_{id} (note the lower-case “L”) would be invalid. Field names use PascalCase. I.e. the first letter of each word is capitalized, including for the first word, and there are no spaces or underscores. Success or failure of an API call is indicated by the HTTP status. For example, an error response of 404 page not found might indicate that a selection could not be found with the ID provided. 200 OK is returned following successful requests. Query and body parameters that are included unnecessarily are ignored. Rate limits The Global Data Workstation imposes rate limits in order to prevent abuse and keep the service fast and accessible to everyone. Currently, it doesn’t impose a hard limit. I.e. there is no policy that will drop API requests after a certain limit is reached. However, this is subject to change, in which case requests made beyond this threshold will be rejected with a 503 Service Unavailable HTTP status. We do employ a soft limit, which is currently around 60 requests per minute. If this limit has been reached, then a delay will be imposed on subsequent requests in order to bring down the number of requests into the rate limit window. Please note: this rate is not guaranteed and may fluctuate with server load. The following HTTP headers are included in every API response: Rate-Limit-60: Unthrottled Rate-Limit-60-Status: Unthrottled Rate-Limit-60-Window: 60 Rate-Limit-60-RequestCount: 0 Rate-Limit-60-RequestLimit: 60 Page limits The Global Data Workstation limits the maximum number of data rows returned in a single API call to 20,000. To retrieve more data than this, you will need to use paging. See below on ‘Downloading entire databanks’. Authorisation and variables access Each API key is authenticated by an organisation’s subscription and provides access only to databanks and variables authorised in the subscription. Any attempt to circumvent this authorisation and/or use another organisation’s API key will be in breach of the terms and conditions of your subscription contract. The API does not return data for unauthorised variable requests, and it is throttled to prevent abuse and protect the main service.
-
API Databank – Key Response Dictionaries
Note that for the purpose of describing these dictionaries, the ( and ) characters indicate a choice and should be omitted in practice. For example, format: (“csv”, “excel”) indicates a choice between the strings csv and excel, so in practice this might look like format: “csv” or format: “excel”. In contrast, the [ and ] characters indicate an array and must not be omitted. Download [ { DatabankCode: string, ProducTypeCode: string, LocationCode: string, VariableCode: string, MeasureCode: see measure codes, AnnualData: { YYYY: float, YYYY: float, YYYY: float, … }, QuarterlyData: { YYYYQQ: float, YYYYQQ: float, YYYYQQ: float, … } } ] Selection This is the same as the selection dictionary in the request body. However, the response version always includes fields that are otherwise optional in the request. These include: LastUpdate, ContactId, ShareCodeId, and IsDataFeed. User { ContactId: string, CompanyId: string, UserName: string, ApiKey: string, Email: string, Title: string, LastName: string, FirstName: string, CompanyName: string, IsTrialist: string, IsLockedOut: string, Roles: [string], SavedSelections: [ { Id: string, Name: string, Url: string } ] } Measure codes Several of these request and response objects have a MeasureCode field. This value describes how the annual data is represented. The available options are: L – Level values PY – Percentage difference year over year DY – Difference year over year P – Percentage difference quarter over quarter D – Difference quarter over quarter GR – Annualised growth rate
-
API Databank – Key Request Dictionaries and Request Header
Note that for the purpose of describing these dictionaries, the ( and ) characters indicate a choice and should be omitted in practice. For example, format: (“csv”, “excel”) indicates a choice between the strings csv and excel, so in practice this might look like format: “csv” or format: “excel”. In contrast, the [ and ] characters indicate an array and must not be omitted. Request Header HTTP requests to the API require two headers be set: api-key, which should be set to the user’s API key, and content-type, which is typically “application/json”. Example request, indicating proper HTTP headers: curl --request GET --url \ https://services.oxfordeconomics.com/api/databank \ --header 'api-key: {{api_key}}' \ --header 'content-type: application/json' Controller Controller layout: { format: ("csv", "excel"), name: string, selections: [selection id] } Example controller: { format: "csv", name: "GDP$ USA, GBR 2016-21", selections: ["cc0547f1-4600-4ace-88a0-d86876508a15"] } Selection Selection layout: { Id: string, Name: string, DatabankCode: string, MeasureCode: see measure codes, StartYear: int, EndYear: int, StackedQuarters: ("true", "false"), Frequency: ("Annual", "Quarterly", "Both"), GroupingMode: ("true", "false"), IndicatorSortOrder: ("AlphabeticalOrder", "TreeOrder"), IsDatafeed: ("true", "false"), IsTemporarySelection: ("true", "false"), LegacyDatafeedFileStructure: ("true", "false"), ListingType: ("Hidden", "Private", "Company", "Public", "Shared"), LocationSortOrder: ("AlphabeticalOrder", "TreeOrder"), Order: ("IndicatorLocation", "LocationIndicator"), Regions: [ { DatabankCode: string, RegionCode: string } ] Variables: [ { ProductTypeCode: string, VariableCode: string, MeasureCodes: [see measure codes] } ] } Example selection: { DownloadUrl: "/api/download/46bbd06a-5bf2-4278-b96f-037f15e2f256", Id: "46bbd06a-5bf2-4278-b96f-037f15e2f256", SelectionType: "QuerySelection", MeasureCode: "L", IsTemporarySelection: false, LastUpdate: "2017-05-08T18:51:54.363", DatabankCode: "WDMacro", Sequence: "EarliestToLatest", GroupingMode: false, TransposeColumns: null, Order: "IndicatorLocation", IndicatorSortOrder: "AlphabeticalOrder", LocationSortOrder: "AlphabeticalOrder", SortedColumnName: null, SortedColumnOrder: null, Format: 0, LegacyDatafeedFileStructure: false, Variables: [ { VariableCode: "CPI", ProductTypeCode: "WMC", MeasureCodes: [ "L" ] }, { VariableCode: "GDP$", ProductTypeCode: "WMC", MeasureCodes: [ "L", "PY", "DY" ] } ], Regions: [ { DatabankCode: "WDMacro", RegionCode: "GBR" }, { DatabankCode: "WDMacro", RegionCode: "USA" } ], ShareCodeId: null, ListingType: "Private", IsDatafeed: false, Name: "Selection - (Updated 2017/05/09)", StartYear: 2015, EndYear: 2021, Frequency: "Annual", StackedQuarters: false } DownloadUrl: "/api/download/46bbd06a-5bf2-4278-b96f-037f15e2f256", Id: "46bbd06a-5bf2-4278-b96f-037f15e2f256", SelectionType: "QuerySelection", MeasureCode: "L", IsTemporarySelection: false, LastUpdate: "2017-05-08T18:51:54.363", DatabankCode: "WDMacro", Sequence: "EarliestToLatest", GroupingMode: false, TransposeColumns: null, Order: "IndicatorLocation", IndicatorSortOrder: "AlphabeticalOrder", LocationSortOrder: "AlphabeticalOrder", SortedColumnName: null, SortedColumnOrder: null, Format: 0, LegacyDatafeedFileStructure: false, Variables: [ { VariableCode: "CPI", ProductTypeCode: "WMC", MeasureCodes: [ "L" ] }, { VariableCode: "GDP$", ProductTypeCode: "WMC", MeasureCodes: [ "L", "PY", "DY" ] } ], Regions: [ { DatabankCode: "WDMacro", RegionCode: "GBR" }, { DatabankCode: "WDMacro", RegionCode: "USA" } ], ShareCodeId: null, ListingType: "Private", IsDatafeed: false, Name: "Selection - (Updated 2017/05/09)", StartYear: 2015, EndYear: 2021, Frequency: "Annual", StackedQuarters: false Shape configuration Shape configuration layout: { Pivot: ("true", "false"), StackedQuarters: ("true", "false"), Frequency: ("annual", "quarterly", "both") } Example shape configuration: { Pivot: ("true", "false"), StackedQuarters: ("true", "false"), Frequency: "both" } User credentials User credentials layout: { Username: string, Password: string } Example credentials: { Username: name@example.com, Password: example_password } Measure codes Several of these request and response objects have a MeasureCode field. This value describes how the annual data is represented. The available options are: L – Level values PY – Percentage difference year over year DY – Difference year over year P – Percentage difference quarter over quarter D – Difference quarter over quarter GR – Annualized growth rate