List Porfolios
Retrieves a list of all portfolio with filtering, searching, and ordering capabilities.
HTTP Request
GET/api/portfolios/
NOTE: NOT USING THE TRAILING SLASH AT THE END OF THE URL RESULTS TO AN EXTRA REDIRECT WITH 301 STATUS
Authorization
Authorization
- Required: Yes
- Permission: Staff with PorfolioPermission or Admin
- Permission Code: 4202
- Authentication: Token-based (Authorization: Token <your_api_key>)
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Number of results to return per page |
| offset | integer | 0 | Number of results to skip before returning results |
| search | string | — | Search term to lookup results by `title`, `slug`, `excerpt`, `year`, `client__name` |
| ordering | string | order, -created_at | Order results by (`title`, `slug`, `order`, `year`, `is_active`, `client__name`, `created_at`, `updated_at`) |
| id_min | integer | — | Minimum ID filter |
| id_max | integer | — | Maximum ID filter |
| created_date | string | — | Filter by creation date (e.g., 2023-01-01) |
| updated_date | string | — | Filter by last updated date (e.g., 2023-01-01) |
| created_from | string | — | Filter by creation date range start |
| created_to | string | — | Filter by creation date range end |
| updated_from | string | — | Filter by last updated date range start |
| updated_to | string | — | Filter by last updated date range end |
| has_image | boolean | — | Filter portfolios with/without image |
| has_description | boolean | - | Filter portfolios with/without description |
| has_employer | boolean | - | Filter portfolios with/without employer |
| order_min | integer | — | Filter portfolios with row order larger than the specific value |
| order_max | integer | - | Filter portfolios with row order smaller than the specific value |
| completed_at_from | datetime | - | Filter portfolios that their released/finished/published datetime is greater than the specified value |
| completed_at_to | integer | - | Filter portfolios that their released/finished/published datetime is lower than the specified value |
| employer_id | integer | - | Filter portfolios with the specific employer |
| tag_id | integer | - | Filter portfolios with the specific tag |
| tags_in | list | - | Filter portfolios with tags in the provided comma-separated tags |
| is_active | boolean | - | Filter portfolios that are/are not active |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List all portfolios
4response = requests.get('http://www.example.com/api/portfolios/',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())
8
9# Search for portfolios with filters
10response = requests.get('http://www.example.com/api/portfolios', params={
11 'search': 'site',
12 'has_image': True,
13 'limit': 20
14}, headers={'Authorization': 'Token <your_api_key>'})
15print(response.json())1# List all portfolios
2curl "http://www.example.com/api/portfolios/" -H "Authorization: Token <your_api_key>"
3
4# Search with filters
5curl "http://www.example.com/api/portfolios?search=site&has_image=true&limit=20" \
6-H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| count | Integer | Total number of categories |
| next | String | URL for the next page of results |
| previous | String | URL for the previous page of results |
| results | Array[Object] | Array of Portfolio objects |
Portfolio Object Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the portfolio |
| title | String | portfolio title (unique) |
| slug | String | unique slug of the portfolio |
| excerpt | String | Short description of the portfolio |
| order | Integer | Display order of the portfolio |
| image_data | Object | portfolio image details (nullable) |
| employer_data | Object | portfolio employer details (nullable) |
| tags_data | List(object) | list of portfolio tags (nullable) |
| links_data | List(object) | list of portfolio related links (nullable) |
| is_active | Boolean | whether the portfolio is active |
| completed_at | Integer | The time that the project has been finished/released/published |
| created_at | String (ISO 8601) | Timestamp when portfolio was created |
| updated_at | String (ISO 8601) | Timestamp when portfolio was last updated |
Image Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the image |
| type | String | File type (e.g., image/jpeg) |
| name | String | Original file name |
| size | Integer | File size in bytes |
| human_readable_size | String | Human readable file size (e.g., 2.5 MB) |
| f | String | URL to access the image file |
| width | Integer | Image width in pixels |
| height | Integer | Image height in pixels |
| mode | String | Color mode (e.g., RGB, CMYK) |
| thumbnails | List of thumbnail objects | Imgae thumbnails |
Thumbnail Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the thumbnail (unique) |
| f | String | URL to access the thumbnail file |
| size | Integer | File size in bytes (nullable) |
Client Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the client |
| name | String | client name (unique) |
| description | String | Description of the client (nullable) |
| image_data | Object | client image details |
Tag Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the tag |
| name | String | tag name (unique) |
| image_data | Object | tag image details |
Link Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the link |
| name | String | link name (not unique) |
| url | URLField | URL related to the link(nullable) |
| description | String | Description of the link (nullable) |
| image_data | Object | link image details |
Example Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 150,
"title": "Wordpress site",
"slug": "wordpress-site",
"excerpt": "a wordpress site built with elementor and great performance for product showcase",
"order": 1,
"image_data": {
"id": 88,
"type": "image",
"name": "test text",
"size": 73062,
"human_readable_size": "71.35 KB",
"f": "http://localhost:8000/media/core_media/2026/03/02/image_test_media_file_0.bmp",
"width": 156,
"height": 156,
"mode": "RGB",
"thumbnails": [
{
"id": 229,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_64x64.bmp",
"size": 64
},
{
"id": 230,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_128x128.bmp",
"size": 128
},
{
"id": 231,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_512x512.bmp",
"size": 512
},
{
"id": 232,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_1080x1080.bmp",
"size": 1080
}
]
},
"employer_data": {
"id": 1,
"name": "digikala",
"image_data": {
"id": 88,
"type": "image",
"name": "test text",
"size": 73062,
"human_readable_size": "71.35 KB",
"f": "http://localhost:8000/media/core_media/2026/03/02/image_test_media_file_0.bmp",
"width": 156,
"height": 156,
"mode": "RGB",
"thumbnails": [
{
"id": 229,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_64x64.bmp",
"size": 64
},
{
"id": 230,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_128x128.bmp",
"size": 128
},
{
"id": 231,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_512x512.bmp",
"size": 512
},
{
"id": 232,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_1080x1080.bmp",
"size": 1080
}
]
},
"description": "some store"
},
"tags_data": [
{
"id": 1,
"name": "sites",
"image_data": {
"id": 92,
"type": "image",
"name": "asdf",
"size": 11740,
"human_readable_size": "11.46 KB",
"f": "http://localhost:8000/media/core_media/2026/03/03/preview.png",
"width": 216,
"height": 263,
"mode": "RGBA",
"thumbnails": [
{
"id": 241,
"f": "http://localhost:8000/media/core_media/2026/03/03/thumbnails/preview_thumbnail_64x64.png",
"size": 64
},
{
"id": 242,
"f": "http://localhost:8000/media/core_media/2026/03/03/thumbnails/preview_thumbnail_128x128.png",
"size": 128
},
{
"id": 243,
"f": "http://localhost:8000/media/core_media/2026/03/03/thumbnails/preview_thumbnail_512x512.png",
"size": 512
},
{
"id": 244,
"f": "http://localhost:8000/media/core_media/2026/03/03/thumbnails/preview_thumbnail_1080x1080.png",
"size": 1080
}
]
}
},
{
"id": 2,
"name": "webs",
"image_data": {
"id": 88,
"type": "image",
"name": "test text",
"size": 73062,
"human_readable_size": "71.35 KB",
"f": "http://localhost:8000/media/core_media/2026/03/02/image_test_media_file_0.bmp",
"width": 156,
"height": 156,
"mode": "RGB",
"thumbnails": [
{
"id": 229,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_64x64.bmp",
"size": 64
},
{
"id": 230,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_128x128.bmp",
"size": 128
},
{
"id": 231,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_512x512.bmp",
"size": 512
},
{
"id": 232,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_1080x1080.bmp",
"size": 1080
}
]
}
}
],
"links_data": [],
"is_active": true,
"completed_at": "2024-12-12T00:00:00Z",
"created_at": "2026-03-03T17:52:28.976376Z",
"updated_at": "2026-03-03T17:52:28.976382Z"
},
{
"id": 148,
"title": "web design",
"slug": "web",
"excerpt": "Sapiente veritatis ipsam ut ex minus nihil. Excepturi et beatae id repellendus dolor voluptatibus veniam aut nulla. Sed in illo explicabo nam.",
"order": 1,
"image_data": {
"id": 88,
"type": "image",
"name": "test text",
"size": 73062,
"human_readable_size": "71.35 KB",
"f": "http://localhost:8000/media/core_media/2026/03/02/image_test_media_file_0.bmp",
"width": 156,
"height": 156,
"mode": "RGB",
"thumbnails": [
{
"id": 229,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_64x64.bmp",
"size": 64
},
{
"id": 230,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_128x128.bmp",
"size": 128
},
{
"id": 231,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_512x512.bmp",
"size": 512
},
{
"id": 232,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_1080x1080.bmp",
"size": 1080
}
]
},
"employer_data": {
"id": 1,
"name": "digikala",
"image_data": {
"id": 88,
"type": "image",
"name": "test text",
"size": 73062,
"human_readable_size": "71.35 KB",
"f": "http://localhost:8000/media/core_media/2026/03/02/image_test_media_file_0.bmp",
"width": 156,
"height": 156,
"mode": "RGB",
"thumbnails": [
{
"id": 229,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_64x64.bmp",
"size": 64
},
{
"id": 230,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_128x128.bmp",
"size": 128
},
{
"id": 231,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_512x512.bmp",
"size": 512
},
{
"id": 232,
"f": "http://localhost:8000/media/core_media/2026/03/02/thumbnails/image_test_media_file_0_thumbnail_1080x1080.bmp",
"size": 1080
}
]
},
"description": "some store"
},
"tags_data": [],
"links_data": [
{
"id": 3,
"name": "github",
"url": "https://moeinsoft.com",
"image_data": null,
"description": ""
},
{
"id": 4,
"name": "site_url",
"url": "https://digikala.com",
"image_data": null,
"description": "the website url"
}
],
"is_active": true,
"completed_at": "2026-03-03T17:26:28Z",
"created_at": "2026-03-03T17:26:52.642607Z",
"updated_at": "2026-03-03T17:26:52.642613Z"
}
]
}