Newer version of FirstSpirit REST Service (0.0.12-beta)
I am currently testing the FirstSpirit REST Service. According to the documentation, the latest version should be 0.0.12-beta, which includes Swagger/OpenAPI support.
However, on file.crownpeak.com under:
customer-download/Modules/REST/
I can only find:
0.0.1/FirstSpirit-REST-0.0.1.fsm
Could someone tell me where to download the latest REST module (0.0.12-beta)?
-
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 -
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.htmlreturns 404 / "No static resource swagger-ui"), but I exported the OpenAPI spec directly from/rest/v3/api-docsand 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_REFERENCEfield (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
contentwith:json"content": { "uid": "some_media_uid", "uidType": "MEDIASTORE_LEAF" }I've tested with: a released medium, an unreleased medium, referencing by string
uidand by numericid- same error every time.0 -
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 -
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 -
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 -
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 -
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
Vous devez vous connecter pour laisser un commentaire.
Commentaires
7 commentaires