Is it possible to get the open incident count from newrelic alerts - json

We are trying to get the open incident count from newrelic alert section using curl with API (Jason format). This must exclude Acknowledged incidents. When we try with "alerts_incidents.json" as below with curl, it's generating the output with all open and closed incidents and not mention anything about the acknowledged incidents
curl -H 'X-Api-Key:{}' -i -X GET ' HTTP/1.1 200 OKrelic.com/v2/alerts_incidents.json'
Please see the attached screenshot. We need the count of the alerts as mentioned in the screenshot.

Related

How do I save a historical (past) dataset in Foundry

I want to save a version of my dataset called (order_clean). But not the current version. The version I want to save is from the past. I understand this is a historical transaction that still exists within my retention policy window. How would I be able to do this?
This can be done via an API call and hitting a specific endpoint.
This answer assumes a working knowledge around authorization tokens and curl requests:
Obtain the desired dataset’s RID (Example in screenshot below), as well as the transaction ID of the transaction corresponding to the version of the dataset you want.
[
Create a new branch in your specific dataset by running a curl request populated as follows:
curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer YOUR_AUTH_TOKEN" "STACK_URL/foundry-catalog/api/catalog/datasets/YOUR_DATASET_RID/branchesUnrestricted2/NEW_BRANCH_NAME" -d '{"parentRef": "YOUR_TRANSACTION_ID", "parentBranchId": "master"}'
Replace YOUR_AUTH_TOKEN, STACK_URL, YOUR_DATASET_RID, NEW_BRANCH_NAME and YOUR_TRANSACTION_ID with appropriate values. Short lived authentication token can be generated following these instructions.
Save the branch into a new dataset with a transform in a Code Repo, specifying the Input with the path to the dataset as well as the new branch’s name from #2.

etherscan or ethplorer doesn't see test transaction

I want to get address transaction list and as I can see that is possible only if dancing with a tambourine. So I decided to use some third party service(which I think shame for ethereum developers but we have that what we have). But those service can't see transactions or balance on the address even balance showing via command
curl -X POST http://localhost:8545 -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":"0xcd88f3430a2e01e61554e655719e0f92d3e1ba37", "pending"],"id":1}'
{"jsonrpc":"2.0","id":1,"result":"0xde0b6b3a7640000"}
(sent via goerli)
but when I perform request like
https://api.etherscan.io/api?module=account&action=txlist&address=0xcd88f3430a2e01e61554e655719e0f92d3e1ba37&sort=asc&apikey=...
I get
message "No transactions found"
Or on
https://kovan-api.ethplorer.io/getAddressTransactions/0xcd88f3430a2e01e61554e655719e0f92d3e1ba37?apiKey=...
[]
Can you please explain to me what happen and how easily to extract transaction list for the address.
Found it, need to use different domain for goerli transactions
https://api-goerli.etherscan.io/

BOX-API: Trying to get a shared folder without a token 401 Unauthorized error

I want to interrogate a shared folder without having to log the user in, from reading the documentation, this should be fine to do, but if run the example within my command line:
curl https://api.box.com/2.0/shared_items \
-H "Authorization: BoxAuth api_key=YOUR_API_KEY&shared_link=https%3A%2F%2Fwww.box.com%2Fs%2F8tqjqtoky18sbnoz264c"
Using my API key it works fine, however, within my app or just within a web browser, if I use:
https://api.box.com/2.0/shared_items -H "Authorization: BoxAuth api_key=YOUR_API_KEY&shared_link=https%3A%2F%2Fwww.box.com%2Fs%2F8tqjqtoky18sbnoz264c"
again with my API key, I get 401 Unauthorized error.
What am I doing wrong? Is it an encoding issue? as it looks like the end part of the string needs to be encoded, however the rest of it doesn't, I have tried to make sure that the C# code I am using does not encode the string, and I think it is not, but it still fails with 401.
It looks like the shared link from the example that you're using (the one ending with 8tqjqtoky18sbnoz264c) is no longer a valid URL. You should go into the Box web app and create a new shared link to test with, and that should work.

Box.com API Get Information About a Folder - Stops working

Simple and quick question :-)
My application (https://www.box.com/services/rubibox) stops working. I use this request for retrieve items in folder http://developers.box.com/docs/#folders-get-information-about-a-folder and this request stops working yesterday. Is maintance on Box.com Apiv2 or request was removed from Apiv2?
PS: I know that is possible to use http://developers.box.com/docs/#folders-retrieve-a-folders-items but this is not good for me because not contain current folder informations.
Thanks
Due to a recent API change a call to /folders no longer includes the item_collection by default. You must now ask for the item_collection in the request:
curl https://api.box.com/2.0/folders/FOLDER_ID?fields=item_collection
-H "Authorization: Bearer ACCESS_TOKEN"

Access token expires during upload

I'm running into a problem with I think is an access token expiring in the middle of an upload. For example, if I currently have a valid (just refreshed) access token, then run:
curl -vS --limit-rate 30K 'https://api.box.com/2.0/files/content' -H 'Authorization: Bearer VALID_ACCESS_TOKEN' -F filename=#/tmp/example.zip -F folder_id=12345
Which takes more than an hour to upload, I eventually get this in the end:
< HTTP/1.1 401 Unauthorized
...
< WWW-Authenticate: Bearer realm="Service", error="invalid_token", error_description="The access token provided is invalid."
...
* HTTP error before end of send, stop sending
The files I tested are big, but still within the 250MB upload limit.
Does anyone have any ideas what to do about this problem?
This is by design.
Currently the only workaround is to enforce (client-side) that your uploads don't take longer than 1 hour from when you fetched your last access token.
This admittedly doesn't accomodate your use case very well. We plan to eventually support chunked uploads, which will help with remedying that problem.