Am facing a challenge while trying to keep the resource dynamic for a test step ( Rest Based ) .
Would like to elaborate the issue with below example .
Let's assume that , the endpoint URL is "https://abcxyz.com" which is set in the environment and added under the APIs list at Project level .
In total , there are two APIs to be used having said that the second API's resource is dependent on the first API's request/response .
1st API resource: /api/jobs
Here the user needs to provide a job ID in the request and expecting a success response .
Let's assume the job ID is : "JOB00001"
2nd API resource: /api/jobs/JOB00001
Here the resource is dependent on the Job ID used at 1st API .
Target : Need to automate the process , hence need a data generator to prepare the resource sequentially . Ex : The next job ID should be JOB00002 and the resource for 2nd API should be "/api/jobs/JOB00002"
Achieved so far : Am able to store the full resource with sequence generator as expected in a variable ( custom property ) at test case level .
Challenge : The resource part at test step level is looking for a fixed input data . It does not work if provided a reference to get data from test case level-custom property .
It will be really helpful if someone could help me with this issue .
ReadyAPI Version : 3.10.1
Related
I want to make script using jmeter for performance testing of login page . The authorization type is code and code challenge method is sh256. How could I fetch code challenge code verifier and state or noance values daynamically.
The script is successfull for 1 single user but failing for multiple can any one help? Also I am using blazemeter to record script..
The process of "fetching" dynamic values is known as correlation and there is a lot of information on the topic in the Internet, i.e. How to Handle Correlation in JMeter
The main steps are:
Use a suitable JMeter Post-Processor to extract a dynamic value from the response into a JMeter Variable
Replace recorded hard-coded value with the JMeter Variable from the previous step
I have created a small identity network using Insomnia workspace as it described here https://developer.oftrust.net/guides/workflow-using-insomnia-workspace/ I have account on sandbox.
I wanted to validate the identity graph was created as defined so I tried some requests from Identity API. As described in docs here. Tried https://api-sandbox.oftrust.net/identities/v1/discovery with query parameters values:
fromId : <building_identity_id>
linkContext: https://standards.oftrust.net/v2/Context/Link/BelongsTo/
identityContext: https://standards.oftrust.net/v2/Context/Identity/Equipment/Device/
linkDirection : IN
maxDepth : 5
offset: 0
limit : 100
and got in response identities object with some identities.
Then I tried https://api-sandbox.oftrust.net/identities/v1/dataDiscovery with query parameters values:
fromId : <building_identity_id>
linkContext: https://standards.oftrust.net/v2/Context/Link/BelongsTo/
identityContext: https://standards.oftrust.net/v2/Context/Identity/Equipment/Device/Sensor/TemperatureSensor/
linkDirection : IN
maxDepth : 5
offset: 0
limit : 100
and got response with "dataProducts": {}
What is wrong in above https://api-sandbox.oftrust.net/identities/v1/dataDiscovery request?
I see https://standards.oftrust.net/v2/Context/Identity/Equipment/Device/Sensor/TemperatureSensor/ is defined and it was used as context in Insomnia workspace setup of identity network.
You need to use another query parameter, basically which discovers the AtDataProduct type of Link ( which has been created between Sensors and Data products)
atDataProductContext : https://standards-ontotest.oftrust.net/v2/Context/Link/AtDataProduct/
See this note from guide:
A special link type is AtDataProduct. In an identity network, a sensor identity MUST be connected to a Data Product with a link type AtDataProduct. The direction MUST BE "from sensor to Data Product". This is important to consume harmonized data flow in an identity network.
In a nutshell, part of the identity network should be something similar to this:
Temperature Data Product <--AtDataProduct-- Temperature Sensor --BelongsTo--> Room
I want to get all entities which are the name not start the prefix as 'msdn' from ms dynamics.
I tried the below APIs, got the error.
GET /api/data/v9.1/EntityDefinitions?$select=LogicalName&$filter=not startswith(LogicalName,%27msdn%27)
Response :
{
"error":
{"code":"0x0",
"message":"The \"startswith\" function isn't supported for Metadata Entities."
}
}
I referred https://learn.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/query-data-web-api#standard-query-functions
I have checked that in one of my environment as well. What you require is not possible.
You will have to go 2 steps.
Retrieve all entities and then filter them out in your local program may it be JavaScript/C# or Json filtering/Power automate or something.
Does anyone know how to use WSO2 api manager to specify all query parameters as optional through URL pattern specification in WSO2 API Manager UI(Paath Params also present in the same URI)? for example, I have a API which will be registered in WSO2 api manager , and its uri is 'search//?type="xx"&status="yy"', currently both of these 2 query parameters (type & status) are optional and is pathparam.
I specified URL Pattern "search/{stationcode}*". Now I am calling with path param only, it gives Error "No matching resource found in the API for the given request".
I call "search/TAMK", it is not working. But if I use "search/TAMK?" or "search/TAMK*" or "search/TAMK*", it works just fine.
I tried to use "search/{stationcode}/*", but still it did not solve the issue. It is always expecting one character for queryparam. Can any one please help me to solve this. Without query parameter it should work, right?
I would suggest you to use the new API Manager (1.9) and try the following.
Create an API with the backend URL of
http://...../search
when you define the URL patterns you can define the following pattern
/{stationcode}*
and you can add 'type' and 'status' as optional parameters in the design view of the API creation page. You can choose the parameter type as 'query' and Required as 'False'
I have been trying to use the EventMerics API to return detailed event parameter data.
I have setup a test application and have uploaded event data with parameters, I can see the data in the web interface.
However the API doesn't seem to return the parameter data as stated by the documentation.
The following call
http://api.flurry.com/eventMetrics/Event?apiAccessCode=xxx&apiKey=xxx&startDate=2012-08-27&endDate=2012-08-27&eventName=heatmap%20-%20iPhone-Title-all
returns:
<eventMetrics type="Event" startDate="2012-08-27" eventName="heatmap - iPhone-Title-all" endDate="2012-08-27" version="1.0" generatedDate="8/27/12 10:45 PM">
<day uniqueUsers="2" totalSessions="12" totalCount="14" date="2012-08-27"/>
<parameters/>
</eventMetrics>
....
The parameters section is empty, I am expecting the following parameter values:
{touchXY : 299,465,2012-08-27 16:40:15 +0100}
{touchXY : 301,461,2012-08-27 16:29:03 +0100}
{touchXY : 192,312,2012-08-27 16:22:54 +0100}
{touchXY : 254,461,2012-08-27 16:23:04 +0100}
Has anyone got parameter values to return via the Flurry REST API?
the API call used by you is correct. I would recommend you to write to support#flurry.com to investigate why this is not happening.
(Disclaimer: I work in the Support team at Flurry)
The event name in the request is case sensitive so you should check the way it's written on the site. I changed mine from "editor" to "Editor" and the problem resolved.