Can you provide an example of calling putMFARequestForSite with com.yodlee.core.mfarefresh.MFAQuesAnsResponse? - yodlee

API Docs:
https://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/Aggregation_REST_API_Reference/putMFARequestForSite
First, is the property that needs to be specified for security question responses QuesAndAnswerDetails or quesAnsDetailArray? Both are used in the docs, but neither worked for me.
And are these the sub fields that need to be specified?
answer
answerFieldType
metaData
question
questionFieldType
The pulled MFA form specifies 'responseFieldType' instead of 'answerFieldType'.
It'd be very helpful if the docs provided sample requests in addition to sample responses.

Here is the parameter sample which you can refer
cobSessionToken = 73832732723dasd131d
userSessionToken = 312371283712asd12312
memSiteAccId=10059700
userResponse.objectInstanceType=com.yodlee.core.mfarefresh.MFAQuesAnsResponse
userResponse.quesAnsDetailArray[0].answer=karnataka
userResponse.quesAnsDetailArray[0].answerFieldType=text
userResponse.quesAnsDetailArray[0].metaData=QUESTION_1
userResponse.quesAnsDetailArray[0].question=What is the name of your state?
userResponse.quesAnsDetailArray[0].questionFieldType=label
userResponse.quesAnsDetailArray[1].answer=Saint Paul HR SEC School
userResponse.quesAnsDetailArray[1].answerFieldType=text
userResponse.quesAnsDetailArray[1].metaData=QUESTION_2
userResponse.quesAnsDetailArray[1].question=What is the name of your first school
userResponse.quesAnsDetailArray[1].questionFieldType=label
Also answerFieldType will take the value of the responseFieldType from getMFAResponseForSite API

Related

karate - how to read individual values from database query instead of hardcoding [duplicate]

This question already has an answer here:
Error using DBUtils in first scenario [duplicate]
(1 answer)
Closed 1 year ago.
In karate, I am trying to read database query
* def AccountDetails = db.readRow('select * from ')
From this I am trying to read individual values from this query and set this to one value
* set oimattrDetails $.User Login = AccountDetails.UD_BLR_USR_USER_LOGIN
Here, UD_BLR_USR_USER_LOGIN - is of the attribute present in the particular database
I do not want to hard code this value at this point. Instead assign this to some reference value and call it
*def USER_LOGIN = UD_BLR_USR_USER_LOGIN
Now use USER_LOGIN
* set oimattrDetails $.User Login = AccountDetails.USER_LOGIN
Something like this..But this is not working
Can any one help me here with exact syntax to use
A lot depends on what is the type of object returned by this code:
db.readRow()
That code is not part of Karate and you should provide more details here on that part - otherwise no one can help you. If it is not written by you, talk to the person or team who has written it - there is no point in talking about database "attributes". Maybe a simple solution is to add some Java code to the db object (I am assuming this is a Java utility) - to solve for your specific use case.
In short, your question sounds to me that it has nothing to do with Karate.

#PathParam Vs #QueryParam vs #MatrixParam

I am newbie in RESTful jersey.
I would like to ask what is the different among '#PathParam' Vs '#QueryParam' vs '#MatrixParam' in jersey?.
Can't help you with the #MatrixParam but can give you an answer for the other two:
#PathParam: you use placeholder in the path. For example: #Path("/demo/{id}"). In this case the {id} part is your placeholde which you get with #PathParam("id")
#QueryParam: you use the normal uri query Syntax. For example: google.com?q=searchquery which translates to: #QueryParam("q") in your application

What is the best way to call channel9 api for getting video?

Lets say that i have URL to channel9 movie;
Ex: https://channel9.msdn.com/Series/Office-365-Tips--Tricks/01-Wprowadzenie
And I want to display this movie on my site, and display some information for it ex. duration.
All what I know already is that, I can get list of movies by calling
https://channel9.msdn.com/odata/Entries and skipping it +25 for showing next 25 results.
My implementation right now is something like:
Get first 25 elements from api
Iterate throught them
compare my url with elementFromApi[i].url
Its working but I don't like this solution, it is non elegant and slow as hell. I have no knowledge about the api so i dunno know how to refactor this^.
Maybe someone of You can help me.
PS. I need information from api, embed iframe with given url is not the solution here :)
PS2. Sorry for my english.
I got this requirement through my client and I ended up doing it using RSS! In your use case the URL is https://channel9.msdn.com/Series/Office-365-Tips--Tricks/01-Wprowadzenie - Simply we can read the rss by using the link https://s.ch9.ms/Series/Office-365-Tips--Tricks/rss/mp4 - In PowerShell we can explore the content with the below piece of code
$Sessions = Invoke-Restmethod -Uri 'https://s.ch9.ms/Series/Office-365-Tips--Tricks/rss/mp4' -UseDefaultCredentials
foreach($Session in $Sessions) {
$Duration = [timespan]::FromSeconds($Session.duration)
[pscustomobject]#{
Title = $Session.title
Duration = ("{0:0}:{1:00}:{2:00}" -f ($Duration.Hours , $Duration.Minutes , $Duration.Seconds))
Creator = $Session.creator
"URl(MP3)" = $Session.group.content.url[0]
"URl(MP4)" = $Session.group.content.url[1]
"URl(webm)" = $Session.group.content.url[2]
"URl(MP4High)" = $Session.group.content.url[3]
}
}
Note: Code needs to be improvised!
The same can be achieved using C# - But I am not a certified developer - So , I used PowerShell to meet client requirement.

