What is HIVE Analytics Log retrieval API?

This is a function to query data collected in HIVE Analytics Big Query through API.
Reference: Analytics Behavior Structure

Preparation

In order to use Data Search OpenAPI, you must complete an application to use OpenAPI by going to the HIVE Console → Analytics → Log Definition menu.
For logs that have been requested, an AccessKey and a SecondAccessKey are issued that allow you to search the log.
AccessKey and SecondAccessKey operate the same way, and SecondAccessKey is an additionally issued key to be used when problems occur with operating the AccessKey.
※ AccessKey and SecondAccessKey are private keys, so please ensure that they are never exposed to the outside.
※ If AccessKey or SecondAccessKey is exposed, it must be renewed or discarded immediately.

  • How to apply to use the Log retrieval API
    In the Log Definition menu, select the game for which you want to receive an AccessKey and click on the log name for which you want to proceed with to enter the details page.
    After clicking the “Apply to use the OpenAPI” button and clicking the “OK” button, the key will be issued.
  • How to renew/dispose AccessKey
    In the Log Definition menu, select the game for which you want to renew or dispose of the AccessKey, then click the log name to enter the details page.
    Renew: When you click the “Renew” button, a new AccessKey will be issued, and the previously issued AccessKey can no longer be used.
    Dispose: Clicking the ‘Dispose’ button will delete the previously issued AccessKey and the key can no longer be used.

 

API Details

Service Category Domain
LIVE analytics-openapi.com2us.com
SANDBOX sandbox-analytics-openapi.com2us.com

 

  • Required Header Parameter: X-Analyitcs-Accesskey : X-Analyitcs-Accesskey
    To check OpenAPI’s data search permission, the corresponding key value must be included in the request header.
  • Data Search API
    • URL: https://{domain}/data/query/{log name}
    • Details: Search for data that meets the search conditions.
    • Request(POST, application/json)
      Name Data Type Requirement Explanation Example
      startDate STRING O Search start time in UTC (format: yyyy-MM-dd hh:mm:ss)
      (Required when transmitting nextToken value X)
      2024-01-01 00:00:00
      endDate STRING O Search end time in UTC (format: yyyy-MM-dd hh:mm:ss)
      (Required when transmitting nextToken value X)
      2024-01-02 00:00:00
      properties JSON X Search conditions in JSON format {BigQuery field name: search value, …} {“vid”:123, “market”:”A”}
      QueryType STRING X 0: Include only user-defined fields, “1”: Include all fields (Default: “0”) “0”
      nextPageToken STRING X Token value to search next page data * Returns 20 pieces of data per page * When searching with that value, no other parameters are entered. f3ebf4b6859a4f248b283a4fff1ded13
    • Response(application/json)
      Name Data Type Explanation Example
      totalRows INTEGER Total number of rows in the search results 123
      nextPageToken STRING Token to search the next page * Null if it is the last page f3ebf4b6859a4f248b283a4fff1ded13
      datas LIST[JSON] Searched Data [
      {
      “dateTime”: “2024-01-01T23:38:24Z”,
      “vid”: 123,
      “characterLv”: 1
      },

      ]
    • Request Example
       
  • Data Verification API
    • URL: https://{domain}/data/check/{log name}
    • Details: Checks whether logs matching the search conditions within the past year exist in Big Query.
    • Request(POST, application/json) :
      Name Data Type Requirement Explanation Example
      properties JSON O Search conditions in JSON format {BigQuery field name: search value, …} {“guid”:”52e10350-fe3d-487f-8631-1dc640010c87″}
    • Response(application/json)
      Name Data Type Explanation Example
      isExists BOOLEAN Whether or not the data exists true
      datas LIST[JSON] Last 5 sample values of existing data Contains field values corresponding to the search criteria, including dateTime and guid values. [
      {
      “vid”: 123,
      “dateTime”: “2024-04-16T23:09:24Z”,
      “guid”: “52e10350-fe3d-487f-8631-1dc640010c87”
      },

      ]
    • Request Example
       
  • Error Code
    • For details on each error code, please refer to the detail message in the return value.
    • 40x : Access Key Error
      • The access key must match the access key of the company, game, or log name you want to search.
      • If this error occurs, you must check whether the access key is the correct value.
    • 50x : System Error
      • This is an error that occurs when searching and processing data.
      • You must check whether the data type of the field name or value in the search condition is correct.
      • If the detail is an unknown system error, please try again later.