Categories
This class will define the view behavior
Args: viewsets ([OCSVIewSet])
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 /categories/ 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,
"name": "text",
"description": "text",
"inventory_sections": [
1
],
"is_protected": true
}
]
}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"
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
POST /categories/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81
"name='text'&description='text'&inventory_sections=[1]&is_protected=true"{
"id": 1,
"name": "text",
"description": "text",
"inventory_sections": [
1
],
"is_protected": true
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this category.
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
GET /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "text",
"description": "text",
"inventory_sections": [
1
],
"is_protected": true
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this category.
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
PUT /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81
"name='text'&description='text'&inventory_sections=[1]&is_protected=true"{
"id": 1,
"name": "text",
"description": "text",
"inventory_sections": [
1
],
"is_protected": true
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this category.
No response body
No content
DELETE /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
No response body
No content
This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this category.
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
This serialize class provide the API representation
Args: serializers ([ModelSerializer])
PATCH /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81
"name='text'&description='text'&inventory_sections=[1]&is_protected=true"{
"id": 1,
"name": "text",
"description": "text",
"inventory_sections": [
1
],
"is_protected": true
}Last updated

