> For the complete documentation index, see [llms.txt](https://developers.memberspace.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.memberspace.com/admin-api/endpoints/content-library.md).

# Content Library

Your site's Content Library — content items, spaces, and member activity such as views.

## List content views

> Returns records of members successfully viewing your Content Library content, ordered by id and paginated with an opaque cursor. Filter by member, content item, and view date.

```json
{"openapi":"3.2.0","info":{"title":"MemberSpace Admin API","version":"1.0.0"},"tags":[{"name":"contentLibrary","description":"Your site's Content Library — content items, spaces, and member activity such as views."}],"servers":[{"url":"https://api.memberspace.com/admin/v1","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Opaque Admin API key, prefixed with `ms_admin_`. Pass it as `Authorization: Bearer ms_admin_...`."}},"parameters":{"cursor-header":{"name":"X-Cursor","in":"header","required":false,"schema":{"type":"string"},"description":"First item to return, usually equals the previous page response's `X-Next-Cursor` response header. Omit to fetch the first page. Cursors are opaque tokens — do not parse or construct them."},"itemsAfter-header":{"name":"X-Items-After","in":"header","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Maximum number of results to return beginning with the cursor, or if not sent the first item in the list (1-100, default 25)."}},"schemas":{"ContentLibraryView":{"type":"object","description":"A record of a member successfully viewing a piece of your Content Library content.","properties":{"id":{"type":"integer","description":"Unique view identifier."},"memberId":{"type":"integer","description":"The member who viewed the content."},"node":{"type":"object","description":"The content item that was viewed.","properties":{"id":{"type":"integer","description":"Unique node identifier."},"name":{"type":"string","description":"Name of the content item."},"type":{"type":"string","enum":["file","link","article","post","protectedPage","video"],"description":"The kind of content item."}},"required":["id","name","type"]},"spaceNode":{"type":"object","description":"The space (collection) the content belongs to.","properties":{"id":{"type":"integer","description":"Unique space node identifier."},"name":{"type":"string","description":"Name of the space."}},"required":["id","name"]},"viewedAt":{"type":"string","format":"date-time","description":"When the content was viewed."}},"required":["id","memberId","node","spaceNode","viewedAt"]},"ApiError":{"type":"object","description":"Error response.","properties":{"errors":{"type":"array","description":"The errors that occurred.","items":{"type":"object","properties":{"path":{"type":"string","description":"`base` for errors not tied to a specific field; otherwise the dotted path of the offending field (e.g. `community.isEnabled`)."},"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string","description":"Human-readable error message."}},"required":["path","code","message"]}}},"required":["errors"]}},"headers":{"hasMoreItemsAfter":{"description":"Whether there are more results after the last item in this page.","schema":{"type":"boolean"}},"nextCursor":{"description":"Opaque cursor for the next page. Omitted when X-Has-More-Items-After is false.","schema":{"type":"string"}},"totalCount":{"description":"Total number of items matching the query across all pages, ignoring pagination.","schema":{"type":"integer"}}},"responses":{"400-InvalidRequest":{"description":"Invalid request (e.g. a malformed cursor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401-AccessDenied":{"description":"The API key is missing, unknown, revoked, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404-NotFound":{"description":"The resource doesn't exist, or the API key lacks the scope to access it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429-RateLimited":{"description":"Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before making another request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"paths":{"/contentLibrary/views":{"get":{"tags":["contentLibrary"],"summary":"List content views","description":"Returns records of members successfully viewing your Content Library content, ordered by id and paginated with an opaque cursor. Filter by member, content item, and view date.","parameters":[{"$ref":"#/components/parameters/cursor-header"},{"$ref":"#/components/parameters/itemsAfter-header"},{"name":"memberId","in":"query","required":false,"schema":{"type":"integer"},"description":"Only return views by this member."},{"name":"nodeId","in":"query","required":false,"schema":{"type":"integer"},"description":"Only return views of this content item."},{"name":"viewedAfter","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return views on or after this ISO 8601 date-time (inclusive)."},{"name":"viewedBefore","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return views before this ISO 8601 date-time (exclusive)."}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContentLibraryView"}}}},"headers":{"X-Has-More-Items-After":{"$ref":"#/components/headers/hasMoreItemsAfter"},"X-Next-Cursor":{"$ref":"#/components/headers/nextCursor"},"X-Total-Count":{"$ref":"#/components/headers/totalCount"}}},"400":{"$ref":"#/components/responses/400-InvalidRequest"},"401":{"$ref":"#/components/responses/401-AccessDenied"},"404":{"$ref":"#/components/responses/404-NotFound"},"429":{"$ref":"#/components/responses/429-RateLimited"}}}}}}
```
