> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # ListProjectItems # Package: portfolio # Namespace: ProjectItemsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/project-items/list-project-items.md ## Permission Scopes: Wix Multilingual - Nile Wrapper Domain Events Read: SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ ## Introduction Retrieves a list of all project items in the specified project. --- ## REST API ### Schema ``` Method: listProjectItems Description: Retrieves a list of all project items in the specified project. URL: https://www.wixapis.com/portfolio/project-items/api/v1/portfolio/projects/{projectId}/items Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: projectId Method parameters: param name: paging | type: Paging - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. param name: projectId | type: none | required: true Return type: ListProjectItemsResponse - name: items | type: array | description: Project items. - ONE-OF: - name: image | type: Image | description: Information about the Wix Media image. - name: imageInfo | type: Image | description: Information about the Wix Media image. - name: id | type: string | description: WixMedia image GUID. Required. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. Required. - name: width | type: integer | description: Original image width. Required. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: video | type: Video | description: Information about the Wix Media video. - name: videoInfo | type: VideoV2 | description: Information about the Wix Media video. - name: id | type: string | description: WixMedia GUID. Required. - name: url | type: string | description: Video URL. - name: resolutions | type: array | description: Available resolutions for the video, starting with the optimal resolution. - name: url | type: string | description: Video URL. Required. - name: height | type: integer | description: Video height. Required. - name: width | type: integer | description: Video width. Required. - name: format | type: string | description: Video format for example, mp4, hls. Required. - name: quality | type: string | description: Video quality for example 480p, 720p. - name: filename | type: string | description: Video filename. - name: filename | type: string | description: Video filename. - name: posters | type: array | description: Video posters. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: projectId | type: string | description: Project GUID. - name: id | type: string | description: Project item GUID. - name: sortOrder | type: number | description: Index that determines which position a project is displayed in the project.
Default: [Epoch](https://www.epoch101.com/) timestamp.
- name: title | type: string | description: Project item title. - name: description | type: string | description: Project item description. - name: type | type: Type | description: Project item data type. - enum: - UNDEFINED: Undefined item type. - IMAGE: Image item type. - VIDEO: Video item type. - name: createdDate | type: string | description: Date and time the project item was created. - name: updatedDate | type: string | description: Date and time the project item was last updated. - name: link | type: Link | description: Project item link. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: metadata | type: PagingMetadataV2 | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. ``` ### Examples ### List Project Items ```curl curl -X GET \ 'https://www.wixapis.com/portfolio/v1/projectItems/123e4567-e89b-12d3-a456-426614174000/items' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.portfolio.ProjectItemsService.listProjectItems(projectId, options) Description: Retrieves a list of all project items in the specified project. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: projectId Method parameters: param name: options | type: ListProjectItemsOptions none - name: paging | type: Paging | description: Maximum number of items to return in the results. - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. param name: projectId | type: string | description: Project GUID. | required: true Return type: PROMISE - name: items | type: array | description: Project items. - ONE-OF: - name: image | type: Image | description: Information about the Wix Media image. - name: imageInfo | type: string | description: Information about the Wix Media image. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: video | type: Video | description: Information about the Wix Media video. - name: videoInfo | type: string | description: Information about the Wix Media video. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: projectId | type: string | description: Project GUID. - name: _id | type: string | description: Project item GUID. - name: sortOrder | type: number | description: Index that determines which position a project is displayed in the project.
Default: [Epoch](https://www.epoch101.com/) timestamp.
- name: title | type: string | description: Project item title. - name: description | type: string | description: Project item description. - name: type | type: Type | description: Project item data type. - enum: - UNDEFINED: Undefined item type. - IMAGE: Image item type. - VIDEO: Video item type. - name: _createdDate | type: Date | description: Date and time the project item was created. - name: _updatedDate | type: Date | description: Date and time the project item was last updated. - name: link | type: Link | description: Project item link. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: metadata | type: PagingMetadataV2 | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. ``` ### Examples ### listProjectItems ```javascript import { projectItems } from '@wix/portfolio'; async function listProjectItems(projectId,options) { const response = await projectItems.listProjectItems(projectId,options); }; ``` ### listProjectItems (with elevated permissions) ```javascript import { projectItems } from '@wix/portfolio'; import { auth } from '@wix/essentials'; async function myListProjectItemsMethod(projectId,options) { const elevatedListProjectItems = auth.elevate(projectItems.listProjectItems); const response = await elevatedListProjectItems(projectId,options); } ``` ### listProjectItems (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { projectItems } from '@wix/portfolio'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { projectItems }, // Include the auth strategy and host as relevant }); async function listProjectItems(projectId,options) { const response = await myWixClient.projectItems.listProjectItems(projectId,options); }; ``` ---