Get programs and their members and status with Marketo API - marketo

I'm wondering if it's possible to get a list of active programs (specifically 'event' types), and then list the members of those programs and their current status within them.
Basically, I'm looking to replicate the Members tab on the top level of the Program view in order to have an external view of our event processes, but add extra functionality to enable non-marketo users to change statuses of those leads (ie from Registered -> Attended).
From what i can see, this isn't possible with the REST API at the moment (?), and I can't quite get my head around what calls to use in the SOAP API...

I see a few different topics in your question, so I'll talk about them individually.
Is it possible to get a list of active programs? This is possible. You can get a list campaigns and their associated programs through the Get Multiple Campaigns REST API.
Is it possible to get a list program members? This is possible. You can get a list of leads associated with a Program through the Get Multiple Leads by Program Id REST API.
Is it possible to a get a lead's status in a program? This is not directly possible, but there is a workaround. When a lead's status changes in a program, you can add that lead to a static list. You can then query leads from that static list using the Get Multiple Leads by List Id REST API.

To get a list of Programs, use the SOAP API getMObjects with type = Program: http://developers.marketo.com/documentation/soap/getmobjects/

Related

Here Maps - Autocomplete Suggestion

I am looking at using the Autocomplete API from Here Maps and using the Suggestion.json endpoint. My question is that as a user keys in characters, the autocomplete API for suggestions will be called on every key press. This means that for each key press, I need to call the API. This will turn out to be quite expensive. Assuming, I type in "London", it will call the API 6 times. Is there a better way to do this? Also, is there any option of a session token to be created such that, I get charged only for a session token in which I key in multiple characters for a search suggestion list to be generated?
There are a few things that you can do to reduce the number of calls:
Some places have just short names like https://en.wikipedia.org/wiki/List_of_short_place_names, so you might have to consider even single character names for your autosuggest. So you may consider building a cache of autosuggest keywords i.e. say a user types L and the one time you make a call to autosuggest API, you can cache the result with L as Key and then for the next key press repeat building the data structure or data store per your requirement, so that the number of hits to the API gradually decreases.
Once you have built your cache, you can decide to refresh you cache after every 10 calls or so. This will greatly reduce your call to the external API.
Lookup Trie data structure. might be helpful.
Here bills you based on the number of requests you make to the backend services so there is not such possibility to bill by session token. You can talk to your account executive if you can negotiate the cost of the offering though.
You can do this pretty easily with the Javascript API: here's an example to get started and here's the documentation page for autosuggest Javascript API.

How to get all managed device's roleScopeTagIds using Intune Graph AP?

The deviceManagement/manageddevices Intune Graph API results always return an empty array for the roleScopeTagIds property of all devices. Can anyone explain why or better yet, how to include those values?
If you supply the GUID for a device and call the same endpoint then the correct data is returned for the roleScopeTagIds property. Also, I get an "Invalid filter clause" error if I try to filter by the roleScopeTagIds property also.
thanks for your question. The behavior you are observing for the filtering and for device list API is by design.
Device list API:
In our initial implementation we did not want to query all scope tags for all the devices as we do not cap the number of scope tags that can be applied to a given device. The size of the data returned could potentially get large. So we decided to only return all scope tags when you select a single device.
Filtering:
As of now we do not support filtering on device scope tags to optimize overall latency for the device list. We do support other wide range of filters. Hope this helps.
We would like to learn more about your use case for fetching all applied scope tags at once.
As jcurl says it would be realy nice to have roleScopeTags directly via graph and being able to filter on them.
To build a complete list of these for devices i ended up using batched queries to lower the amount of api calls needed (by 20).
I created a uservoice to get more possibilities on this
the use case we have is generating PBI insights with filtering similiar like with Intune - which is based on the Scope Tags.
The general idea is to populate the scope's tags within all device polling through graph - which unfortunatle returns "empty" array
As you might be aware the Datawarehouse in majority of cases doesnt provide up to date information.

viewing data from Exceptions in ExceptionTelemetry

