Hello fellow API users.
A new account permission system will be available soon. This system obsoletes the current package webhook Url but offers an easy way to replace this feature.
Once the system is online, using the info-beamer hosted generated webhook Urls will no longer work and they will return HTTP error 404.
Of course webhooks have been very useful. So the new permission system can be used to fully replace this feature as it allows restricted access to package syncing. This fully replaces the current system and a transition should be very easy. Unfortunately that can’t be done automatically but I’m happy to assist if help is required.
Replacing webhooks with the permission system
With the new permission system you can have more than one API key for your account. Each can be controlled by policies. Policies are short JSON snippets that decide which part of the API is allowed and which part is blocked. This allows you to create an API key that can only sync one (or multiple) packages, thereby fully emulating the current webhook urls.
The required policy
You can create a new policy that allows you to sync a specific package (package with id 1234 in the below example) by creating a new policy and adding the following policy JSON document:
{
"Statements": [
{
"Action": "*",
"Effect": "deny"
},
{
"Action": "package:update:sync",
"Condition": {
"NumericEquals": {
"package:id": 1234
}
},
"Effect": "allow"
}
],
"Version": 1
}
If you want to allow syncing access to multiple packages, you can specify their ids in a list instead. So replace 1234
with [1234, 1235, 1236]
.
Using the policy
Next you’ll need to create a new access control list and add this policy to it. Finally you’ll have to create a new self-access to your account and assign this access control list to it. This access will have its own API key which is now controlled by the policy document above. Instead of issuing the current call:
https://info-beamer.com/api/v1/package/1234/sync/8f576ca0892110091874
you can then use
https://info-beamer.com/api/v1/package/1234/sync?api-key=<API KEY>
Need help?
Please get in contact with support if you need help and we can quickly this up in your account once the permission system is online. Of course you can also ask for more information here.