[docs] Batch notification API
parent
5317f9e542
commit
ae2c3e8ddb
|
@ -99,24 +99,32 @@ It may include any of the other fields specified in the [schema](04-schema.md).
|
||||||
|
|
||||||
#### notify
|
#### notify
|
||||||
|
|
||||||
The `notify` field allows you to specify an URL template for a URL that will
|
The `notify_batch` field allows you to specify an URL template for a URL that
|
||||||
be called every time a user installs a package. The URL can be either an
|
will be called every time a user installs a package. The URL can be either an
|
||||||
absolute path (that will use the same domain as the repository) or a fully
|
absolute path (that will use the same domain as the repository) or a fully
|
||||||
qualified URL.
|
qualified URL.
|
||||||
|
|
||||||
An example value:
|
An example value:
|
||||||
|
|
||||||
{
|
{
|
||||||
"notify": "/downloads/%package%"
|
"notify_batch": "/downloads/"
|
||||||
}
|
}
|
||||||
|
|
||||||
For `example.org/packages.json` containing a `monolog/monolog` package, this
|
For `example.org/packages.json` containing a `monolog/monolog` package, this
|
||||||
would send a `POST` request to `example.org/downloads/monolog/monolog` with
|
would send a `POST` request to `example.org/downloads/` with following
|
||||||
following parameters:
|
JSON request body:
|
||||||
|
|
||||||
* **version:** The version of the package.
|
{
|
||||||
* **version_normalized:** The normalized internal representation of the
|
"downloads": [
|
||||||
version.
|
{"name": "monolog/monolog", "version": "1.2.1.0"},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
The version field will contain the normalized representation of the version
|
||||||
|
number.
|
||||||
|
|
||||||
|
> **Note:** There is a non-batch notification API, but it is deprecated
|
||||||
|
> for performance reasons.
|
||||||
|
|
||||||
This field is optional.
|
This field is optional.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue