Mulesoft APIKit for ODATA giving error "Expected token 'CLOSE' not found." - odata

I am new to Mulesoft. I tried using "Transform to sql select" under the "APIKit for ODATA" in Mulesoft's Anypoint Studio and am getting this error.
org.mule.runtime.core.internal.message.ErrorBuilder$DeserializableErrorImplementation
{
description=Expected token 'CLOSE' not found.
detailedDescription=Expected token 'CLOSE' not found.
errorType=APIKIT-ODATA:MALFORMED_URI
cause=org.mule.extension.internal.exception.ODataModuleException
errorMessage=
org.mule.runtime.core.internal.message.DefaultMessageBuilder$MessageImplementation
{
payload=org.mule.extension.api.error.ODataServerError#4734c037
mediaType=*/*
attributes=<not set>
attributesMediaType=*/*
}
suppressedErrors=[]
childErrors=[]
}
Also, I am not able to find any resources that tell me what this error means.
So, my questions are
What does this error mean ?
Are there any good resources (docs, tutorials etc) on Mulesoft APIKit for ODATA that I can go through to learn more about how to use it ?
Thanks in advance

Related

Google reCAPTCHA Enterprise Unknown field error when Create Assessment

I did follow their documentation on https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1/latest/index.html
I first added the env variable RECAPTCHA_ENTERPRISE_CREDENTIALS then run the
client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
documentation says response = client.create_assessment request but documentation didn't add sample request so I did assume that it will look like in this documentation https://cloud.google.com/recaptcha-enterprise/docs/create-assessment
{
"event": {
"token": "token",
"siteKey": "key"
}
}
But when I execute the client.create_assessment it is giving me error ArgumentError: Unknown field name 'event' in initialization map entry.
I also tried to follow this https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1/latest/Google/Cloud/RecaptchaEnterprise/V1/RecaptchaEnterpriseService/Client.html#create_assessment-instance_method
where the parameters is request and also gives me error ArgumentError: Unknown field name 'request' in initialization map entry.
What could be the correct parameter/request for creating assessment?
Gem I used is google-cloud-recaptcha_enterprise-v1 and google-cloud-recaptcha_enterprise
So I solve this issue by using client.create_assessment(parent: "projects/{your project-id}", assessment: event) my event value was event = Google::Cloud::RecaptchaEnterprise::V1::Event.new(token: "token from execute", site_key: "your site key")
It solves the error and answers the question (but another error after this one occurred about permission denied). I Will update once resolved.

ask util generate-lwa-tokens is no longer available?

I'm getting started on Alexa Skill MAnagement SMAPI, so I need to get a refresh token. In the documentation it is specified that 'ask util generate-lwa-tokens' should be used, but in the current version 2.0 of 'ask' this option is no longer available. Thus, I obtained access tokens using postman as described here:
https://gist.github.com/marcelobern/fe44cee1dd5ed624e03b690a447e47fd
But when running some example of smapi what I get is a server error. The example and the error:
from ask_smapi_sdk import StandardSmapiClientBuilder
smapi_client_builder = StandardSmapiClientBuilder(client_id='***',
client_secret='***',
refresh_token='***')
smapi_client = smapi_client_builder.client()
try:
result = smapi_client.list_skills_for_vendor_v1(vendor_id='***', full_response=True)
print("==========================================")
print(result.headers)
print(result.body)
print("==========================================")
except Exception as e:
print(e.body if hasattr(e, 'body') else e)
The error:
{'error_description': 'The server encountered an internal error trying to '
'fulfill the request',
'error_type': 'ServerError'}`
Thank you,
Fernando
This command is now added in the ask-cli v2.1.0, you can check the changelog at
https://github.com/alexa/ask-cli/blob/develop/CHANGELOG.md#210-2020-04-16
Solved. You have to be sure to use a refresh token since access token will throw a server exception

twilio The requested resource was not found

I tried to get a list of all conferences via Twilio PHP helper library, but get 404 error. My code:
$client = new Client($accountSid, $authToken);
foreach ($client->conferences->read() as $conference) {
var_dump($conference);
}
Error:
[HTTP 404] Unable to fetch page: The requested resource /2010-04-01/Accounts/twilio.account_sid/Conferences.json was not found
Thanks for the help in advance!
The problem was in bad credentials I setted. I used test credentials that are only for REST API testing purposes. When I setted correct credentials from https://www.twilio.com/console the problem was solved. Thanks Shachaf.Gortler for the some help.

getting error when enter uri for timeseries ingest

Hi I am trying to save data in timeseries db but I am facing an error at timeseries ingest when I enter wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages in websocket uri it shows an error like this when I click on open socket
The request failed with status code: 500
{
"error": "Error: unexpected server response (401)",
"url": "wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages"
}
and see this screenshot once.
Thanks&regards
Eswar G
From the error log, it looks you got authorization error. Check if you are using correct predix-zone-id of the time-series instance in the request header or you have configured correct UAA instance in predix tool kit.
Have you updated your UAA client with timeseries authorities?
To inserting time series data with particular user or client need permission. For getting permission, you need to add authorities into your UAA client.
Following are the authorities for timeseries.
Experiencing a similar problem. I'm posting only one of several received error messages. I've cycled through combos of the following for uri and zone id:
uri:
wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages
https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints
zone-id:
44853a54-3ecd-4589-85da-b54f2fda7cce
and the zone id shown in the photo, with .ingest at the end.
so, 401 unauthorized.
Did you happen to re-create the timeseries or uaa? Perhaps they are not associated. Also, I'm assuming you did "login as client" in the top menu.
Might be a good idea to create a new timeseries tied to that uaa. Then use the new zoneId.
Did you add predix..ingest and predix..user to the scope and authorities section in uaa client in your predix.io account. Please check the client id to add permission for in websocketriver.config file.

Fusion Tables using php Login required Error 401 when inserting

This is what i try to do. select command work but when try to insert it generate
error "Login required Error 401" any example where insertion, updation and deletion is done without this type of error
or any other suggestion which help me
query(SQLBuilder::insert(44444, array('grefid'=>3000, 'distname' => 'xxxx', 'tehsilname' => 'bob')));
?>
I think you need to get the API key...visit the following link to get the same:
Get Google API Key

Resources