Searching a draft scenario, the api returns an empty array, and did not tell me a error type: Voximplant Kit - voximplant

https://voximplant.com/kit/docs/references/kit/scenarios#searchscenarios
Are the scenarios that I get via searchScenarios method limited by some status, like "in use"? I search a draft scenario, the api returns an empty array, and did not tell me a error type.

The searchScenarios method returns all scenarios by default. You may use additional parameters like 'with_campaigns' or 'with_phones' to see if the scenario is in use. You may see all the additional parameters in our documentation: https://voximplant.com/kit/docs/references/kit/scenarios#searchscenarios

Related

API additional id,

I'm trying to get data from my limesurvey and wonder why in API request I need to pass id: 1 as the third body parameter.
{method:'get_session_key',params:['myusername','mypassword'],id:1}
If I omit id or pass id:0, I will get the response data with an empty string. I can put any positive and negative integers there and I don't know exactly why it is required.
I'm following instructions on RemoteControl 2 API
That's the request id.
On the jsonRPCClient (component outside of LS) code it is fixed to 1.
I think it is part of a standard to use notifications, which are not used on LS API.
So, just fix it to 1 :)

How to filter with "_links" properties params on API.v3 in openproject

I just learned to use "hypermedia rest API" on openproject
I want to use "filter" param with "_links" properties on API but not know-how
Example:
http:/<my_domain>/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}, "_links":{"type":{"title":{"operator":"=","values":["Box"]}}}]
==> My Question:
i not known use to "_links":{"type":{"title":{"operator":"=","values":["Box"]} params filter. Now, result is not filter for "_links"
And show me books name to learn API for to beginner
? (https://www.oreilly.com/library/view/restful-web-clients/9781491921890/ch04.html#callout_hal_clients_CO1-1) -> is this ok?
Help me, please!
Thanks!
Image for my api
What I understood you wanting to achieve is getting all work packages in the project "design" that have been updated last within a certain time interval and that are of the type "Box".
The filters in OpenProject do not differentiate between native properties (like updatedAt) and linked resources (like type) when it comes to the structure of the filters. The syntax is always
{"<name of the filter>": {"operator": "<operator>": "values": [<list of values>]}}
When it comes to the filter values however, there is a difference. For linked resource the client is expected to use the id whereas native value like an integer, string or date is required for the native properties.
For your request the above requires the client to issue the following query:
GET http://domain/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}}, {"type":{"operator":"=", "values":["10"]}}]
I took the id of 10 for the type "Box" out of the screenshot you provided.
To get the filter values of all available filter you can call
POST http://domain/target/api/v3/queries/form
with a body of
{"name":"default","_links":{"project":{"href":"/api/v3/projects/design"}}}
The response will list all available filters in the _embedded/schema/_embedded/filtersSchema array.

Karate : Is it feasible to iterate Url to support pagination

I have a rest endpoint with pagination, I want to verify expected parameter exists by traversing through all pages. One option I could think of is to have an array defined with page offset intervals like {0,25,50....}
Welcoming better approaches. Is it feasible to break the loop when my expected condition is met?
ex: Given url 'http://myhost.com/v1/cats/'+'#(offset)'
And request {name : 'Billie'}
When method post
Then status 201
Note: have not tested the above code, looking for better approach.
You should be able to figure this out with conditional logic: https://github.com/intuit/karate#conditional-logic
There should be some part of your response that tells you whether there is a "next" page or not. There are ways you can "loop" manually, refer this part of the docs: https://github.com/intuit/karate#polling

How do I use the query parameters in the Dark Sky Forecast API ?(forecast.io)

I'm using the Dark Sky Forecast API to retrieve some weather information.
When I read the official doc, I found that the "option" section describes the usage of query parameters.
For example,
The API request may optionally be modified through the use of query parameters. It will respond to the following:
callback=[callback]: Return the API response as JSONP. Please use
caution when using this, since exposing your API key to the public is
a security hazard and, if abused, will result in the revokation of
your API key. However, if developing a personal- or internal-use app,
this is a convenient method of doing so.
units=[setting]: Return the
API response in units other than the default Imperial units. In
particular, the following settings are possible:
us: The default, as outlined above.
si: Returns results in SI units. In particular, properties now have the following units:
...
I know how to get the weather information by take advantages of the call
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE
But I don't know how to combine the query parameters with it.
Any ideas?
2015/10/23 UPDATE
Thank to Logan Kearns, using ? parameter solved my question. Make sure the query parameters are in lowercase.
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?lang=zh-tw&units=si
This is how you change the units. I assume that other query parameters would be set in a similar manner, using the '?' to separate them.
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?UNITS=us
Just an update, since url changed and with few other parameters:
You can add units to mention the type of unit conversion required
You can add exclude for excluding certain data in the response like hourly updates.
https://api.darksky.net/forecast/APIKEY/LAT,LONG?units=si&exclude=minutely,hourly,daily,alerts

Mandrill - The difference between global_merge_vars and normal merge_vars

I've looked at this Mandrill knowledgebase article over and over and cannot see any obvious explanation of what the difference is between Global Merge Vars and Merge Vars, and when I should use global vs normal.
Both global_merge_vars and merge_vars are declared within the 'message' object (as shown here in the Mandrill API), so it's not like you're declaring global_merge_vars outside the message object and then including multiple merge_vars.
Also - is there any difference between how these are declared in the template itself or do they all just use *|MERGE_VAR_NAME|* format?
The global_merge_vars parameter allows you to pass global values for a particular merge tag, to be applied for all recipients in that API call by default, while merge_vars allows you to specify per-recipient values based on the recipient email address (this is why the rcpt is declared for merge_vars). The content in the email or template doesn't vary - these API parameters are just distinct since they apply differently.
The template_content parameter is for editable regions in the template. More details here. Originally, Mandrill didn't support merge tags, and only supported editable regions in templates. For backwards-compatibility, template_content is still required when calling a template. It also helps to ensure that even if a template region isn't to be replaced, that's done explicitly by passing a blank array.
The Mandrill KB has quite a bit of info on various topics, and you can submit a support request there if you have questions specific to your account, or in general!
global_merge_vars: Give global or default values for merge tags by using the global_merge_vars parameter. These will be used in the case where a recipient doesn't have a recipient-specific value defined.
merge_vars: Use the merge_vars parameter to store recipient-specific values if sending to more than one recipient at a time.