Skip to main content

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

ParameterTypeDefaultDescription
limitinteger10Number of results to return per page
offsetinteger0Number of results to skip before returning results
searchstringSearch term to lookup results by `title`, `slug`, `excerpt`, `year`, `client__name`
orderingstringorder, -created_atOrder results by (`title`, `slug`, `order`, `year`, `is_active`, `client__name`, `created_at`, `updated_at`)
id_minintegerMinimum ID filter
id_maxintegerMaximum ID filter
created_datestringFilter by creation date (e.g., 2023-01-01)
updated_datestringFilter by last updated date (e.g., 2023-01-01)
created_fromstringFilter by creation date range start
created_tostringFilter by creation date range end
updated_fromstringFilter by last updated date range start
updated_tostringFilter by last updated date range end
has_imagebooleanFilter portfolios with/without image
has_descriptionboolean-Filter portfolios with/without description
has_employerboolean-Filter portfolios with/without employer
order_minintegerFilter portfolios with row order larger than the specific value
order_maxinteger-Filter portfolios with row order smaller than the specific value
completed_at_fromdatetime-Filter portfolios that their released/finished/published datetime is greater than the specified value
completed_at_tointeger-Filter portfolios that their released/finished/published datetime is lower than the specified value
employer_idinteger-Filter portfolios with the specific employer
tag_idinteger-Filter portfolios with the specific tag
tags_inlist-Filter portfolios with tags in the provided comma-separated tags
is_activeboolean-Filter portfolios that are/are not active

Example Requests

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())

Response Fields

FieldTypeDescription
countIntegerTotal number of categories
nextStringURL for the next page of results
previousStringURL for the previous page of results
resultsArray[Object]Array of Portfolio objects

Portfolio Object Structure

FieldTypeDescription
idIntegerUnique ID of the portfolio
titleStringportfolio title (unique)
slugStringunique slug of the portfolio
excerptStringShort description of the portfolio
orderIntegerDisplay order of the portfolio
image_dataObjectportfolio image details (nullable)
employer_dataObjectportfolio employer details (nullable)
tags_dataList(object)list of portfolio tags (nullable)
links_dataList(object)list of portfolio related links (nullable)
is_activeBooleanwhether the portfolio is active
completed_atIntegerThe time that the project has been finished/released/published
created_atString (ISO 8601)Timestamp when portfolio was created
updated_atString (ISO 8601)Timestamp when portfolio was last updated

Image Data Structure

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (e.g., image/jpeg)
nameStringOriginal file name
sizeIntegerFile size in bytes
human_readable_sizeStringHuman readable file size (e.g., 2.5 MB)
fStringURL to access the image file
widthIntegerImage width in pixels
heightIntegerImage height in pixels
modeStringColor mode (e.g., RGB, CMYK)
thumbnailsList of thumbnail objectsImgae thumbnails

Thumbnail Data Structure

FieldTypeDescription
idIntegerUnique ID of the thumbnail (unique)
fStringURL to access the thumbnail file
sizeIntegerFile size in bytes (nullable)

Client Data Structure

FieldTypeDescription
idIntegerUnique ID of the client
nameStringclient name (unique)
descriptionStringDescription of the client (nullable)
image_dataObjectclient image details

Tag Data Structure

FieldTypeDescription
idIntegerUnique ID of the tag
nameStringtag name (unique)
image_dataObjecttag image details

Link Data Structure

FieldTypeDescription
idIntegerUnique ID of the link
nameStringlink name (not unique)
urlURLFieldURL related to the link(nullable)
descriptionStringDescription of the link (nullable)
image_dataObjectlink 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"
}
]
}