Background: I have built a tool that imports sales orders from Magento to a custom application. The function salesOrderList() worked fine on a customer's Magento Go store. Then it failed on another customer's store. The reason was the former store was version 1.6.x and the latter was 1.5.x. The function call returned two different data structures on the two versions (despite being the same API version, namely SOAP API V2), causing the problem. So I customized the tool to expect the 1.6.x data structure first and then fall back to 1.5.x if the former failed. Now, we have a new customer who seems to have Magento version 1.7. The data structure seems to have changed again in 1.7 for the same function (salesOrderList()).
Programmed Using: .NET (C#); Magento SOAP API V2
Question: Is there a function call to determine the Magento (1.5, 1.6, etc.) version of the store we are connecting to? I understand from another post that there is a MAGE::getVersion() call that they use in PHP, directly on the store (without SOAP API). Is there a .NET equivalent for this when using the SOAP API?
PS: I had posted the same question (a little less wordy though) as user1236916 because I had temporarily lost the login information for this account. My apologies for the repetition.
Thanks!
The Magento core API is known to be very limited in the calls it provides by default. There is no call that returns the Magento version out of the box.
More infomation on the Magento core API can be found on the official Magento site.
That being said the Magento API is designed to be extended and to do so is not overly difficult. You will need to create a Magento module that extends one of the core API resources (you will need to do this in PHP and have access to the Magento installation itself).
See this post for more information on how to extend the V2 Magento API.
In your extended API class simple create a function like so:
public function getVersion()
{
// static method to return the Magento version within the app
return Mage::getVersion();
}
Related
Is it possible to build a C# application that I can use to access my Azure Devops server and have my work items read out for a particular sprint? If so how, I can't find anything that works. Thanks!
Azure DevOps ships with a standard REST API for most parts and a slightly more archaic SOAP API for most of the rest.
There is documentation available here:
.NET Client Library for REST API
.NET Client library for SOAP API
Pure REST API documentation
For more specific problems, post a new question.
To get work items by iteration, you'd be looking at this API:
Iterations - Get Iteration Work Items
.NET Client Library for REST API: WorkHttpClientBase.GetIterationWorkItemsAsync(TeamContext, Guid, Object, CancellationToken) Method
You can find the nugets here:
.NET Client libraries
A sample using the WorkTrackingClient (not the exact API) is here:
microsoft
/
azure-devops-dotnet-samples
We are developing a Mobile App in c# xamarin which needs to call AWS FHIR Patient API to retrieve the Patient Details. We have done a setup in AWS FHIR Works API and was successful in retrieving the data in Postman using servrurl,auth url, clientid and api key. But I would like to know the implementation of the same in .net c#. Can someone give some pointers or code sample on how this implementation is acheived.
The Firely team have a great software development kit that includes a REST API client for interacting with HL7 data from a FHIR-compliant server. Here is the source code for their library, and here is a REST client example from their documentation.
Does the TFS Extension Data web service have a similar service in C#? I am trying to get custom TFS extension data through C# instead of REST API.
I assume you want to use C# instead of JavaScript, as REST API (httprequest) can be called in any language.
There are two ways to interact with the data storage service: REST APIs or a Microsoft-provided client service available as part of the VSS SDK. Please check the rest api in the following link, and call this api in your code:
https://learn.microsoft.com/en-us/vsts/extend/develop/data-storage#advanced
The getValue method is a wrapper around the REST APIs, issuing a GET request to the following endpoint:
GET _apis/ExtensionManagement/InstalledExtensions/{publisherName}/{extensionName}/Data/Scopes/User/Me/Collections/%24settings/Documents/myKey
In the past I've used Restsharp to consume restul API. RestSharp helps us get concrete type object for given operation. The problem with RestSharp is we need to manually create the POCO classes.
Wondering if we can consume the REST API similar to WCF proxy which generates all operations with signatures and also generates necessary POCO classes.
I tried using Azure API Client and having no luck i.e. not getting strongly typed objects from operation call.
When I directly query the swagger UI I get below:
......,"definitions":{"Object":{"type":"object","properties":{}}}}
I'm quiet new to this Swagger.
Looking at JSON above, should the type and properties be of given type e.g. membership and it's properties?
Am I doing the right tool i.e. azure api client?
Thanks.
For Swagger proxy generation, I use Autorest. It's made by Microsoft and published as an OSS.
It's used internally to generate barebone SDK modules from Swagger endpoints in different languages.
I've never used IBM Cognos product. What I need is to make an integration between a custom system and Cognos. I don't know yet the requirements but I have one question:
Does Cognos have REST/SOAP web services one can connect to and retrieve data? Or maybe an SDK? How do you guys integrate with Cognos?
You'll need to use Cognos mashup services which is part of Cognos SDK:
http://www-03.ibm.com/software/products/en/cognos-mashup-service
The documentation of this product is not available in public URL and it is available only as part of the Cognos SDK installation.
However you get a hunch on it in here:
Get started with the IBM Cognos Mashup Service
and in here:
Combining IBM Cognos Mashup Services and Google Maps v2
Does Cognos have REST/SOAP web services one can connect to and
retrieve data? Or maybe an SDK?
Data can be automatically retrieved from IBM Cognos via REST API, SDK (Soap), Mashup-Services and Junyper-Notebooks using C#, Java, .net, R, python, Javascript, curl.
Some interfaces just allow retrieval others also expose configuration and update functionalities. In general all actions that can be executed via the Webportal, can also be accessed via SDK or REST-API.
REST-API
There are two flavours of REST-APIs, REST-API from v10 and the swagger-based API since Cognos v11. Both are fully functional and supported.
Cognos V10 REST-API is availabe in Cognos since Version 10.
It exposes the different services runnning as Java-Servlets in the Applikation-Server via URL and accepts parameters to retrieve portal content, execute reports, retrieve save report outputs, poll for status, /add/change/deleete extensions ....
Generic url:
<Cognos-installdir>/v1/disp/{service}
{service} can be: extensions, files, session, disp, ...
Example for getting report data or a folder structure:
http://webservername:portnumber/ibmcognos/bi/v1/disp/rds
/{resource_type}/{source_type}/source_id?option1=val1&option2=val2...
Depending on {resource_type} and {source_type} the results can be a user information, folders, saved report output a report results run on demand ...
Cognos 11.1.x REST-API was introduced with Cognos Version 11 and is provided through swagger.
The swagger-API comes with a structured documentation and may therefor be easier to understand. Latest documentation can always be found in reaching out to the installed URL: https://<cognos_analytics_server>:/api/api-docs - see IBM Cloud installation as example.
SDK
IBM provides SDK libs for C#/Java/.NET which are included in any IBM Cognos installation. Typically in /sdk
SDK examples can be found in /samples for any of the above languages.
IBM 11.1.x documentation on SDK
For Java you would use the following libs:
activation.jar
axis.jar
axisCrnpClient.jar
commons-codec-1.4.jar
commons-collections-3.2.jar
commons-configuration-1.4.jar
commons-discovery-0.2.jar
commons-jxpath-1.3.jar
commons-lang-2.3.jar
commons-logging.jar
dom4j-2.0.0-RC1.jar
jaxrpc.jar
log4j-1.2.14.jar
log4j-1.2.8.jar
mail.jar
saaj.jar
wsdl4j.jar
xercesImpl.jar
xml-apis.jar
In the /samples directory are Code snipplets for almost anything to get started with.
How do you guys integrate with Cognos?
Here are three examples with source-repos on Github using the IBM Cognos API:
BusinessAnalyticDashboard retrieving data using Angular
TicketDashboard retrieving data using Angular
Very Nice Collection of Cognos commandline tools
Collection of tools using the API
TM1
As you tagged your question with TM1, I suppose that you are especially looking for TM1 API. The TM1 exposes functionalities that are unique to TM1 using a similar aproach as the Cognos REST-API coming since v10.
{service} can be: v1/Cubes, v1/Process or v1/Processes ... See documentation and documentation Planing Analytics 2.0 for details.