Zum Hauptinhalt gehen

Newer version of FirstSpirit REST Service (0.0.12-beta)

Kommentare

7 Kommentare

  • Stephan Windmüller

    Hello Natasa,

    the FirstSpirit REST API is distributed using our Artifactory. You can find the current download URL in the installation instructions.

    Please note: I just released 0.0.16-beta. Swagger support has been available since 0.0.1-alpha.

    0
  • Natasa Maksimovic

    Thank you for your answer.

    I still have problem with swagger, that's why I thought it wasn't available before.
    Swagger UI isn't available on our deployment (/rest/swagger-ui/index.html returns 404 / "No static resource swagger-ui"), but I exported the OpenAPI spec directly from /rest/v3/api-docs and imported it into the Swagger Editor (editor.swagger.io) to browse the available endpoints.

    Main problem and question is for the FS CATALOG and FS REFERENCE fields, which are listed as a valid type in the FormEditorDTO but I was not able to edit these fields via the REST API.
    I got an example for the FS REFERENCE body from your support and tried all the variants, but I still have the same error:

    500 - "Invalid value for 'st_pic' (de.espirit.firstspirit.access.store.templatestore.gom.GomReference)"

    I tried to update an FS_REFERENCE field (a picture reference, st_pic) on a page section via:

    PATCH /v1/projects/{projectId}/pages/{pageUid}/bodies/{bodyName}/sections/{sectionName}/form/{editorName}

    GET on the field returns this:

    json
    {
      "name": "st_pic",
      "type": "FS_REFERENCE",
      "configuration": {
        "allowsEmpty": true, "breaks": true, "fillsHorizontally": true,
        "hidden": false, "usesLanguages": true, "allowsUpload": true,
        "sections": "NO", "showsThumbnail": true
      },
      "content": "[(undefined)]@7d2dbbc"
    }

    Then I PATCH back with the same object, just replacing content with:

    json
    "content": { "uid": "some_media_uid", "uidType": "MEDIASTORE_LEAF" }

    I've tested with: a released medium, an unreleased medium, referencing by string uid and by numeric id - same error every time.

     

    0
  • Stephan Windmüller

    FS_REFERENCE handling has been simplified in 0.0.12-beta and again in 0.0.16-beta.

    Do you have access to Artifactory so you can download the latest version?

    0
  • Natasa Maksimovic

    yes, I downloaded the latest version and tested it.
    I also checked the version with

    {{host}}/v1/modules/

    and it is

    { "name": "com-crownpeak-firstspirit-modules-rest", 
    "version": "0.0.16-beta",
    "displayName": "FirstSpirit REST API",
    "description": "module",
    "vendor": "Crownpeak" }
    0
  • Stephan Windmüller

    Just to understand you correctly: Swagger does not work with 0.0.16-beta and you can still reproduce the PATCH issue?

    Did you redeploy the updated web-app using ServerManager?

    0
  • Natasa Maksimovic

    Yes, all that I mentioned has been tested with the 0.0.16 beta version.

    I updated the web component after installing the new version. I will try again with update web server

    0
  • Stephan Windmüller

    You do not need to pass the configuration. Try this minimal body:

    {
    "name": "st_pic",
      "type": "FS_REFERENCE",
      "content": {
      "uid": "some_media_uid",
        "uidType": "MEDIASTORE_LEAF"
      }
    }

    If you still get a 500 error, please post the log files generated on the web server.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.