Access to Azure Devops working elements via C# - c#

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

Related

How to use OneDrive CSharp SDK as a Service or daemon app?

I am coding against the OneDrive C# SDKand I have a few questions.
Question 1.
Does the OneDrive C# SDK use the Microsoft Graph API under the hood?
... If so, how can I use the SDK to pass in my client_Id and client_secret and authenticate as a service or daemon app instead of a traditional OAuth for a user?
I have proofed out the authentication for a service with REST calls but I am trying to proof out if it is still possible to use a C# SDK instead.
Question 2.
I found this article Azure Active Directory Graph Service Tutorial. After following the example I am able to create an HTTP POST call and return an access_token. My question is there a way to use this token in conjunction with the Microsoft Graph CSharp SDK or OneDrive CSharp SDK to serve as the authentication process?
Update:
Okay, I was able to proof out some more and having a working code, but I am now getting an error around {Code: InvalidAuthenticationTokenMessage: Access token validation failure.
I did the exact same call with Postman and was able to get data back with REST calls, is REST the only way to achieve this?
I created a gist for my attempt: Code
Solved
On line 62 in the gist, I was hitting the wrong resource. The correct resource is https://graph.microsoft.com

IBM Cognos REST Services using C#

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.

Is it possible to point multiple 'back-end' APIs to one proxy in Azure API Management?

Google gave me no answers.
But essentially what I'd like to do is point our old (badly)hand-built REST api to API Management and have our apps access it trough the new API Management proxy.
Then I'd like create a brand new .NET WEB API and point it to the same proxy and slowly port endpoints from the old api to the new .NET WEB API.
The API consumers (by proxy), never being aware that there has been a switch.
So, is it possible to create "composite" APIs using multiple back-ends in Azure API Management?
Please see discussions on MSDN forums here: https://social.msdn.microsoft.com/Forums/azure/en-US/3f1f19bf-e4c4-486d-b412-7cd8a5509cac/is-it-possible-to-point-multiple-backends-to-one-proxy-in-azure-api-management?forum=azureapimgmt

Getting Magento Version Using SOAP API V2 and C#

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();
}

Using IBM FileNet Web services in C# Application

Our organization uses IBM FileNet as document management system. FileNet P8 comes with a web services API which can be used in .net
Has anyone of you guys tried this? If yes could you please direct me to any resources to kick start?
Thanks a ton in advance.
http://publib.boulder.ibm.com/infocenter/p8docs/v4r5m1/index.jsp?topic=/com.ibm.p8.doc/developer_help/content_engine_api/guide/gs_procedures.htm
The FileNet API comes in 5 flavors:
Java - jar reference, configure to use either http or iiop transport
.NET - .NET dll reference, configure for http transport
CEWS - Content Engine Web Services. Use only if you can't use the Java or .NET API
CMIS - web service conforming to the CMIS spec
COM - semi-legacy, not discussed in the docs, but it does exist
Although the .NET API uses web services in the background, your .NET project reference is to FileNet.Api.dll, rather than directly to the WSDL. So if you're a .NET shop, you want the .NET API, not the "Web Services API" (2012-02-03 edit: unless you opt for CMIS)
The best place to get started is the "Bulk Loader Sample Code" here: http://www-01.ibm.com/support/docview.wss?rs=3278&uid=swg27010422
You're in the right place for documentation related to the P8 .Net API. The only other "kick-start" link I can think of is http://www.ecmplace.com/.
I know how to create a session using the Java API for the CE, but I'm sorry to say that I haven't done it with the .Net API. However, I'm fairly certain that you'll find helpful examples on the ECM Place forum.
HTH!
Tom Purl

Categories