GETTING STARTED
BUILDING YOUR FIRST APP

 
 

Before getting into this, it's worth checking out the video by Rob @ 1upIT about building your first app.


Registering for access

To get started, go to the developer sign up page and register for access to mydigitalstructure.com.  It only takes about 1 minute.

You will be emailed the password.

You can then access your space and websites/webapps at develop.mydigitalstructure.com.

Note this webapp includes un-minimised scripts to make it easier to see how it all works, so the first load can take a while.

See also, building your first app using the simple jQuery IDE


Authentication

You can then authenticate and access the system by http POSTing:

/rpc/logon/

&method=LOGON
&logon=

&password=

or

&method=LOGON
&logon=

&passwordhash=md5(logon + password)

more details...

As curl request:

curl --data "method=LOGON&logon=&password=" "https://au.mydigitalstructure.com/rpc/logon/" 

Note: the trailing "/" on the URL is important - if you omit it, you will get a 405 error.

As default all responses are type json with MIME content type set to application/json.  If you want the response to be XML then set &rf=XML in your requests, the MIME content type will then be set to text/xml.  You can also set your own MIME content type by sending &contenttype= with your request.  You can also use the shorthand &ct=.

If requests are via ajax call within a webapp hosted on 1blankspace.com then access via token is done automatically using session cookies.

If you intend to manage the space remotely going forward, you can also generate a secure token using /ondemand/core/?method=CORE_ACCESS_TOKEN and then in subsequent method calls add this as &access_token=, else just add &logon= and &password= to each request.

Else capture the "sid" value returned in the /logon call and pass that with every call using name value pair sid=[sid value].

You will also get passed back "logonkey", which you need to return with every call using name value pair logonkey=[logonkey value].

You can now go to develop.mydigitalstructure.com and access your space using the open source jQuery based interface and manage your websites/webapps etc

Webapi endpoints are at:

https://au.mydigitalstructure.com


Managing the space remotely, ie direct access to the API.


When a space is created, a default website is created, to view it use:

/ondemand/setup/?method=SETUP_SITE_SEARCH

You can then use it as is, or convert it to a default 1blankspace.com jQuery webapp using:

/ondemand/setup/?method=SETUP_SITE_MANAGE&id=[siteid]&createapp=JQUERY

or for a jQuery Mobile webapp use:

/ondemand/setup/?method=SETUP_SITE_MANAGE&id=[siteid]&createapp=JQUERYMOBILE

You can then reuse the search to get the url to access it.

You can download the scripts and modify or use your own scripts as required to access the mydigitalstructure REST API methods.

If you are building a webapp, we highly recommend using jQuery to achieve this – but you can use any REST based environment you choose.

You can use your preferred IDE.


Good luck and don’t forget to:

# contact as community.ibCom.biz if you need help
# visit /gettingstarted_debugging for tips on debugging an app
# visit /documentation for reference material
# visit the Develop With blog
# twitter: @ibComMYDS
# facebook:  facebook.com/mydigitalstructure


The ibCom team.

 

 

More getting started topics