How to get SAP SuccessFactors Employee Central - /EmpEmployment API expand parameter values? - sap-successfactors

We are integrating the SAP successfactors /EmpEmployment rest API using oauth, and we are getting the data depends on the expand parameter values (PFA).
expand parameter names
And we have observed that expand parameter having five different values, those values will consist or not ?
Do we have any API to get those expand parameter values?
So that we can get clarity for passing same values same expand values every time.
Could any one help on this?

Related

Pass query parameter value to utm values

I have a wired scenario where we use custom utm parameters to track all the redirects. But these custom parameters doesn't works like the utm parameters in the analytics on various platforms. I always have to manually combine standard utms report with custom utms report to present the data.
I have set up these custome utm variables in GA and GTM
mmedium
msource
mcampaign
I want the values from the above parameters to be stored in GA under the standard parameters
1.utm_medium
2.utm_source
3.utm_campaign
URL that redirects are now structured like this now - www.website.com?mmedium=soical&msource=fb&mcampaign=test
How can I do this?
Thanks in Advance
I do not know where to start on this.

Azure Data Factory: Pagination in Data Flow with Rest API Source

I have a API source in an ADF DataFlow task. The API source gives me the current page and the toatl number of pages in the body of the response. I want to use that information to paginate through my API source. I'm able to paginate through it just fine outside of a DataFlow activity using the range function. The issue is that the Rest transformation in a DataFlow activity does not support the range function. I've been trying to use the AbsoluteUrl function plus an expression to do add one to the current page returned by the body but either pagination does not accept expressions or I cannot figure out the syntax
I have a url like this:
BaseURL/fabricationcodes?facets=relatedArticles:Not%20Empty&page={PageNumber}.
In this example my rest linked service URL has everything I need minus the &page=pageNumber. So I'm trying to add that part with the key/value pair function of AbsoluteUrl. The Key being &page= and the value should be currentPage +1. My desire is for it to get the first page, page 0 and then add +1 to that to formulate the next pages url. the end condition being when body.totalPages == body.currentPage
I've tried a bunch of different expression formaulations but none seem to work and debugging in a Data flow is tough b/c the logging and error messaging is poor
What I have right now.
As data flow don't support Range option or you cannot use dynamic expression to get page from API response.
To work around the issue, you can use Data Flow activity within ForEach loop using range function in dynamic expression.
First take a web activity and pass the URL of the Rest API as below Ito get the total no of Pages from API response
then take a for each activity to iterate on API like pagination give the Dynamic expression as #range(1,activity('Web1').output.total_pages)
I will iterate the API till the respective range in sequential manner.
create parameter with type string in source DataSource.
give that parameter as dynamic value in relative URL.
after this gave parameter value as ?page=#{item()} to give the no coming from range to the page.
OUTPUT:

Specify Global Time Range on Azure DevOps API Calls

I am using the Azure DevOps API to put together a report of build metrics. I am looking for a way to add a global time range query parameter to my calls, so that I am only querying items that occur within the range of time x and time y.
It appears some specific calls contain a query parameter such as a "creationDate" or "startTime"; however I am unable to find a way to globally limit the date range of API calls I make. I am using a large selection of REST endpoints and many either do not contain a time range query parameter or use a different implementation method to accomplish the same thing.
In short, I am looking for a way to globally limit the Azure DevOps REST API with either a query parameter or an API key setting to return results within a specific range. Is this possible?
I am looking for a way to specify a time range such as "get all builds
that ran within the last week" or "get all pipelines created within
the last month" without modifying my code to parse these elements from
each response.
If so, agree with Krzysztof Madej, if the rest api does not provide parameters to specify the date range, there should be no out-of-the-box method to achieve this demand.
The Builds-List rest api provides parameters such as maxTime, minTime to specify the date range, while the Pipelines-List rest api does not provide such parameters to specify the date range.
So, if you don’t want to modify the code to parse these elements from response, I think this is currently impossible.

Is there a way to prevent Spring Cloud Gateway from reordering query parameters?

Spring Cloud Gateway appears to be reordering my query parameters to put duplicate parameters together.
I'm trying to route some requests to one of our end points to a third party system. These requests include some query parameters that need to be in a specific order (including some duplicate parameters), or the third party system returns a 500 error, but upon receiving the initial request with the parameters in the proper order, the Spring Cloud Gateway reorders these parameters to put the duplicates together by the first instance of the parameter.
Example:
http://some-url.com/a/path/here?foo=bar&anotherParam=paramValue2&aThirdParam=paramValue3&foo=bar
Becomes:
http://some-url.com/a/path/here?foo=bar&foo=bar&anotherParam=paramValue2&aThirdParam=paramValue3
Where the last parameter was moved to be by the first parameter because they had the same name.
The actual request output I need is for the query parameters to be passed through without change.
The issue lays in the UriComponentsBuilder which is used in RouteToRequestFilter.
UriComponentsBuilder.fromUri(uri) is going to build up a map of query params. Because this is a LinkedMultiValueMap you see the reordering of the used query params.
Note that RFC3986 contains the following
The query component contains non-hierarchical data that, along with data in the path component (Section 3.3), serves to identify a resource within the scope of the URI’s scheme and naming authority (if any).
Therefor I don’t think there needs to be a fix in Spring Cloud Gateway.
In order to fix this in your gateway, you'll need to add a custom filter which kicks in after the RouteToRequestFilter by setting the order to RouteToRequestUrlFilter.ROUTE_TO_URL_FILTER_ORDER + 1.
Take a look at the RouteToRequestUrlFilter how the exchange is adapted to go to the downstream URI.
Hope that helps! :)

Include multiple query parameters in HCM cloud rest Get call

I have an hcm cloud instance. I'm working on the rest api which are provided by the cloud.
I want to get an employee by matching both PersonNumber as well as DateOfBirth.
But whatever I tried based on the first parameter, I'm getting the output. Second is not even checked.
Can anyone help?
This is the rest url I'm using
https://host:port/hcmCoreApi/resources/11.12.1.0/emps/?q=DateOfBirth=1991-09-19&PersonNumber=240
For passing multiple search items in a query parameter in a rest call, the structure should be as following
https://host:port/hcmCoreApi/resources/11.12.1.0/emps/?q=DateOfBirth='1991-09-19'&PersonNumber=240
Basically quotes '' are required around String inputs and integer can be passed directly.