GetResponse API v3 - Get contacts who open the newsletter - getresponse

I'm having a hard time finding for the API in getting the contacts of the people who open the newsletter after sending it to a list of email. In the official API documentation of GetResponse, I didn't find a solution. Any idea or suggestion can help. thanks.

Though it's rather old now, I'll try to answer, maybe it helps someone.
Just as inside GetResponse web interface, you'll need to search contacts according to some criteria. These pages of the API docs describe how this is done:
http://apidocs.getresponse.com/v3/resources/search-contacts
Search contacts is the most complex part of the API. To save a search of contacts who opened a particular message you'll need to POST something like below to https://api.getresponse.com/v3/search-contacts/:
{
"name": "test_conditions", //can be any you like
"subscribersType": [
"subscribed" //can also be "undelivered", "removed" and "unconfirmed"
],
"sectionLogicOperator": "or", //or "and"
"section": [ //section can have up to 8 conditions; one saved search can have up to 4 sections
{
"campaignIdsList": [
"V" //you'll need to get campaigns' IDs with http://apidocs.getresponse.com/v3/resources/campaigns#campaigns.get.all
],
"logicOperator": "or",
"subscriberCycle": [
"receiving_autoresponder",
"not_receiving_autoresponder"
],
"subscriptionDate": "all_time", //"today", "yesterday", "this_month", "last_month", "this_week", "last_week" are also possible
"conditions": [
{
"conditionType": "opened",
"operatorType": "message_operator",
"operator": "autoresponder", //or "newsletter", or "split"
"value": "WTjXF" //message id, should be firstly got with a separate API call
}
]
}
]
}
More info on how the payload for such requests should be formed is here: http://apidocs.getresponse.com/v3/resources/search-contacts-reference
And the last point: if you don't need to save a search but only get the emails who've opened a message, in the object above you should remove the "name" property and post this to http://apidocs.getresponse.com/v3/search-contacts/contacts
More: http://apidocs.getresponse.com/v3/resources/search-contacts#search-contacts.contacts.form

Related

How To Get Steam Under 10 $ Game Json Api

