https://github.com/code4clouds/ampsaaswebhook
This is a command line to help Azure Marketplace Publishers test the Webhook API endpoints.
https://github.com/code4clouds/ampsaaswebhook
Last synced: about 1 year ago
JSON representation
This is a command line to help Azure Marketplace Publishers test the Webhook API endpoints.
- Host: GitHub
- URL: https://github.com/code4clouds/ampsaaswebhook
- Owner: code4clouds
- Created: 2020-02-03T22:30:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T19:48:43.000Z (over 1 year ago)
- Last Synced: 2025-03-31T10:53:19.014Z (about 1 year ago)
- Language: JavaScript
- Size: 302 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ampsaaswebhook

This is a command line to help Azure Marketplace Publishers test the Azure Marketplace Webhook API endpoints. Information about the webhook implementation can be found [here](https://docs.microsoft.com/en-us/azure/marketplace/partner-center-portal/pc-saas-fulfillment-api-v2#implementing-a-webhook-on-the-saas-service).

## Sample AMP Payload
``` json
{
"id": "",
"activityId": "",
"subscriptionId": "",
"publisherId": "",
"offerId": "",
"planId": "",
"quantity": "",
"timeStamp": "2019-04-15T20:17:31.7350641Z",
"action": "Unsubscribe",
"status": "NotStarted"
}
```
## Requirement
- [NodeJS](https://nodejs.org/)
## Installation
Use the following command to install the tool from the Node Package Management Service
``` bash
# npm install -g ampsaaswebhook
```
## Execution
Once installed the following command will start the cli.
``` bash
# ampsaaswebhook
```
## Tool Development and Testing
I am using the VS Code container development experience. There is .dev container that has the tools and dependencies installed to facilitate development. You can download it [here](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and use the .devcontainer folder to open the container environment.
The test server can be run using the following:
``` bash
npm run-script server
```
on a second terminal you can run the following npm cli:
``` bash
npm start
```
## Tool Publishing to NPM
``` bash
npm version 1.0.x
npm publish
```