2

Hi need to automate Bugsense proguard mapping file upload using python and api(apitoken /apikey) . I was trying with the code from("github.com/PanosJee/5004886") but not find anything getting uploaded . I am able to do curl to the urls specified in the python code(.../errors.json and .../analytics.json) using my apikey and apitoken but not to anyother urls which asks me to login

user3323241
  • 459
  • 2
  • 9
  • 21

1 Answers1

2

You could use curl as in the examples below.

APPTOKEN - the token provided for application
ACCESSTOKEN - Bugsense access token. Found in Account Info -> Integration -> API TOKEN

Bash script examples below:

iOS

export DSYMFILEPATH=file.dSYM
export APPTOKEN="fcccccca"
export ACCESSTOKEN="aaaaa4075aaaa69fbaaaa61"
curl -F "file=@$DSYMFILEPATH" --header "X-Bugsense-apikey: $APPTOKEN" --header "X-BugSense-auth-token: $ACCESSTOKEN" https://symbolicator.splkmobile.com/upload/dsym -i

Android

export PROGUARDMAPPINGFILE=mapping.txt
export APPTOKEN="acccccca"
export ACCESSTOKEN="aaaaa4075aaaa69fbaaaa61"
export APPVERSION="1.1"
curl -F "file=@$PROGUARDMAPPINGFILE" --header "X-Bugsense-apikey: $APPTOKEN" --header "X-BugSense-auth-token: $ACCESSTOKEN"  --header "X-Bugsense-appver: $APPVERSION"  https://symbolicator.splkmobile.com/upload/mapping -i 

For more details: https://github.com/bugsense/docs/blob/master/api/read.md

  • Seems osX does not have SSL support in there curl - that is a big bummer :( – slott Mar 13 '14 at 09:42
  • I tested this on OS X, it worked for me. You could add -k to ignore invalid SSL cetificates – Nicolae Ghimbovschi Mar 13 '14 at 19:02
  • When calling curl from Gradle I keep getting this: 08:26:49.042 [ERROR] [system.err] curl: (1) Protocol 'https not supported or disabled in libcurl – slott Mar 14 '14 at 07:27
  • It even fails with http not supported if I try without SSL – slott Mar 14 '14 at 07:29
  • Are you using https://bugsense.appspot.com ? because they have a valid SSL certificate. While https://www.bugsense.appspot.com not. – Nicolae Ghimbovschi Mar 14 '14 at 08:04
  • I was trying to call curl directly from Gradle using an Exec task - and that caused the SSL issue. Doing the exact same thing in a shel script and just call that script from Gradle worked just fine. – slott Mar 20 '14 at 06:38
  • Thanks Nicolae thanks alot man,my apologies for late reply,have used -k and it worked excellent for me.. – user3323241 Mar 24 '14 at 04:50