Search Unity

Unable to create Raw Data Export by calling REST API (that used to work)

Discussion in 'Unity Analytics' started by Mitjans_AmuseNetwork, Dec 28, 2020.

  1. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    Hello,

    I cannot send a request to download the Raw Data from Unity Analytics by using the snippet code defined in the Unity Manual (https://forum.unity.com/?gq=raw data export). I have been successfully downloading the data for different apps with this for a while and never had a problem before.

    I have made sure that the Unity Project Id and the API Key are the good ones. I have also changed my PC recently, so I don't know if there is any special installation needed.

    Any help, please?


    curl: (6) Could not resolve host: startDate
    curl: (6) Could not resolve host: 2020-11-01,
    curl: (6) Could not resolve host: endDate
    curl: (6) Could not resolve host: 2020-12-01,
    curl: (6) Could not resolve host: format
    curl: (6) Could not resolve host: tsv,
    curl: (6) Could not resolve host: dataset
    curl: (6) Could not resolve host: appRunning
    curl: (3) [globbing] unmatched close brace/bracket in column 1
    curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - La función de revocación no puede comprobar la revocación para el certificado.
     

    Attached Files:

  2. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    by directly entering code to console
     

    Attached Files:

  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Quote characters are different for Windows vs Mac, the docs show the Mac syntax. You also need a Unity Pro license. This should help:

    Windows:

    Code (CSharp):
    1. curl -v --user 4ad8afe2-78a5-48ac-88d4-bc71fb2*****:4dbbb00cb1675966d94872b8e05***** --request POST --header "Content-Type: application/json" --data "{ \"startDate\": \"2020-03-10\" , \"endDate\": \"2020-03-12\", \"format\": \"tsv\", \"dataset\": \"appStart\" }" https://analytics.cloud.unity3d.com/api/v2/projects/4ad8afe2-78a5-48ac-88d4-bc71fb*****/rawdataexports
    Mac syntax:

    Code (CSharp):
    1. curl -v --user 4ad8afe2-78a5-48ac-88d4-bc71fb281317:4dbbb00cb1675966d94872b8e05***** --request POST --header "Content-Type: application/json" --data '{ "startDate": "2020-03-10" , "endDate": "2020-03-12", "format": "tsv", "dataset": "appStart" }' https://analytics.cloud.unity3d.com/api/v2/projects/4ad8afe2-78a5-48ac-88d4-bc71fb2*****/rawdataexports
     
  4. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    Hello Jeff, thanks for the help.

    Still not working with the changes :(


    Note: Unnecessary use of -X or --request, POST is already inferred.
    * Trying 35.190.63.66...
    * TCP_NODELAY set
    * Connected to analytics.cloud.unity3d.com (35.190.63.66) port 443 (#0)
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 1/3)
    * schannel: checking server certificate revocation
    * schannel: sending initial handshake data: sending 192 bytes...
    * schannel: sent initial handshake data: sent 192 bytes
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 2/3)
    * schannel: failed to receive handshake, need more data
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 2/3)
    * schannel: encrypted data got 2321
    * schannel: encrypted data buffer: offset 2321 length 4096
    * schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - La función de revocación no puede comprobar la revocación para el certificado.
    * Closing connection 0
    * schannel: shutting down SSL/TLS connection with analytics.cloud.unity3d.com port 443
    * schannel: clear security context handle
    curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - La función de revocación no puede comprobar la revocación para el certificado.


    I do have a pro licence (and active in this computer). I am using a Windows.
     

    Attached Files:

  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Mitjans_AmuseNetwork I just checked, and our Raw Data Export system is indeed experiencing delays right now, sorry about that. Many of our staff is out until next week here also, so resolution may be delayed.
     
  6. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    Okay, no problem - I will check it out next week.

    Happy New Year to the team!! :)
     
  7. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    Still the same problem :/


    curl -v --user XXXXX...:XXXX... --request POST --header "Content-Type: application/json" --data "{ \"startDate\": \"2020-03-10\" , \"endDate\": \"2020-03-12\", \"format\": \"tsv\", \"dataset\": \"appStart\" }" https://analytics.cloud.unity3d.com/api/v2/projects/XXXXXXX/rawdataexports
    Note: Unnecessary use of -X or --request, POST is already inferred.
    * Trying 35.190.63.66...
    * TCP_NODELAY set
    * Connected to analytics.cloud.unity3d.com (35.190.63.66) port 443 (#0)
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 1/3)
    * schannel: checking server certificate revocation
    * schannel: sending initial handshake data: sending 192 bytes...
    * schannel: sent initial handshake data: sent 192 bytes
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 2/3)
    * schannel: failed to receive handshake, need more data
    * schannel: SSL/TLS connection with analytics.cloud.unity3d.com port 443 (step 2/3)
    * schannel: encrypted data got 2321
    * schannel: encrypted data buffer: offset 2321 length 4096
    * schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - La función de revocación no puede comprobar la revocación para el certificado.
    * Closing connection 0
    * schannel: shutting down SSL/TLS connection with analytics.cloud.unity3d.com port 443
    * schannel: clear security context handle
    curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - La función de revocación no puede comprobar la revocación para el certificado.


    Any help on why? Thanks!
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you send me the exact syntax you are using in a private message?
     
  9. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    24
    Hello! It was the firewall that was blocking the requests :rolleyes::eek:
    Thanks for the help!
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Glad it's working! And happy to help, team effort!