Question

"terminated early" response from https://data.mixpanel.com/api/2.0/export API

  • 12 November 2020
  • 2 replies
  • 170 views

Hi folks,

May i ask what terminated early means here? Would this relate to our mixpanel billing/plan maybe? Or maybe a similar situation to this historical event: https://status.mixpanel.com/incidents/24k21g4lr1vz

Thanks!
Peter

```

12:12 $ curl -vvv --request GET   --url 'https://data.mixpanel.com/api/2.0/export?to_date=2020-10-06&from_date=2020-10-05&limit=5&event=%5B%22Logged%20in%22%5D'   --header 'Accept: application/json'   --header 'Authorization: Basic <REDACTED>'
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 35.186.241.51...
* TCP_NODELAY set
* Connected to data.mixpanel.com (35.186.241.51) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.mixpanel.com
*  start date: Apr 20 00:00:00 2020 GMT
*  expire date: Apr 21 12:00:00 2022 GMT
*  subjectAltName: host "data.mixpanel.com" matched cert's "*.mixpanel.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust RSA CA 2018
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fbaa180d600)
> GET /api/2.0/export?to_date=2020-10-06&from_date=2020-10-05&limit=5&event=%5B%22Logged%20in%22%5D HTTP/2
> Host: data.mixpanel.com
> User-Agent: curl/7.64.1
> Accept: application/json
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< vary: Accept-Encoding
< date: Thu, 12 Nov 2020 12:12:23 GMT
< content-type: text/plain; charset=utf-8
< via: 1.1 google
< alt-svc: clear
<
terminated early
* Connection #0 to host data.mixpanel.com left intact
* Closing connection 0

```


2 replies

Userlevel 5
Badge +3

Hi Peter, 

The API request is case-sensitive and is also susceptible to spelling mistakes! Did you check all of the events in your request?

 

We’d love to know if you resolved this!

Thanks, forgive the delayed response.
I ran the same command today and it worked.
Maybe our mixpanel account changed in the past 3 months to allow us access to this API, not sure. Either way, all good now, thanks!! 

 

```

19:11 $  curl -s --url 'https://data.mixpanel.com/api/2.0/export?to_date=2020-10-06&from_date=2020-10-05&limit=5&event=%5B%22Logged%20in%22%5D'   --header 'Accept: application/json'   --header 'Authorization: Basic <REDACTED>' | jq
{
  "event": "Logged in",
  "properties": {
    "time":,
    "distinct_id": "181",
    "$browser": "Chrome",
    "$browser_version": 85,
    "$city": "Dublin",
    "$current_url": "https://<REDACTED>/login/form",
    "$device_id": "",
    "$initial_referrer": "$direct",
    "$initial_referring_domain": "$direct",
    "$insert_id": "",
    "$lib_version": "2.39.0",
    "$os": "Windows",
    "$region": "Leinster",
    "$screen_height": 1080,
    "$screen_width": 1920,
    "$user_id": "",
    "Date and time": "2020-10-05T14:58:00",
    "Email": "<REDACTED>",
    "ID": 181,
    "Login": "<REDACTED>",
    "Name": "<REDACTED>",
    "Organisation": "<REDACTED>",
    "mp_country_code": "IE",
    "mp_lib": "web",
    "mp_processing_time_ms": 1601906338343
  }
}

```

Reply


Mixpanel