After logging ExceptionTelemetry, is there a way to see the Exception.Data content in the logs? I am using Exception.Data to capture informative data about the environment when the exception occured.
It appears that ExceptionTelemetry has its own kvp for properties and metrics.
If not supported, then the plan is to wrap ExceptionTelemetry in code that walk through the exception/innerexception tree and add any data KVP entries it finds to these dictionaries. I was hoping not to have to do that myself...
the AI sdk does not walk through the Exception.Data structure itself. the items in exception data could be any type, complex structures, etc, and could literally contain anything.
The AI SDK allows you to send custom properties (strings), of limited size and custom metrics (doubles). There are also some limitations on the number of distinctly named properties for the lifetime of the AI application (though these limitations are always changing).
So you might not want to walk through and send ALL data in exception data, you might want to grab only the things you know you'll need, in order not waste custom properties?

How to retrieve resources based on different conditions using GET in RESTful api?

As per REST framework, we can access resources using GET method, which is fine, if i know key my resource. For example, for getting transaction, if i pass transaction_id then i can get my resource for that transaction. But when i want to access all transactions between two dates, then how should i write my REST method using GET.
For getting transaciton of transaction_id : GET/transaction/id
For getting transaction between two dates ???
Also if there are other conditions, i need to put like latest 10 transactions, oldest 10 transaction, then how should i write my URL, which is main key in REST.
I tried to look on google but not able to find a way which is completely RESTful and solve my queries, so posting my question here. I have clear understanding of POST and DELETE, but if i want to do same update using PUT for some resource based on condition, then how to do it?
There are collection and item resources in REST.
If you want to get a representation of an item, you usually use an unique identifier:
/books/123
/books/isbn:32t4gf3e45e67 (not a valid isbn)
or with template
`/books/{id}
/books/isbn:{isbn}
If you want to get a representation of a collection, or a reduced collection you use the unique identifier of the collection and add some filters to it:
/books/since:{fromDate}/to:{toDate}/
/books/?since="{fromDate}"&to="{toDate}"
the filters can go into the path or into the queryString part of the url.
In the response you should add links with these URLs (aka HATEOAS), which the REST clients can follow. You should use link relations, for example IANA link relations to describe those links, and linked data, for example schema.org or to describe the data in your representation. There are other vocabs as well, for example GoodRelations, and ofc. you can write your own vocab as well for your application.

Flex PureMVC: Can proxy keep reference of a View component in following case?

I am learning pureMVC and trying to implement the framework into one of my application. I have follwing case:
My main application has Canvas which is used to add different kind of custom components. One of the custom component is a "Search Component" (multiple instances are created on page). My search component has a textfiled and a search button and initiate search in following steps:
1-Clicking search button dispatches a custom event, that custom event keeps reference of search component as a property.
2-My AppMediator listens the custom event and get the reference of current search component along with search text.
3-Mediator send a notification (sentNotification(AppConstants.SEARCH_CLICKED, component)).
4-I have registered a command with SEARCH_CLICKED notification.
5-Command retrieve a WebserviceProxy and invokes its Search(text) method.
6-WebserviceProxy talks to remote webservice and uses asyncToken to get results.
My Questions is:
My Command has the reference to the custom search component when it start search but search webservice takes some time and get the result. How can i handle the results back to custom search component that initiated the search. Since i have multiple instances of search component. What is the best place to keep the reference of that component, should i add a variables in WebserviceProxy to keep that reference and hand the results over to it, or i have to create a Global Proxy to keep references of such components?
Thanks
I have been using PureMVC for some years and I like it!
I think you have not yet understood roles and collaboration of main components.
You should not have any dependencies between Commands and UI-elements. Your Mediator has to get the concrete value from your UI-component and send it through the Notification. In this case the Command and the Proxy will get only a text value and it is no matter, what is the source of it! Suppose you will change your UI after some time and you will have another components on the user side to determine the search value. In your case you would have to change the Proxy and the Command. It would be bad.
Proxy may not have any information about Commands and Mediators. It can only offer its functions to let another components interact with it AND it sends Notifications with new information after getting it without knowing who is interesting in it.
Read the description of the framework once more and write your questions.
I had some problems with understanding the stuff too, I see your problem.
Based on Anton's answer, i re-think and tried to separate dependencis. As a result, i tried to mediate each instance of Search Widget with "SearchMediator" separately by providing different ID to the constructor of Mediator. Now, when search widget intiates a new search, it's mediator invokes the Command, Command invokes a method of Proxy to do actual search and fetch results from DB and sends a Notification. SearchMediator takes care about that notification and hands over the results to appropriate UI.

Resources