Forum Stats

  • 3,851,977 Users
  • 2,264,055 Discussions
  • 7,904,923 Comments

Discussions

Using REST endpoints in WCS 12.2.1.1

Asciazza
Asciazza Member Posts: 24
edited Oct 11, 2018 12:12PM in WebCenter Sites

Hello,

Using WCS 12.2.1.1 I'm trying to use REST resources with little success.

calling /sites/REST/resources/v1/search/assets gets me 0 records

calling /sites/REST/resources/v1/aggregates/{siteName}/{assetType}/{assetId} gets me an error saying "asset type xxx can not be found in Content Server"

Anyone could give me an hint on what's happening? Maybe I need to configure something before calling REST endpoints?

Thanks

Best Answer

  • Nirav Varma
    Nirav Varma Member Posts: 484 Gold Badge
    edited Oct 9, 2018 6:09AM Answer ✓

    You would have to enable Lucene indexes for the REST point to work. REST API uses lucene indexes. Enable Lucene indexes for the assettype which you want to search from Admin UI.

    Regards

    NV

Answers

  • Graham L
    Graham L Member Posts: 69 Blue Ribbon
    edited Oct 5, 2018 1:23PM

    Can you be more specific with your REST requests? Please show complete requests without placeholders? Also please advise which user you are logged in as when hitting the url?

  • Nirav Varma
    Nirav Varma Member Posts: 484 Gold Badge
    edited Oct 9, 2018 6:09AM Answer ✓

    You would have to enable Lucene indexes for the REST point to work. REST API uses lucene indexes. Enable Lucene indexes for the assettype which you want to search from Admin UI.

    Regards

    NV

  • Asciazza
    Asciazza Member Posts: 24
    edited Oct 11, 2018 11:14AM

    After i enabled asset type search it seems to work, only global search was enabled for the asset type i needed.

    What's the difference between global search and asset type search?

    Thanks

  • Joe_Scanlon
    Joe_Scanlon Member Posts: 155
    edited Oct 11, 2018 11:17AM

    AssetType is just searching against the particular content types - each lucene index is JUST that asset type (though there are ways to follow relationships thru the REST api)

    Global is all the info thrown into a single index (but it does not contain all of the attributes that are possible to index and retrieve)

    Joe Scanlon

    M: 603.459.3242

    F: 1-941-296-7907

    E: [email protected]

    CONFIDENTIALITY NOTICE: This email message (including attachments) contains information which may be confidential and/or legally privileged.

    Unless you are the intended recipient, you may not use, copy or disclose to anyone the message or any information contained in the message or from any attachments that were sent with this email, and If you have received this email message in error, please advise the sender by email, and delete the message.

    Unauthorized disclosure and/or use of information contained in this email may result in civil and criminal liability

  • Asciazza
    Asciazza Member Posts: 24
    edited Oct 11, 2018 12:12PM