How to configure logstash to make an request to APIGEE analytics API? - api

I am very new to ELK stack and am trying to hit APIGEE analytics REST API, which is in the form of a URL. The response from the URL would be a JSON file. What is the best approach to go ahead with the implementation?

I hope the question is still valid. If I understand it correctly you want to send logging data to an ELK stack. So why not send it instead of retrieving it?
Below is an example of how this policy works on the apigee platform. You need to add it to any API proxy and preferably at the PostClientFlow:
....
</PostFlow>
<PostClientFlow>
<Response>
<Step>
<Name>Message-Logging-Policy1</Name>
</Step>
</Response>
</PostClientFlow>
Below the policy.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="Message-Logging-1">
<DisplayName>Message Logging</DisplayName>
<Syslog>
<Message>{system.time.year}-{system.time.month}-{system.time.day}:{system.time.hour}-{system.time.minute}-{system.time.second}.{system.time.millisecond} {apiproxy.name} {request.header.x-requestor-app} {request.header.x-realm} [{request.header.x-requestor-type}|{request.header.x-requestor}] </Message>
<Host>logstash.xxxx.com</Host>
<Port>514</Port>
</Syslog>
Hope this helps.

Related

eBay notifications are not being received

I am trying to receive notifications for ItemListed from the Ebay API on Production.
I have successfully subscribed to Ebay's notifications although I am not receiving any mail or call to the specified URL upon actions that I surely know have happened.
I logged in to my developers account and set the right URL and email for notifications.
This is the XML code for the subscription:
<?xml version="1.0" encoding="utf-8"?>
<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<!-- Use the Developer portal or the <ApplicationDeliveryPreferences> container to set
the Application delivery settings -->
<RequesterCredentials>
<eBayAuthToken></eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<ApplicationDeliveryPreferences>
<!--Enter an email address-->
<AlertEmail>mailto://email#email.com</AlertEmail>
<AlertEnable>Enable</AlertEnable>
<ApplicationEnable>Enable</ApplicationEnable>
<ApplicationURL>MYHHTPSURL</ApplicationURL>
<DeviceType>Platform</DeviceType>
<DeliveryURLDetails>
<DeliveryURL>MYHTTPSURL</DeliveryURL>
<DeliveryURLName>TEST</DeliveryURLName>
<Status>Enable</Status>
</DeliveryURLDetails>
</ApplicationDeliveryPreferences> -->
<!-- Use the UserDeliveryPreferenceArray to enable to the user for various Event -->
<UserDeliveryPreferenceArray>
<NotificationEnable><EventType>ItemListed</EventType>
<EventEnable>Enable</EventEnable>
</NotificationEnable>
</UserDeliveryPreferenceArray>
</SetNotificationPreferencesRequest>
I am adding a pastebin link with the GetNotificationPreferences:
https://pastebin.com/JBAnnX8d
To me everything seems completely fine. Anyone can shed some light?
Might be helpful to people having this problem in the future. I solved it by
authenticating to the API through eBay's authnauth system. Weird solution but works.

Unable to save resource prestashop webservice

I am new to prestashop web service ,when I add new customer it says one error .
RETURN HTTP BODY
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[46]]></code>
<message><![CDATA[Unable to save resource]]></message>
</error>
</errors>
</prestashop>
can you guys help me how to solve this error..
Error similar to this are documented before. Activate DEBUG MODE and you will be able to see detailed error.
Good luck.

Reporting Services - getting data from https SOAP API

Is it possible to create a data source in reporting services to pull data from a https data source?
I have successfully managed to create reports that pull from various http SOAP APIs, but when I try to connect to a https data source I get an error.
The error coming back from the webservice is not very descriptive -
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>An error has occurred while consuming this service. Read the Detail property for further information.</faultstring><faultactor>GetExceptionPolicy</faultactor><detail>An error has occurred while consuming this service. Please contact your administrator for more information. Error ID: a90b9112-c09b-438d-b58b-4dfb852658ce</detail></soap:Fault></soap:Body></soap:Envelope>
The webservice I'm calling is logging the request that SSRS sent in a database, and it is storing it with a leading "?" -
?<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetBiller xmlns="http://tempuri.org">
<AgentID>1</AgentID>
</GetBiller>
</soap:Body>
</soap:Envelope>

Yodlee Token authentication failed for cobrand/user Stale conversation credentials</errorDetail>

I sometime get this error while trying to add Accounts(v1.0/jsonsdk/SiteAccountManagement/addSiteAccount1) or get MFA Response(v1.0/jsonsdk/Refresh/getMFAResponseForSite)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Errors xmlns="http://namespace.yodlee.com/pfm/2009/Error">
<Error>
<errorDetail>Token authentication failed for cobrand/user Stale conversation credentials</errorDetail>
</Error>
</Errors>
can someone help me that issue.
Thank you.
Yodlee doesn't allow multiple user login and hence this exception comes when you have logged in the user again by calling the Login(/authenticate/login​) API and still using the old userSessionToken.
Please use the login (/authenticate/login​) call once and use the same userSessionToken for all the API calls for next 25-30 minutes.

Magento Enterprise 1.12 - Accessing customer custom attributes from the V2 API

I've got a client that would like to use Magento's web services API to create and update customers. Using the API we can easily manipulate the system defined attributes - firstname, lastname, etc using the V1 or V2 API. Se we're good to go there.
This is where it gets sticky - this site uses Magento Enterprise 1.12 and we have added some custom customer attributes for linking the Magento customers to their CRM data on an external system. Using the V1 API, I have full access to the custom attributes. However, the V2 API will not expose them. Since the caller is coming from .NET, I believe he needs to use the V2 API.
Tracing the code with a debugger, I see that the V2 code gets all the attribute data and then drops all the custom data when the web service response is generated. I tried adding the attributes to the Customer (Mage/Customer/etc/) WSDL and WSI files, but that did not do the trick.
Can anyone give me a pointer as to what I should do to expose the customer attributes?
Greg
Create a new module
In Your_Module/etc/wsdl.xml and wsi.xml add your new attribute in the same node as in the Mage_Customer wsdl.xml and wsi.xml
Magento merges all wsdl.xml and wsi.xml files together
Here's an example of a wsdl.xml file that I used to add customer_number to the API.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
<complexType name="customerCustomerEntity">
<all>
<element name="customer_number" type="xsd:string" minOccurs="0" />
</all>
</complexType>
</schema>
</types>
</definitions>