is there a way in parse server to exclude keys from nested objects?
I'm talking about doing something like this:
curl -X GET \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'excludeKeys=player.profile' \
https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
I've tried and this excludes the whole player key, while I only want to exclude player.profile.
Thanks.
Related
When i use the following Curl command in Terminal on Mac:
curl "https://api-free.deepl.com/v2/glossaries" \
--header "Authorization: DeepL-Auth-Key 0c9649a5-e8f6-632a-9c42-a9eee160c330:fx" \
--data-urlencode "name=My Glossary" \
-d "source_lang=en" \
-d "target_lang=de" \
--data-urlencode "entries=Hello! Guten Tag!" \
-d "entries_format=tsv"
I get the following Error:
{"message":"Bad request","detail":"Missing or invalid argument: entries_format"}
But this is an example Request on der Documentation, so it should work.
The tab character in the entries parameter is encoded incorrectly. Modify that line to:
--data-urlencode $'entries=Hello!\tGuten Tag!' \
PS: you should reset your authentication key as it is exposed in the code above.
hello i'm trying this guide but it fail all time
https://github.com/ubahnverleih/WoBike/blob/master/Beam.md
To login, I need to get OTP code but i can't access to it
curl -d "phoneNumber=[phonenumber]countryCode=+[countrycode]" \
-H "Content-Type:application/json" \
-H "User-Agent:escooterapp/latest-app-version;ios" \
-X POST https://gateway.ridebeam.com/api/auth/phoneverification
but it sends message like this
{"success":false,"message":"There was some error","response":{},"error":"","data":{}}
i don't know why this fail
is my code grammarly wrong?
The tutorial and the curl command say it's an application/json and you are passing an incorrect format in the data. Pay attention at the beginning of the command curl -d ...
Correct:
curl -d '{"phoneNumber":"<phone-number>","countryCode":"+<country-code>"}' \
-H "Content-Type:application/json" \
-H "User-Agent:escooterapp/latest-app-version;ios" \
-X POST https://gateway.ridebeam.com/api/auth/phoneverification
Wrong:
curl -d "phoneNumber=[phonenumber]countryCode=+[countrycode]" \
-H "Content-Type:application/json" \
-H "User-Agent:escooterapp/latest-app-version;ios" \
-X POST https://gateway.ridebeam.com/api/auth/phoneverification
Execution:
curl -d '{"phoneNumber":"123123123","countryCode":"+55"}' \
-H "Content-Type:application/json" \
-H "User-Agent:escooterapp/latest-app-version;ios" \
-X POST https://gateway.ridebeam.com/api/auth/phoneverification
{"message":"PhoneVerificationServiceErrorDomain","messageKey":1,"messageArgs":"{"status":400,"message":"Invalid
parameter To:
+55123123123","code":60200,"moreInfo":"https://www.twilio.com/docs/errors/60200"
How I can convert the below code in VB.net. Thank you in advance.
$ curl -X POST https://www.drillster.com/daas/oauth/token \
-d 'client_id=874a16d4ac764ce4a545f0cca4584c63' \
-d 'client_secret=5782b2e7532b48b5a0798f2ad6644614' \
-d 'grant_type=authorization_code' \
-d 'code=cIEL8h'
Is there a way to do:
salt '*' state.apply nginx test=True
through salt-api ?
I'm doing this:
curl -sSk http://salt:8000
-H 'Accept: application/x-yaml'
-H 'X-Auth-Token: token'
-d client=local
-d tgt='*'
-d fun=state.apply
-d arg=nginx
-d test=True
but it actually applies new state.
Thanks in advance!
what about curl -sSk http://salt:8000/run instead of curl -sSk http://salt:8000
and are you using \ at the end of each option?
otherwise it looks good, what version of salt are you running?
https://salt-sproxy.readthedocs.io/en/latest/salt_api.html <= good reading
Finally, I found a way to do state.apply through salt-api with test option.
All I needed was: -d arg='test='true''
Example of full request:
curl -sSk http://salt:8000 \
-H 'Accept: application/x-yaml' \
-H 'X-Auth-Token: token' \
-d client=local \
-d tgt='*' \
-d fun='state.apply' \
-d arg='nginx' \
-d arg='test='true''
Google Analytics's new "Core Reporting API" (version 3.0) "recommend[s] using OAuth 2.0 to authorize requests" (citation). Its documentation, though, is very unclear about how to do that. (It says "When you create your application, you register it with Google" (citation), but does a shell script count as an "application"?? If so, I should register the bash script at the "APIs Console", which doesn't give any guidance on how to do so.) Using Analytics' version 2.3, I run a bash script:
#!/bin/bash
# generates an XML file
googleAuth="$(curl https://www.google.com/accounts/ClientLogin -s \
-d Email=foo \
-d Passwd=bar \
-d accountType=GOOGLE \
-d source=curl-dataFeed-v2 \
-d service=analytics \
| awk /Auth=.*/)"
# ...
feedUri="https://www.google.com/analytics/feeds/data\
?ids=$table\
&start-date=$SD\
&end-date=$ED\
&dimensions=baz\
&metrics=xyzzy\
&prettyprint=true"
# ...
curl $feedUri --silent \
--header "Authorization: GoogleLogin $googleAuth" \
--header "GData-Version: 2" \
| awk # ...
How would I do something like this — a script that grabs whatever login token I need and sends it back — for the new Analytics?
(Incidentally, yes, I realize the results will be JSON, not XML.)
Here is a sample script
googleAuth="$(curl https://www.google.com/accounts/ClientLogin -s \
-d Email=$USER_EMAIL \
-d Passwd=$USER_PASS \
-d accountType=GOOGLE \
-d source=curl-accountFeed-v1 \
-d service=analytics \
| grep "Auth=" | cut -d"=" -f2)"
feedUri="https://www.googleapis.com/analytics/v3/data/ga\
?start-date=$START_DATE\
&end-date=$END_DATE\
&ids=ga:$PROFILE_ID\
&dimensions=ga:userType\
&metrics=ga:users\
&max-results=50\
&prettyprint=false"
curl $feedUri -s --header "Authorization: GoogleLogin auth=$googleAuth"