how to test anything on zdefre asdf awe? - graphql

as a newbie I took sample code and try to change it. like this
int 'response:', response
and im getting this error:
"errors" : [ {
"message" : "Unable to parse GraphQL query.",
"errorType" : "MalformedHttpRequestException"
} ]
could someone suggest me what im doing wrong?
Edit
Now I tried to remove /graphql from the url the test is passing but in response im getting this:
04:45:36.321 [print] response: {
"Version": "1.0",
"Output": {
"__type": "com.amazon.coral.service#UnknownOperationException"
}
}

There seems to be typo, a : after Given ?
If the server is returning something like that - it sounds like Karate is fine and you haven't sent the right request shape. Please work with the server-side team or someone familiar with the API to resolve that.
Otherwise please follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Related

Google Cloud Tasks always set HttpMethod to GET when using HttpRequest as payload_type

According to this documentation [ https://cloud.google.com/tasks/docs/creating-http-target-tasks ], one should be able to create tasks with type 'http_request' and 'http_method' set to 'POST', but the behavior is not the expected once the task is always created with method 'GET'.
After having this issue while using the Python Client Library, I've decided to try the API directly and check if it was an issue with the library or with the API itself.
Using the "Try this API" from the product's documentation page [ https://cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/create ], I've tried to create similar tasks using both http_request and app_engine_http_request types and always setting the http_method to POST.
If I set the request body like this:
{
"task": {
"appEngineHttpRequest": {
"httpMethod": "POST",
"relativeUri": "/test",
"body": "c2hhbGxvdyBub3c="
}
}
}
...the task is created and the method is POST, like expected. But, if I set the request body to:
{
"task": {
"httpRequest": {
"httpMethod": "POST",
"url": "https://httpstat.us/404",
"body": "c2hhbGxvdyBub3c="
}
}
}
...the task is created, but with method GET instead of POST.
Here's what I get at my queue:
I believe this is a bug, and that's why I'm reporting it here with tag google-apis-explorer as recommended at the support page.
Anyway, if anyone could tell me if I'm doing something wrong or if there's any workaround in the meanwhile I would really appreciate.
Thanks!
Thank You for this post, this is a bug in the existing Cloud Tasks UI and we are in the process of fixing this bug.
In the meantime the correct HTTP method of the task can be determined by running the following command:
gcloud beta tasks describe
https://cloud.google.com/sdk/gcloud/reference/beta/tasks/describe
The above command will show the correct HTTP method for the task.

Error trying to create session on an Excel file using Microsoft Graph

I'm trying to manipulate an Excel file using Ruby, while I seem to eb able to read it properly - I have trouble creating a session to start writing into it. There's not much help online on what this even means.
I'm trying to create a session like this, just like it suggests on the documentation (but not in ruby)
url = "https://graph.microsoft.com/v1.0/me/drive/items/#{#item_id}/workbook/createSession"
response = HTTParty.post(url, headers: { 'Authorization' => #access_token,
'Content-Type' => 'application/json' },
body: '{ "persistChanges" : true }')
But I get the following response.
{
"error": {
"code": "EditModeCannotAcquireLockUnknownUser",
"message": "",
"innerError": {
"request-id": "b088abbe-8353-4614-b9a7-d769ff85da50",
"date": "2017-08-15T17:12:41"
}
}
}
#response=#<Net::HTTPConflict 409 Conflict readbody=true>
I've just started with this, what could be the problem? the error indicates that some unknown user has locked the file - but the file is editable and the access_token is derived from my own user profile
Where do I go from here? has anybody manipulated excel files and formula using Microsoft Graph?
Turns out it's an issue with that particular file, I still don't know why though. it's not really an answer - but the lack of documentation for anything to do with this API is stunning. I'd appreciate links.

What's going on with the Google Knowledge Graph API?

I have used the knowledge graph API before and it worked fine. I tried to access it today and it gives me no results at all. Here is my sample request and response.
GET Request:
https://kgsearch.googleapis.com/v1/entities:search?query=taylor+swift&key=MY_API_KEY&limit=1&indent=True
Response:
{
"#context": {
"#vocab": "http://schema.org/",
"goog": "http://schema.googleapis.com/",
"EntitySearchResult": "goog:EntitySearchResult",
"detailedDescription": "goog:detailedDescription",
"kg": "http://g.co/kg"
},
"#type": "ItemList",
"itemListElement": []
}
It is working now : http://knowledge-graph.fr/
I confirm there was an issue with the API.
You can also try it here in Google Developer Console : https://developers.google.com/apis-explorer/?hl=fr#p/kgsearch/v1/kgsearch.entities.search?query=taylor+swift&_h=1&

Mailchimp API 2.0 lists/subscribe responding with error 250 List_MergeFieldRequired MMERGE4 is required

I'm attempting to use the lists/subscribe Mailchimp API 2.0 endpoint to subscribe an email to a list, but I keep getting a puzzling error. My request looks like:
{
"apikey":"myapikey-us5",
"id":"listid",
"email":{"email":"my#email.com"},
"double_optin":false,
"send_welcome":true
}
I'm sending this to https://us5.api.mailchimp.com/2.0/lists/subscribe.json and getting this response:
{
"status": "error",
"code": 250,
"name": "List_MergeFieldRequired",
"error": "MMERGE4 must be provided - Please enter a value"
}
And if I specify "merge_vars": {} I still get the same error. What am I missing here?
It means you need to provide a value for MMERGE4 merge field. How you do this depends on what type of merge field MMERGE4 is, but It would be like this:
{
"apikey":"myapikey-us5",
"id":"listid",
"email":{"email":"my#email.com"},
"double_optin":false,
"send_welcome":true,
"merge_vars": {
"MMERGE4": "something"
}
}
But you should look and see what type of data that is, otherwise you might cause issues for whomever set that up as a required field.

Google Genomics API Callsets Search "Unknown field name: datasetIds"

I've been using the Google Genomics API for about a day now. I've successfully called many of the APIs like Datasets.list, Datasets.get, and even Readsets.search but I'm having a problem with the Callsets.search.
I'm making POST request to:
POST https://www.googleapis.com/genomics/v1beta/callsets/search?key=MY_KEY_HERE
And my request body is:
{
"datasetIds" : [
"376902546192"
]
}
But the response I'm getting back is:
{
"error" : {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Unknown field name: datasetIds",
"locationType": "other",
"location": ""
}
],
"code": 400,
"message": "Unknown field name: datasetIds"
}
}
According to the documentation: https://developers.google.com/genomics/v1beta/reference/callsets/search datasetIds is a perfectly valid parameter.
The crazy thing that's perplexing me is this identical request works just fine on the readsets/search endpoint but not the callsets/search endpoint? I'm almost wondering if it's a bug in the API. Can anyone help?
Received this from Google:
The variants and callsets APIs just went
through some breaking changes so that they'll be compliant with GA4GH
v0.5 when they go fully public.
All breaking changes should be done now - and I'll try to get all the
docs and code samples updated today or tomorrow.
Until then, you can see the real parameters in the API explorer (it
can't lie :) - in this case, the datasetId field has now changed to
"variantSetIds" (still using that same value, just a rename)
I just tested it, and it works. Below are the results:
$ java -jar target/genomics-tools-client-java-v1beta.jar searchcallsets --dataset_id 376902546192
Getting call sets from: 1000 Genomes
{"created":"1410541777431","id":"376902546192-0","name":"HG00345","sampleId":"HG00345","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-1","name":"HG00369","sampleId":"HG00369","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-2","name":"HG01085","sampleId":"HG01085","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-3","name":"HG01107","sampleId":"HG01107","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-4","name":"NA12347","sampleId":"NA12347","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-5","name":"NA18579","sampleId":"NA18579","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-6","name":"HG00372","sampleId":"HG00372","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-7","name":"HG01134","sampleId":"HG01134","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-8","name":"NA18532","sampleId":"NA18532","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-9","name":"NA18597","sampleId":"NA18597","variantSetIds":["376902546192"]}
Hope it helps,
Paul

Resources