Dimensions of query webmasters tools api

specially Alex :)
I want to know if any body have a PHP code to get the details of a query from webmasters tools api.
I have already the query dimensions but I dont't know how exactely to make it with PHP code.
$webmastersService = new Google_Service_Webmasters($client);
$searchanalytics = $webmastersService->searchanalytics;
$request = new Google_Service_Webmasters_SearchAnalyticsQueryRequest;
Supposing, that you have all credentials and tokens. If you don't have them, you'll get (401) Login Required error.
Making request you can set startDate, endDate, searchType, rowLimit via setter methods like this:
$query->setStartDate('2015-11-10');
But some methods require array like setDimensions:
$query->setDimensions(array('page'));
To more complicate the things setDimensionFilterGroups method requires array of Google_Service_Webmasters_ApiDimensionFilterGroup . And every Google_Service_Webmasters_ApiDimensionFilterGroup instance requires filters to be set via setFilters method with an array of Google_Service_Webmasters_ApiDimensionFilter.
And for Google_Service_Webmasters_ApiDimensionFilter you can set dimension, operator and expression via setDimension, setOperator, setExpression methods.
For additional info on these types, classes and methods please refer to https://github.com/google/google-api-php-client/blob/master/src/Google/Service/Webmasters.php
Consider, you want pages (dimensions=page) the given day (startdate, enddate) and filter results for a given search query. To create a filter you need to set dimension to query, operator to equals and expression to your keyword.
This request in API Explorer looks like:
So the code to get all pages of example.com site that were displayed 2015-11-10 in reply to "weird things" search query is below:
$query = new Google_Service_Webmasters_SearchAnalyticsQueryRequest();
$query->setDimensions(array('page'));
$query->setStartDate('2015-11-10');
$query->setEndDate('2015-11-10');
$filter = new Google_Service_Webmasters_ApiDimensionFilter();
$filter->setDimension('query');
$filter->setOperator('equals');
$filter->setExpression('weird things');
$filtergroup = new Google_Service_Webmasters_ApiDimensionFilterGroup();
$filtergroup->setFilters(array($filter));
$query->setDimensionFilterGroups(array($filtergroup));
$response = $service->searchanalytics->query('http://example.com/', $query);
That is simplified demo code. May be it has some mistakes.
And I want to note, that Python API is much easier and clearer.

Sap Code Inspector - Generating a table of all PCodes linked to the classes

I have problems to read the error codes and corresponding messages of SCI message classes.
Is there an way to easy access those?
I'm using "Praxishandbuch SAP Code Inspector" as a reference, but in that regard it is of no help.
I looked in Se11 but the information to the messages isn't helpful.
Has someone an approch to build such a table?
You can try this, perhaps it will work for you. I use the code below to get the access to all the errors found by Code Inspector for particular user(s):
data: ref_inspec_a type ref to cl_ci_inspection.
ref_inspec_a = cl_ci_inspection=>get_ref(
p_user = pa_iuser
p_name = pa_inam
p_vers = pa_ivers ).
data: ls_resp type scir_resp,
lt_resp type scit_resp.
clear: ls_resp, lt_resp.
ls_resp-sign = 'I'.
ls_resp-option = 'EQ'.
ls_resp-low = pa_fuser.
insert ls_resp into table lt_resp.
call method ref_inspec_a->get_results
exporting
p_responsibl = lt_resp
exceptions
insp_not_yet_executed = 1
overflow = 2
others = 3.
Playing around with LT_RESP you can get results for more users at the same time.
After you execute the code above, you can check the attributes SCIRESTPS and SCIRESTHD of the object REF_INSPEC_A. These are the large tables, which contain the result data of the SCI check. You can either work with them on your own, or you can simply pass the object REF_INSPEC_A into the function module SCI_SHOW_RESULTS to get regular SCI user interface.
I found out that you can get all the changeable messages (found in SCI GoTo/Management Of/ Message Priorities) can be read from the scimessages attribute of the test classes.
With this help you can get about 60% of all errors.