mdziekan
I'm new here

Generate pages from remote REST API

Hi!

I have a website with angular rest api calls and I want to generate all possible pages from remote API.

Does anyone know how to generate static pages from remote API? Can I do it with modules during generate process?

I found for example de.espirit.firstspirit.generate.SiteProduction class and generateFile inside it but there is no documentation about this Smiley Sad

0 Kudos
2 Replies
marza
I'm new here

Hi Mateusz,

we have a quite good documentation available online at http://www.e-spirit.com/odfs52/ which also ships with every FirstSpirit installation. Let us say you have a local FirstSpirit-Installation then the documentation is available under http://localhost:8000/help/odfs/index.html.

If I were you I wouldn't go for the SiteProduction since you would loose the benefit of preview pages in SiteArchitect or ContentCreator.

For me to clarify things:

1) Do you want to have a REST API from FirstSpirit content?

2) Or do you want to fill FirstSpirit pages with content from a REST API?

If 1) applies -> there is a new product (FirstSpirit CaaS) available for this. Implementation effort is very low but addiotional license fees could be needed.

If 2) applies, well then you probably should consider code own FirstSpirit modules in Java which offers the data via Executables backed by Services (this requires strong FS module developement skills). Implementation effort is high but propbably no additional license fees.

Using a third party REST API during generation is also very dangeous since your generation of FirstSpirit pages would depend from Internet access and availibility of the REST API. So it would be a good idea to buffer the content with at least a HTTP proxy or using a database with gets the content periodically via REST. Using databases as a source of content is quite easy in FirstSpirit.

I hope I could answer some of questions or point you in the right direction.

Regards,

Marian

0 Kudos
MichaelaReydt
Community Manager

Hello Mateusz,

do you need further help or did Marian's anwer already helped you?

If so it would be great if you mark his "correct answer"

Best regards,

Michaela

0 Kudos