Informatica using URI based REST API - api

I'm having real trouble getting Informatica PowerCenter or Developer to call a URI based REST API and I'm doing it for something simple (JIRA's API). Basically I want to call JIRA's worklog REST API which is a different URL for a list of issue ids and write it to our DB.
https://docs.atlassian.com/jira/REST/6.2/
/rest/api/2/issue/{issueIdOrKey}/worklog
Informatica PowerCenter supports only HTTP transformation which is only a simple GET. Unfortunately the latest version is still stuck in the 'old' query type URL building where they append inputs into search strings. E.g. if I have a "key" input field with value "ABC-1" and the URL is jira/rest/api/2/search it would actually build the URL on the fly into jira/rest/api/2/search?key=ABC-1. While some of JIRA's API works this way, some use the URI way e.g. jira/rest/api/2/ABC-1/worklog which requires embedding the value into the URI. There's no way I can get this to work :-
if I do jira/rest/api/$key/worklog it still converts the URI into jira/rest/api/$key/worklog/?key=ABC-1 so $key does not get replaced
even if i pre-build the URI outside the mapping it's not feasible as the URI needs to be dynamic to the list of JIRA keys and anyway because it appends ? at the end JIRA throws an error (because ? is a reserved key word for this API)
HTTP transformation does not support NTLMv2 authentication which our company's JIRA instance may upgrade to shortly
Last resort is to use a Java transformation in which Informatica has quite little value add. This also means I need to somehow pass in the JIRA user password for authentication which is a separate challenge (versus just storing as a HTTP connection)
Informatica Developer supports REST Web Consumer Transformation but has similar limitations with only building query type URL. Even worse I can't even dynamically build the URL since it's fixed to the HTTP connection object URL.
Am I straight outta luck?

I got the query and here I would like to answer about this. I can write here only points and it might be you won’t be able to understand that thing properly. So Here I am putting link of blog where the task "how to informatica read rest api is mentioned in detail step by step with video tutotial. Some examples are also there. Feel free to visit
https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/
Hope it will help.

Related

Do I need to migrate an action to v2 that doesn't use Dialogflow?

Google sent me a reminder to migrate from Dialogflow API v1 to v2. I don't use Dialogflow. The skill is connected to custom Python code on our own servers. Our code gets JSON and returns JSON. Should I be concerned?
What you've described still could be using Dialogflow, since Actions using Dialogflow can also be written in Python and receive JSON.
Some things that might be indicators:
If you have an actions.json file, and deploy this when you update your Action, you are probably not using Dialogflow.
If the JSON you receive contains an attribute "result" or "originalRequest" (or both), then you're using Dialogflow's fulfillment webhook protocol.
If you're looking at inputs[0].intent to see what Intent was triggered, and the value either matches one in your actions.json or a string such as actions.intent.TEXT, then you're using the Actions SDK and not Dialogflow.
If you were looking at result.metadata.intentName to get the name of the Intent, then you're using Dialogflow.
If you are using Dialogflow, you need to move to v2, which will require some changes in the names of several of the JSON fields. https://dialogflow.com/docs/reference/v1-v2-migration-guide-fulfillment#webhook_request_and_response_json (and sections further down on the page) provide information on the changes and what you'll need to do.
Yes! you should be concerned, I have faced the same issue as JSON has been changed for somethings already.

Bulk extract with Authenticated Connector (import.io)

I am new to import.io and this forum.
I am trying to extract information from a target database where I have to run a query with an input. With help of the support, I successfully created the authenticated connector. With multiple inputs that have to be manually entered in the UI, it fetches the data properly.
The problem is I have more than 10,000 inputs to run, so it has to be in a form of bulk extraction. import.io support told me that they do not have this feature within their UI and suggested to use their API posted in here: http://api.docs.import.io/#!/Query_Methods/queryPost.
Could anyone walk me through to make a use of this? I just need a working script that takes multiple string lines as inputs and run the connector that I built and post the result. I am not very familiar with this kind of technology but I am very willing to learn.
Thanks all in advance!
I would be happy to walk you through a bit of an into. It will be a bit basic though since I don't know your specific use case.
Yes, support was correct. You will need to use the POST query in order to pass your authentication credentials as inputs.
I will break down this query by steps. Essentially, our API docs are just a simple UI to pass through your credentials, then you can generate a query API.
ID - This is the GUID of your connector. This information can be found at the end of the URL, like this: https://import.io/data/mine/?tag=CONNECTOR&id=33f4e828-25ce-40c4-948c-9b734c70d1ab
Query - This is where you will put the inputs from your connector in order to execute. Be sure to keep this in structured JSON or it will bring back errors when you are querying.
Once you have successfully entered that information you will query the API.
This will give you the request URL that you need to query the API.
If you have anymore questions, just let me know.
Thanks,
Meg

How to find the source location of a dynamic token in JMeter?

I've been using Fiddler tool to capture the HTTP request-responses, then manually finding out the source location of a dynamic token (in a recorded page). I'd then use regular expression extractor on that source page to extract and store the value of that dynamic token in a variable, and use that variable in later pages.
Just wondering if there's an easier way for this. Is there any tool in JMeter that can help us find the source location of a dynamic token?
Thank you,
--Ishti
As of may 2015, there's nothing available OOTB except to save request / responses to file with ViewResultsTree and search in resulting file, or search in each response in ViewResultsTree gui.
An option would be to write a BackendListenerClient implementation that writes data in jdbc or ElasticSearch instance and uses it to search through SQL or elastic search queries.
A contribution would be welcome.
It is possible that this is implemented in future releases.

RESTful API GET method parameters

We are creating a RESTful API (PHP on apache server) which will communicate with an Android application. Im new for this so excuse me if my question is dumb.
I want to ask for data from the api so I need to use GET method in the request taking into account the semantics. I have to send some additional data to specify what data am I requesting. In GET requests, I cannot send form data fields so how should I attach the data?
Using POST (but this is not semantic)
request header: POST http://example.com/api/v1/serials
request data: date_from=2013.01.01&date_to=2014.01.01&userid=112&is_in=0&starts_with=afx00
using GET and adding url params (I don't know if is this a good practice in a REST API)
request header: GET http://example.com/api/v1/serials?date_from=2013.01.01&date_to=2014.01.01&userid=112&is_in=0&starts_with=afx00
or making well formed URIs with no url params in GET (not sure about this as well.)
request header: GET http://example.com/api/v1/serials/date_from/2013.01.01/date_to/2014.01.01/userid/112/is_in/0/starts_with/afx00
Which one fits the best in the RESTful API architecture? Which should I use and why? Or maybe are there any other options for what I want?
Without question using URL parameters is best. It allows consumers to query for serials using their choice of filters. Your API should support returning results based on UserId alone, or a date range, or both. Or other combinations of inputs that make sense.
Embedding the key/value pairs of the filter in the resource path is an anti-pattern. It's difficult to understand what each path element means, and you would need to contort your routing engine to accommodate additional filter criteria. It also provides no flexibility in terms of choosing what filter criteria to use - you would in fact need to construct multiple resources paths for each combination of filters. And there is the management of ordering each pair (with URL params, ordering doesn't matter). Probably more reasons to avoid this, but those are the first that spring to mind.
Bot GET methods can be used. It is your choise. But I'll prefer using url params. It is easier.

Gwt accessing Session id in Client side

atm i have a JSP (my Host page) where i set the Session id via scriptlet with the Request Object. I save this Information in an hidden field and read it with the gwt DOM Object. Is there à better way to do this ? Thanks in advance for help.
Kuku
Depending on your setup this is a valid way to get a hold to a session ID. I assume you have written just a part of you web application in GWT and integrate it into something bigger written in some other language. Since your host page is JSP, I assume the non GWT part of your application is also dynamic.
I don't think that the proposed solution using a GWT service call works in this case. Since you can not match the session ID on the server to the incoming AJAX call.
Instead of using a hidden field, you could encode the session ID in the URL and get it from there, see getParameter(...):
http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/user/client/Window.Location.html#getParameter%28java.lang.String%29
But I actually prefer the solution with the hidden filed, because it does not affect the URL. If you encode transient information in the URL you may lose the ability to bookmark it.