Link Search Menu Expand Document

Updated Fri Mar 5th 2021, 12:17 UTC

Searching for saved replies

GET /users/:user/saved_replies{?filter,query}

“All” filter: Search through saved replies created by either the user or other users on the account who have shared theirs. “Mine” filter: Search through only the saved replies created by the user.

Examples

Searching all saved replies

Request

GET /users/zygnZv/saved_replies?filter=all&q=bother
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X GET /users/zygnZv/saved_replies?filter=all&q=bother
    

Response

Status

200

Response Type

SavedReplyCollection

Example
{
  "@type": "SavedReplyCollection",
  "id": "/users/zygnZv/saved_replies?filter=all&q=bother",
  "@context": "/contexts/SavedReplyCollection.jsonld",
  "totalItems": 1,
  "members": [
    {
      "@type": "SavedReply",
      "id": "/saved_replies/QxvonQv",
      "@context": "/contexts/SavedReply.jsonld",
      "title": "Stop being a bother",
      "content": "Can you please stop texting me?",
      "shared": false,
      "user": "/users/zygnZv"
    }
  ],
  "view": {
    "@type": "hydra:PartialCollectionView",
    "id": "/users/zygnZv/saved_replies?filter=all&q=bother",
    "@context": "/contexts/hydra:PartialCollectionView.jsonld",
    "first": "/users/zygnZv/saved_replies?filter=all&q=bother",
    "next": null,
    "previous": null
  }
}

Searching my saved replies

Request

GET /users/zygnZv/saved_replies?filter=mine&q=bother
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X GET /users/zygnZv/saved_replies?filter=mine&q=bother
    

Response

Status

200

Response Type

SavedReplyCollection

Example
{
  "@type": "SavedReplyCollection",
  "id": "/users/zygnZv/saved_replies?filter=mine&q=bother",
  "@context": "/contexts/SavedReplyCollection.jsonld",
  "totalItems": 1,
  "members": [
    {
      "@type": "SavedReply",
      "id": "/saved_replies/QxvonQv",
      "@context": "/contexts/SavedReply.jsonld",
      "title": "Stop being a bother",
      "content": "Can you please stop texting me?",
      "shared": false,
      "user": "/users/zygnZv"
    }
  ],
  "view": {
    "@type": "hydra:PartialCollectionView",
    "id": "/users/zygnZv/saved_replies?filter=mine&q=bother",
    "@context": "/contexts/hydra:PartialCollectionView.jsonld",
    "first": "/users/zygnZv/saved_replies?filter=mine&q=bother",
    "next": null,
    "previous": null
  }
}

© 2021 TextUs