2018-10-16 21:01:17 +02:00
|
|
|
# Create linkifiers
|
2018-08-14 02:54:36 +02:00
|
|
|
|
2018-10-16 21:01:17 +02:00
|
|
|
Configure [linkifiers](/help/add-a-custom-linkification-filter),
|
|
|
|
regular expression patterns that are automatically linkified when they
|
|
|
|
appear in messages and topics.
|
2018-08-14 02:54:36 +02:00
|
|
|
|
|
|
|
`POST {{ api_url }}/v1/realm/filters`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-08-14 02:54:36 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{generate_code_example(python)|/realm/filters:post|example}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-08-14 02:54:36 +02:00
|
|
|
|
2019-05-16 22:38:53 +02:00
|
|
|
``` curl
|
2018-08-14 02:54:36 +02:00
|
|
|
curl -X POST {{ api_url }}/v1/realm/filters \
|
|
|
|
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
|
|
|
|
-d "pattern=#(?P<id>[0-9]+)" \
|
|
|
|
-d "url_format_string=https://github.com/zulip/zulip/issues/%(id)s"
|
|
|
|
```
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-08-14 02:54:36 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/realm/filters:post}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Return values
|
|
|
|
|
|
|
|
* `id`: The numeric ID assigned to this filter.
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/realm/filters:post|fixture(200)}
|