List pinned items from one ordinary session page

Read session records for the current user, source, and filters.

POST https://api.moi.matrixorigin.cn/v5/sessions/pinned/list

Before you call this API

Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.

Configure identity, Workspace, and numeric record IDs in the same environment. This entry point uses ordinary product authentication and rejects additional task runtime authorization headers.

Request

curl --request POST \
  "$BASE_URL/sessions/pinned/list" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"page":1,"page_size":20,"source":"moi"}'

If the ordinary list’s total confirms another ordinary page exists, read that page’s pinned items:

curl --request POST \
  "$BASE_URL/sessions/pinned/list" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"page":2,"page_size":20,"source":"moi"}'

Parameter

Location

Type

Required

Description

X-Workspace-ID

Headers

string

Yes

Target Workspace ID.

page

Body

integer

No

Ordinary session page number to read. Omitted/nonpositive values effectively become 1.

page_size

Body

integer

No

Effective page size defaults to 20. For ordinary and pinned base pages, values above 100 become 20.

source

Body

string

No

Exact application source filter. Empty means moi; nonempty values are not trimmed.

keyword

Body

string

No

Title keyword filter, matched as submitted.

tags

Body

string

No

One tag-name filter, not an array. Does not simultaneously filter tag source.

First reads the specified ordinary session page, then filters system/pinned within that page, preserving ordinary page order. This is not direct pagination over all pinned sessions. Responses have no total/page/page_size; an empty page does not establish completion. For a complete list, traverse ordinary pages using the corresponding ordinary list’s total, then check pinned items on each page. Tag relationship read failures may also return empty sessions, which does not prove there are no pinned sessions.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "sessions": [
      {
        "id": 41,
        "title": "临时会话",
        "source": "moi",
        "user_id": "user-example",
        "config": "{}",
        "tags": [],
        "created_at": 1794445200,
        "updated_at": 1794445200
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success; HTTP status is 200.

msg

string

OK on success.

data.sessions

array (objects)

Pinned sessions within the specified ordinary page; no total/page/page_size.

Error responses

Error formats and result confirmation distinguishes session-detail not-found from generic service errors at other entry points.

Last updated on