thorn.django.rest_framework.urls — Thorn 1.3.0 documentation

# thorn.django.rest_framework.urls

- thorn.django.rest_framework.urls

## thorn.django.rest_framework.urls

To include the rest-framework API views in your project use the `django.conf.urls.include()` function, with a proper namespace argument:

    from django.conf.urls.include import include, url

    urlpatterns = [
        url(r'^hooks/',
            include('thorn.django.rest_framework.urls', namespace='webhook')),
    ]

Two new API endpoints will now be available in your application:

- `GET /hooks/`

  > List of webhook subscriptions related to the currently logged in user.

- `POST /hooks/`

  > Create new subscription owned by the currently logged in user.

- `GET /hooks/<uuid>/`

  > Get detail about specific subscription by unique identifier (uuid).

- `POST|PATCH /hook/<uuid>/`

  > Update subscription given its unique identifier (uuid).

- `DELETE /hook/<uuid>/`

  > Delete subscription given its unique identifier (uuid).