Search

Never mind, figured it out. Problem was on the iPhone side. Switched to a 3rd party library to handle HTTPRequests, http://allseeing-i.com/ASIHTTPRequest/

Will most certainly write up a post when I’ve finialise this project but I am definitely keen to see this API extension working. Keep up the good work!

As it is not currently functional could you please advise on how I could achieve getting data into Symphony via HTTP POST requests?

I see that you’ve solved this in the other thread.

I should add that at its core this extension is simply a wrapper for native Data Sources and Events. You can get a working public API without this extension by attaching a Data Source (read) to your page, and an Event (write) which will process a POST. This extension just formalises it a little.

so first you would request an initial token from the server, then do the magic on your server (the server does the magic as well) then a second request will be sent with the magic new token and if it’s the same like the server has then it will provide the data!

Can you explain the benefits of this? The extension currently supports token authentication (see the bottom of the README) whereby you pass a token parameter on the end of the URL which matches the token that is assigned to a Symphony author. If creating entries using a token then the author will be attributed to that entry.

That way you can control access to the api… only giving the servers/people access to it you allow by giving them a api and a secret key…

I’d suggest you can do this with the current implementation. Create a new “API user” as a Symphony login and each one has its own unique token.

okay then… =)

But what if I want to server mp3 files which shouldn’t be downloadable for the user. like have a flash file load the mp3’s… the url can only be used once though, and only after the request has been made :)

yeah now i’m digging deep, but I work on a project where a national music database set up a rest api like that… would be neat to be able to accomplish something similar with symphony!

If you are interested and need more details I’ll try to be more specific.

Nick, are there any plans to make this extension Symphony 2.2 compatible?

Nick, are there any plans to make this extension Symphony 2.2 compatible?

Yes :-)

I've made some good progress in tidying this extension up. Here's where I am:

  • a plugin architecture, three plugins so far: authors, entries and sections (Maybe in the future, extensions could provide their own plugins e.g. Tracker could expose its log via the API)
  • support for GET (read) and POST (write), not bothering with PUT and DELETE
  • output formats are JSON, XML, YAML and serialized PHP array. Contemplating CSV if there's a decent enough generic library that doesn't need much work
  • API always requires authentication (a Symphony cookie or author token), so is never open to the public

I stopped the original version of this extension because I wanted to build some sort of access control layer on top of the one that was expected in Symphony 2.1 (which didn't really arrive). I've come to the conclusion that fine grained access to the API isn't strictly necessary. This API is intended for developer use — building your own things on top of it, sharing data between sites, that sort of thing. If you need to expose an API to your users then this isn't really for you (as exposing an API to your users would be specific to the service you're providing). Is that a fair assumption to make, at least for now?*

Is that a fair assumption to make, at least for now?

Yes.

Closing this thread in favour of the REST API thread.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details