I need games under $10 on Steam. How should an inquiry be made for this?
api link here
In the link here, I can only fetch games under $10 as json, but there is no information such as game id prices.
I need these. Thank you
$steamUnder20 = Http::get("https://store.steampowered.com/search/results?maxprice=20&cc=tr&l=turkish&json=1");
$resultUnder = $steamUnder20->json();
Result :
"desc": "",
"items": [
{
"name": "Black Desert",
"logo": "https://cdn.akamai.steamstatic.com/steam/apps/582660/capsule_sm_120.jpg?t=1658233501"
},
{
"name": "Slime Rancher",
"logo": "https://cdn.akamai.steamstatic.com/steam/apps/433340/capsule_sm_120.jpg?t=1651003375"
},
Steam offers an endpoint called appdetails that allows you to fetch a whole lot information about one or multiple comma-separated game IDs specified in the appids parameter:
http://store.steampowered.com/api/appdetails?appids=1,2,3
According to the inofficial documentation by RJackson in the Team Fortess wiki you can specify the values you need in the filter parameter, otherwise the response will include all basic details: https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appdetails
In your case I suggest iterating through your response and parsing the gameID from the logo URL and using them collectively for the appdetails endpoint to fetch all the information.
Additionally, you can also use the cc parameter to specify a currency and the l parameter to localise the response. These parameters are not documented in the documentation by RJackson.

How to use filter based on rules for IBM Qradar Offenses via REST api?

I'm new to Qradar and facing difficulties in understanding filter parameter in Qradar REST api /siem/offenses. Can anyone suggest me how to use filter based on offense 'rules' field? As rules is a list of JSON objects, i'm finding it difficult to write filter.
sample offense with rules field
{
"username_count": 1,
"description": "String",
"rules": [
{
"id": 1,
"type": "String <one of: ADE_RULE, BUILDING_BLOCK_RULE, CRE_RULE>"
}```
]
}
We experienced a similar issue and find a way out, you can use 'contains' keyword to access list elements. For example, to filter rules[0]["id"] you could use:
rules contains (id = 42)

Microsoft Academic API, Knowledge graph search -- ReferenceIDs always empty

I'm using the graph search method of the Microsoft Academic API to retrieve citation IDs and reference IDs for a paper. However, while retrieving citation IDs works, the reference IDs field is always empty, even for papers which should have linked references. For example, retrieving this publication through the API:
POST https://westus.api.cognitive.microsoft.com/academic/v1.0/graph/search?mode=json
Content-Type: application/json
Host: westus.api.cognitive.microsoft.com
Ocp-Apim-Subscription-Key: my-api-key
{
"path": "/paper",
"paper": {
"select": [
"OriginalTitle",
"CitationIDs",
"ReferenceIDs"
],
"type": "Paper",
"id": [2059999322]
}
}
yields this response (I shortened the CitationIDs list for the sake of legibility):
{
"Results": [
[
{
"CellID": 2059999322,
"CitationIDs": "[630584464,2053566310,2239657960,...]",
"OriginalTitle": "Biodistribution of colloidal gold nanoparticles after intravenous administration: Effect of particle size",
"ReferenceIDs": ""
}
]
]
}
One thing I've noticed is that the graph schema provided here (at the bottom of the page) doesn't match the schema shown here (some of the attributes were renamed, e.g. NormalizedPaperTitle -> NormalizedTitle), so I thought the field was perhaps renamed to something else.
What is the correct query to get reference IDs through the API?
It should be ReferencesIDs, not ReferenceIDs

branch.io rest API for bulk link creation doesn't preserver order of request

We use POST /v1/url/bulk/:branch_key for batch deep link generation for some of our items.
The response returns an array of URL's alone. The links are working fine, but its not returned in the order of our items send as request.
Is there any way to identify which branch link belongs to which item?
At least if the response had item's id or some other custom data returned with it, we could identify the link correctly.
Any hope? Thanks.
At the most basic level, this information is available to you via the Links tab on the Branch dashboard's Liveview & Export page. You can see the last 100 links created on this tab. To see more, you can use the "Export Links" button that appears in the upper right hand corner of the page.
If you need this for more information than can be retrieved via "Export Links," you can have the app whitelisted for the Data Export API (see: https://dev.branch.io/methods-endpoints/data-export-api/guide/). This provides access to a daily collection of .csv files that would include links created and their metadata. To whitelist the app for the Data Export API you send a request to integrations#branch.io. Be sure to include the app's key and to send the request from an email address on the Team tab (https://dashboard.branch.io/settings/team).
You can also query links. For a single link, append "?debug=true" and enter this value into the address bar of your browser.
You can also script the lookup of link data using the HTTP API: https://github.com/BranchMetrics/branch-deep-linking-public-api#viewing-state-of-existing-deep-linking-urls
The Branch API also allows you to specify a custom alias (the URL slug), so if you simply want an easy way to tie specific bulk-created URLs to the data inside without querying a second time, you could use this as a workaround. Details here
The bulk creation link API would return the links in that specific order.
You can test out the same via creating 3 links and using a particular parameter to differentiate.
E.G :
curl -XPOST https://api2.branch.io/v1/url/bulk/key_live_xxxxxxxxxxx -H "Content-Type: application/json" \
-d '[
{
"channel": "facebook",
"feature": "onboarding",
"campaign": "new product",
"stage": "new user",
"tags": ["one", "two", "three"],
"data": {
"$canonical_identifier": "content/123",
"$og_title": "Title1",
"$og_description": "Description from Deep Link",
"$og_image_url": "http://www.lorempixel.com/400/400/",
"$desktop_url": "http://www.example.com",
"custom_boolean": true,
"custom_integer": 1243,
"custom_string": "everything",
"custom_array": [1,2,3,4,5,6],
"custom_object": { "random": "dictionary" }
}
},
{
"channel": "facebook",
"feature": "onboarding",
"campaign": "new product",
"stage": "new user",
"tags": ["one", "two", "three"],
"data": {
"$canonical_identifier": "content/123",
"$og_title": "Title2",
"$og_description": "Description from Deep Link",
"$og_image_url": "http://www.lorempixel.com/400/400/",
"$desktop_url": "http://www.example.com"
}
},
{
"channel": "facebook",
"feature": "onboarding",
"campaign": "new product",
"stage": "new user",
"tags": ["one", "two", "three"],
"data": {
"$canonical_identifier": "content/123",
"$og_title": "Title3",
"$og_description": "Description from Deep Link",
"$og_image_url": "http://www.lorempixel.com/400/400/",
"$desktop_url": "http://www.example.com"
}
}
]'
As you can see, we have used og_title as a unique parameter and the links created for your app would be in the same order.
Yes, You can identify link belongs to which item by using data of branch.io link , you can pass branch.io config parameter as well as your custom parameters.
Every Branch link includes a dictionary of key : value pairs that is specified by you at the time the link is created. Branch’s SDKs make this data available within your app whenever the app is opened via a Branch link click.

REST JSON API optional parameters design

Our goal is to develop API where you can POST /data/save/ that will accept some JSON data like below. The main requirement that JSON should contain one of the following attributes:
"attribute1", "attribute2", "attribute3". Namely when one attribute is exist another one should not exist.
{
"name": "test name",
"attribute1": [
"test1", "test2"
]
or
"attribute2": [
"test3", "test4"
]
or
"attribute3": true
}
The question is how to correctly design such API that it will be easy to use and not confused from the client side.
It would be good to know some best practices in such direction.
I would return a
400 Bad Request
The request could not be understood by the server due to malformed
syntax. The client SHOULD NOT repeat the request without
modifications.
and a phrase explaining that multiple attributes are not supported.
I agree such API is confusing for client side.
What's about creating different endpoints:
POST /data/save/attribute1 json_1
POST /data/save/attribute2 json_2
A custom media type should clarify how to use your API. It should specify what to include in your request.
Another solution might be, building the request like this:
{
"name": "test name",
"attr-key": "my-attribute1",
"values": ["test1", "test2"]
}