API Views¶
Warning
Check your groups!
When creating a DataProduct
via the API and you have set TARGET_PERMISSIONS_ONLY
to False
, one of the
accepted parameters is a list of groups that will have permission to view the DataProduct
. If you neglect to
specify any groups, your DataProduct
will only be visible to the user that created the DataProduct
. Please
be sure to specify groups!!
Tip
Better API documentation
The available parameters for RESTful API calls are not available here. However, if you navigate to /api/targets/
and click the OPTIONS
button, you can easily view all of the available parameters.
- class tom_dataproducts.api_views.DataProductViewSet(**kwargs)¶
Viewset for DataProduct objects. Supports list, create, and delete.
To view supported query parameters, please use the OPTIONS endpoint, which can be accessed through the web UI.
Please note that ``groups`` are an accepted query parameters for the ``CREATE`` endpoint. The groups parameter will specify which ``groups`` can view the created ``DataProduct``. If no ``groups`` are specified, the ``DataProduct`` will only be visible to the user that created the ``DataProduct``. Make sure to check your ``groups``!!
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- get_queryset()¶
Gets the set of
DataProduct
objects that the user has permission to view.- Returns:
Set of
DataProduct
objects- Return type:
QuerySet
- class tom_dataproducts.api_views.ReducedDatumViewSet(**kwargs)¶
Viewset for ReducedDatum objects. Supports list, create, and delete.
To view supported query parameters, please use the OPTIONS endpoint, which can be accessed through the web UI.
Please note that ``groups`` are an accepted query parameters for the ``CREATE`` endpoint. The groups parameter will specify which ``groups`` can view the created ``DataProduct``. If no ``groups`` are specified, the ``ReducedDatum`` will only be visible to the user that created the ``DataProduct``. Make sure to check your ``groups``!!
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.