Filter Pushes by Type - pushbullet

I'm working on building a bash script that will listen for pushes of the type link which will then extract just the URL and write it to a local file.
The idea is to be able to gather links I find and save them for automated processing later.
However, it doesn't appear that the API allows you to filter by type - only by active, modified_after, cursor, and limit - which seems a bit sparse to me, but oh well.
Since type isn't a filterable option, I'm assuming that I will need to add an additional step to parse the JSON returned and filter out any that don't have the type I'm looking for, then pass those to another step to extract the link and write it down to a file.
Before I go bashing (heh) my head against the wall writing this, is anyone aware of something that will already handle this, or at least keep me from re-inventing part of the wheel?

I've solved this issue by using jq to process and filter the json payload, allowing me to only select the types of pushes that I want.

Related

Setting up alerts for metrics in Splunk

I'm sending data to Splunk and everything is working just fine, i can see the data that i'm sending and run a query and get results. Right now I'm only using a test data set, but eventually people will be sending their own fields (as well as the mandatory ones). My question is, since I don't know what kind of data they will be sending, can I still set up alerts for them? Can I create something general?
It's pretty hard to create a generic alert that's actually useful. You may be able to craft something using the mandatory fields, but it may not be all that helpful.
If you're opposed to letting users create their own alerts then let them come to you with what they want.

Is it possible to use the Canonical Landscape API to get script output?

The documentation I can find for the Canonical Landscape API lets you do lots of things with scripts, but I can't find anything suggesting that you can get output. However, if you use the Canonical web interface, script output is available, so it's presumably exposed somehow...?
I just had this issue as well and since you're the first hit right now on google, I wanted to share the answer for everyone - if you run ExecuteScript on a landscape client and get back an ID of 123, and let's assume the job finished already - you want to then use that ID to ask the GetActivities API, with an input argument of "query" with value "parent-id:123". If there is a result there, you will find the script output you are looking for under the result_text field of the response. Good luck!!! It worked over here very well.

How to write filter {key} for a 'get items as xlsx' request via Podio API

I'll get this out of the way first: I'm an amateur programmer (at best)...i have some knowledge of how APIs work, but little to no experience manipulating the podio API directly (ie I use zapier/globiflow a lot and don't write any php/ruby). I'm sure other people can figure this out via the API documentation, but I can't. So i'm really hoping someone can help clarify and give some more detailed instruction.
My Overall objective:
I frequently export podio files as xlsx from the podio front-end. This is used by my team and me to do regular data analysis tasks in excel. I would like to make this process easier by automating the function of getting an updated podio export into my excel. My plan is to do this via excel VBA. I understand from other searching that it is possible to send an HTTP request using VBA, so i want to make sure i understand what I need to send to the Podio API to get what I need. The method of how to write the HTTP request in excel VBA is outside the intentional scope of this question (though i'd accept any help on this!)
What I've tried so far:
I know that 'get items as xlsx' is part of the podio API: https://developers.podio.com/doc/items/get-items-as-xlsx-63233
However I cannot seem to get this to work in the sandbox environment on that page so that i can figure out a valid request url. I get this message: 'Invalid filtering key' ... because i have no idea how to fill in that field. The information on that page is not clear on this. Nor is it evident on the referenced 'views page'. There are no examples to follow!
I don't even want to do any filtering. I just want to get ALL items in the app. Or i can give it a pre-existing view_id, but that doens't seem to work either without a {key}
I realise this is probably dead simple. Please help a noob? :)
Unfortunately, the interactive API sandbox does not behave appropriately for this particular endpoint. For filtering, this API endpoint expects query string parameters where the field-value pairs consist of integer field IDs and the allowed values for each field. Filtering by fields is totally optional. It looks like this sandbox page isn't built for this kind of operation with dynamic query string field names; wherever you see the {key} field on that page is meant as a placeholder for whatever field IDs that you would use for filtering.
If you want to experiment with this endpoint, I would encourage you to try another dedicated HTTP client first. I was able to get this simple example working with the command-line program wget:
wget --header="Authorization:OAuth2 $MY_SECRET_TOKEN" \
--content-disposition \
"https://api.podio.com/item/app/16476850/xlsx/"
In this case, wget downloaded an Excel file containing all the items in my app without any filtering applied. The additional --content-disposition argument tells wget to save the output as a file with a name using the information in the server's Content-Disposition response header.
With a filter applied:
wget --header="Authorization:OAuth2 $MY_SECRET_TOKEN" \
--content-disposition \
"https://api.podio.com/item/app/16476850/xlsx/?130654431=galaxy"
In this case, the downloaded file filtered the results to items where field id 130654431 (which is a category field) contain the value galaxy.

vb.net external manipulation commands

I tried to find this but I'm not exactly sure how to search for it or if it would even be possible. I'm trying to integrate a program I wrote with a commercial app, the commercial app has the ability to call an external program with a command and pass it the data that I want to capture.
I want to be able to get the currently open instance (or whichever responds first in the case of multiple instances) and send it the information directly and have it perform a function based on that information, I don't want to have to open a new instance.
I know one of my options is to drop a text file with the info and then have my program watch for it and parse it once found but if I can do a more direct communication I'd rather do that.
all it needs to do is fill a text box and run a function seems simple enough, and all I need is a point in the wright direction or some search terms that would pull up pertinent results. I'd like to understand how it works instead of just having someone write the code for me.
Thanks

CloudConnect: Dynamic URL in REST Connector

What is the best way to create a dynamic request URL for the REST Connector in CloudConnect?
e.g. I want the URL to be for example www.myservice.com/api/{todays-date}/report.json and the URL must change accordingly everytime the ETL runs.
Is there some way to make this happen by code in CloudConnect? I didn't find any straight forward way but I found that one might be able to import a remote file containing the URL.
Does anyone have experience or tips on this subject?
what should work the best is to generate this parameter (e.g. in Data Generator) or read some data from the source (e.g. list of IDs) and send it to the REST component as an input parameter (e.g. metadata field name is 'today_date', so use ${today_date}). As far as I know this should work.
Another option is to use a parameter from a *.prm file (like workspace.prm). You can use ${PARAMETER_NAME} in your URL and this should also work correctly.
Hope this helps.
Radek