List all content posts
get
/swm/rs/v1/spaces/{spaceId}/content
This endpoint effectively returns the entire space content!
Get the top-level content posts AND corresponding replies for a space. This includes the combination of product posts and top-level comment posts with any corresponding reply comment posts. Each content post is only listed once.
If the space is Private, the API user must be a member of the space.
The date values returned are in Epoch time.
To use Pagination, add the optional limit and offset query parameters to request a subset, or "page", of top-level content post items in the response JSON.
To use Sorting, add the optional orderBy query parameter to request sorting of the top-level content post items in the response JSON.
Get the top-level content posts AND corresponding replies for a space. This includes the combination of product posts and top-level comment posts with any corresponding reply comment posts. Each content post is only listed once.
If the space is Private, the API user must be a member of the space.
The date values returned are in Epoch time.
To use Pagination, add the optional limit and offset query parameters to request a subset, or "page", of top-level content post items in the response JSON.
To use Sorting, add the optional orderBy query parameter to request sorting of the top-level content post items in the response JSON.
Request
Supported Media Types
- application/json
Path Parameters
-
spaceId: string
The ID of the space resource
Query Parameters
-
limit(optional): string
The number of items requested (e.g. "10")
-
offset(optional): string
The "row" offset to use as the starting point for the items requestd (e.g. "50")
-
orderBy(optional): string
The sort order of the content items (e.g. "dateadded:desc")Default Value:
dateadded:desc
Response
Supported Media Types
- application/json; charset=UTF-8
200 Response
content resource found
403 Response
not space member
404 Response
content resource not found
Examples
Sample Request:
GET swm/rs/v1/spaces/7go4VjU2dK5MkTfHWQHV1l39/content
Sample Response:
{"response":{"code":"200.0","developerMessage":"content resource found" }, "limit":"10000", "totalResults":"1", "items": [ { "mediaId":"7DkODhd01QcFsXCPcHhQbeiL", "mediaUrl": "/preview/media/product/AMA1iqn08Jz8QGqG/Topo3CqoDPchgkK1mMxEgubY/7DkODhd01QcFsXCPcHhQbeiL.jpg", "productProductId": "xprod2041", "productDesiredPriority": "2", "productCurrencyCode": "USD", "creatorMediaUrl": "", "creatorId": "nNGCePPATZMzzpCm", "productVariantOptions": "[]", "productLinkedProducts": "[]", "productDesiredQuantity": "1", "contentId": "600009", "creatorLastName": "Doe", "creatorFirstName": "John", "productSalePrice": "", "productSkuId": "xsku2041", "replies": [ { "creatorMediaUrl": "", "creatorId": "nNGCePPATZMzzpCm", "dateCreated": "2016-12-27T19:27:47.141Z", "comment": "This looks comfortable!", "creatorLastName": "John", "contentId": "700005", "creatorFirstName": "Doe" }, ] , "productTitle": "Soccer Cushion Chair", "productUrl": "/soccer-cushion-chair/product/xprod2041", "dateCreated": "2016-12-20T17:31:55.835Z", "productPrice": "79" } ] }
Possible Error Codes:
{ "code":"404.0","developerMessage":"space resource not found", "code":"403.1","developerMessage":"not space memeber" }