theruss

"/api/v1/BlogPost" is correct, but as @ethanj suggests, there's something wrong with the extension itself irrespective of the restfulserver module. You'd prob get that when accessing a BlogPost in the admin

theruss

"localhost/MYSITE/api/v1/BlogPostExtension" will never work. An extension subtly modifies the extended object.

sdoh

I'm just querying the endpoint in the browser via:

localhost/MYSITE/api/v1/BlogPostExtension

(/api/v1/BlogPost or /Blog doesn't work)

ethanj

What are you doing when you get that error? It looks unrelated to the restful portion and more like an problem with the blog module maybe?

sdoh

I can post the rest of the error if needed

sdoh

This the main error I can reproduce: [Emergency] Uncaught Error: Call to undefined method BlogPostExtension::hasOne()

sdoh

Hi Folks,

I am looking to pull some data from my site into a mobile app. So far I am trying to use https://github.com/silverstripe/silverstripe-restfulserver to add a simple rest api to the require dataobjects.

One of the objects is silverstripe/blog. I was wondering how I could achieve adding the restful server above to silvertstripe/blog?

I have a blog extension set up, and I added

  1. private static $api_access = true;

to the extension, but I get some errors and I don't believe this is the correct way to go about it?

Has anyone done this before, or have any suggestions?

Anyone have suggestions instead of using restful server module?

Show 1 attachment(s)
GitHub  
silverstripe/silverstripe-restfulserver

RestfulServer module for SilverStripe CMS. Contribute to silverstripe/silverstripe-restfulserver development by creating an account on GitHub.

Hide attachment content
theruss

Meaning you can commit a single "robots.txt" file to your project, alongside all the rest of your codebase 🙂