Software Mapping
This class will define the general view behavior for the framework
Args: viewsets ([ModelViewSet])
Token-based authentication with required prefix "Token"
Number of results to return per page.
The initial index from which to return the results.
Which field to use when ordering the results.
A search term.
123http://api.example.org/accounts/?offset=400&limit=100http://api.example.org/accounts/?offset=200&limit=100GET /software_mapping/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": 1,
"template": 1,
"section": 1,
"name": 1,
"publisher": 1,
"version": 1,
"major_version": 1,
"minor_version": 1,
"patch_version": 1
}
]
}Handle post request, suitable for single and multi creation
Args: request ([dict]): can be dict or list of dicts
Returns: [type]: [description]
Token-based authentication with required prefix "Token"
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
POST /software_mapping/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 115
"template=1§ion=1&name=1&publisher=1&version=1&major_version=1&minor_version=1&patch_version=1"{
"id": 1,
"template": 1,
"section": 1,
"name": 1,
"publisher": 1,
"version": 1,
"major_version": 1,
"minor_version": 1,
"patch_version": 1
}This class will define the general view behavior for the framework
Args: viewsets ([ModelViewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this software mapping.
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
GET /software_mapping/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"template": 1,
"section": 1,
"name": 1,
"publisher": 1,
"version": 1,
"major_version": 1,
"minor_version": 1,
"patch_version": 1
}This class will define the general view behavior for the framework
Args: viewsets ([ModelViewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this software mapping.
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
PUT /software_mapping/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 115
"template=1§ion=1&name=1&publisher=1&version=1&major_version=1&minor_version=1&patch_version=1"{
"id": 1,
"template": 1,
"section": 1,
"name": 1,
"publisher": 1,
"version": 1,
"major_version": 1,
"minor_version": 1,
"patch_version": 1
}This class will define the general view behavior for the framework
Args: viewsets ([ModelViewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this software mapping.
No response body
No content
DELETE /software_mapping/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
No response body
No content
This class will define the general view behavior for the framework
Args: viewsets ([ModelViewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this software mapping.
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
Mixin to dynamically expand nested fields based on the "expand" query parameter.
To use, add an expandable_fields dictionary in your serializer's Meta:
expandable_fields = {
"some_relation": SomeNestedSerializer,
"other_relation": OtherNestedSerializer,
}
The mixin will:
- Expand all fields and childs if expand="*"
- Expand fields provided in a comma separated list (expand=field1,field2)
- or return the pks for the relation
PATCH /software_mapping/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 115
"template=1§ion=1&name=1&publisher=1&version=1&major_version=1&minor_version=1&patch_version=1"{
"id": 1,
"template": 1,
"section": 1,
"name": 1,
"publisher": 1,
"version": 1,
"major_version": 1,
"minor_version": 1,
"patch_version": 1
}Last updated

