Upgrades to Endpoint APIs Co-Sponsorship - 65% CLOSED šŸ˜„

Hi @AliFarahat,

Thank you for your quick reply and help!

Sadly - when I detect the data and do a post request (using Postman by the way) the reply is:
{
ā€œstatusā€: ā€œSUCCESSā€,
ā€œmessageā€: ā€œThe endpoint events was sucessfully initializedā€
}
The app then shows the page where it shows the ā€œAPI Workflow requested dataā€
But there are no data types returned (an empty list):
Show raw data:
{ }

I also tried manually adding parameters but without succes.

Any ideas what I’m missing or doing wrong?

Another (related) question: can the data API also show nested data? Or is this feature exclusive to the Workflow API?

Can you explain what your trying to do? Where is the JSON data coming from?

Well actually I need to create an ical feed for events for my clients. Since I haven’t found a solid way to generate one in Bubble I am trying to output my events (including data from Things that are associated with the events) as json so I can use an external tool to convert the data to an ical feed.

So at the moment I am trying to generate output from my Bubble app (an event organization app) containing all relevant info about a list of events (specific to each client).

The data is set-up as follows (simplified):

Type:
Event
Fields:
StartDateTime - date
EndDateTime - date
Location: geographic address
Note - list of Notes
List of Event Items - List of Event Items
Client - User

Type:
Note
Fields:
Note - text
Creator - User

Type:
Event Item
Fields:
EventItemArticle - Article
EventItemStatus - Status
Creator - User

Type:
Article
Fields:
ArticleName - text
ArticleDescription - text

Type:
Status
Fields:
StatusName - text (ie. ā€˜Confirmed’, ā€˜Requested’, etc.)

The JSON data is coming back from the API using Postman.

In essence I am trying to generate a full list of all events (in the form of JSON or any other useful format) for a specific client, where all nested data is shown. Something like:

Events for Client X:

  • Event 1:
    • StartDateTime: time
    • EndDateTime: time
    • Location: some address
    • Notes:
      • Note 1
      • Note 2
    • List of Event Items:
      • Item 1
        • Article:
          • Article A
            • ArticleName: Some article
            • ArticleDescription: Some description
          • Status: Confirmed
      • Item 2
        • Article
          • Article B
            • ArticleName: Some other article
            • ArticleDescription: Some other description
          • Status: Requested
  • Event 2:
    • StartDateTime: different time
    • EndDateTime: different time
    • Location: some other address
    • Notes:
      • Note 1
      • Note 2
      • Note 3
    • List of Event Items:
      • Item 1
        • Article:
          • Article A
            • ArticleName: Some article
            • ArticleDescription: Some description
          • Status: Confirmed

For some reason I can’t seem to make the API endpoint (or data API for that matter) reply with the events including the nested data. eg. the output looks like (copied straight from the response in Postman):

{
"status": "success",
"response": {
    "events": [
       {
                "Created Date": 1546683866298,
                "Created By": "1546042074550x715081543363885000",
                "Modified Date": 1547511656369,
                "StartDateTime": 1547679600000,
                "EventName": "Event Soandso",
                "EndDateTime": 1547683200000,
                "List of Event Items": [
                    "1546718578975x101170693216141310",
                    "1546718585024x909448081750098000",
                    "1546719654222x520787920184672260"
                ], 
                "Location": {
                    "address": "Vrouwensteeg 11, 2311 EB Leiden, Nederland",
                    "lat": 52.1600189,
                    "lng": 4.4884601
                },
                "_id": "1546683865578x284830606366867460",
                "_type": "custom.event"
        },.......

So it shows the id’s for each Event Item associated with that particular event, but it doesn’t ā€˜expand’ the relevant data (ie. Articles, Status, etc.).

Hope this clarifies my problem and really hope you can help me out here!

Thank you so much for your time already!

1 Like