Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Create API using runtime

Avatar

Avatar
Validate 1
MVP
AlexisCazes
MVP

Likes

185 likes

Total Posts

420 posts

Correct Reply

198 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
MVP
AlexisCazes
MVP

Likes

185 likes

Total Posts

420 posts

Correct Reply

198 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
AlexisCazes
MVP

15-01-2020

i read the following documentation that explain how to create an API: https://www.adobe.io/apis/experienceplatform/runtime/docs.html#!adobedocs/adobeio-runtime/master/gui...

 

Is there a more detailed step by step example like this one https://opensource.adobe.com/faast-path-to-beautiful-apps/

 

To be able to use the API we need to make sure the response contains the headers 

Access-Control-Allow-Origin

I have seen in the documentation: https://www.adobe.io/apis/experienceplatform/runtime/docs.html#!adobedocs/adobeio-runtime/master/gui...

You can also set cookies or cache control headers, perform a HTTP redirect, and so forth.

Any example on how to do this ? 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct Reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct Reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile
Mihai_Corlan
Employee

24-01-2020

Hello Alexis,

 

Luckily, I/O Runtime is built on top of an open source project, Apache OpenWhisk. There are a ton more of resources out there that go in great details. I noted this request, and when time permits we will add a more detailed docs on creating RESTful APIs.

 

Regarding Cache Control, you can find an example here: https://www.adobe.io/apis/experienceplatform/runtime/docs.html#!adobedocs/adobeio-runtime/master/gui... Doing a redirect, would be as simple as the example above, just using the redirect header.

 

Cheers,

Mihai

Answers (1)

Answers (1)

Avatar

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct Reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct Reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile
Mihai_Corlan
Employee

13-04-2020

Alexis,

 

We added a new section to cover the CORS - https://github.com/AdobeDocs/adobeio-runtime/blob/master/guides/creating_rest_apis.md#enable-cors-on...

 

cheers,

Mihai