geonode.management_commands_http.views ====================================== .. py:module:: geonode.management_commands_http.views Classes ------- .. autoapisummary:: geonode.management_commands_http.views.ManagementCommandView geonode.management_commands_http.views.ManagementCommandJobViewSet Module Contents --------------- .. py:class:: ManagementCommandView Bases: :py:obj:`rest_framework.views.APIView`, :py:obj:`geonode.management_commands_http.mixins.CreateJobMixin` Handle the exposed management commands usage: - GET: List of exposed commands - GET detail: Help for a specific command - POST: Create a job (and automatic runs) for a specific command. .. py:attribute:: permission_classes .. py:attribute:: allowed_methods :value: ['GET', 'POST'] .. py:method:: retrieve_details(cmd_name) .. py:method:: list() .. py:method:: get(request, cmd_name=None) .. py:method:: post(request, cmd_name=None) Creates and runs a management command job. Expects application/json content type in the following shape: .. code-block:: json { "args": ["", ""], "kwargs": {"", "": ""}, "autostart": true } By default, autostart is set to true. .. py:method:: get_serializer(*args, **kwargs) .. py:class:: ManagementCommandJobViewSet Bases: :py:obj:`geonode.management_commands_http.mixins.CreateJobMixin`, :py:obj:`rest_framework.mixins.RetrieveModelMixin`, :py:obj:`rest_framework.viewsets.GenericViewSet` Create, List, Retrieve, Start, Stop and Get Status of a Management Command Job. .. py:attribute:: permission_classes .. py:attribute:: queryset .. py:attribute:: serializer_class .. py:attribute:: filter_class .. py:attribute:: filter_backends .. py:attribute:: pagination_class .. py:method:: get_queryset() .. py:method:: get_serializer_class() .. py:method:: list(request, *args, **kwargs) .. py:method:: start(request, pk=None, **kwargs) .. py:method:: stop(request, pk=None, **kwargs) .. py:method:: status(request, pk=None, **kwargs)