SpiceWorld Austin 2015: How to Build Spiceworks Platform Apps sponsored by IBM Bluemix

Post on 13-Apr-2017

214 views 1 download

Transcript of SpiceWorld Austin 2015: How to Build Spiceworks Platform Apps sponsored by IBM Bluemix

How to Build Spiceworks AppsSponsored by IBM Bluemix

Michael GerbushTechnical Product Manager, Spiceworks

David BarnesTechnology Evangelist, IBM

Why make apps for Spiceworks?

Apps, so hot right now.

• Keep Spiceworks light and easy• All about the common IT pro• Loooong tail of feature requests• Leverage our awesome community• Want to be Everything IT

What’s App (Center)?

Built on the SW Core

• Apps• Reports• Language Packs

Not Included

• Scripts

Workshop Agenda

I. Intro to Apps

II. Project 1: Our First App

III. Developing with PaaS: IBM Bluemix

IV. Project 2: Using the Spiceworks API

V. Project 3: Hacking a Real App

VI. What’s Next?

Spiceworks Apps

Cloud Apps

• Use Your Own Technology• Store Your Own Data• Can Integrate with Off-Network Services• Easy to Update• More Secure Inside of Spiceworks• Less Likely to Break Between Releases

Plugins

• Easier to Write• No Server Costs• Unlimited UI Integration• Data Can Stay On-Premise

Cloud Apps

• Comfortable writing and deploying a web app

• Integrating with a 3rd party hosted service• Storing large amounts of data• Leveraging network effect

Plugins

• Need Special UI Integration• Want to keep all data on premise, forever

What Should I Build?

Spiceworks Cloud Apps

Using Spiceworks API

DEMO – Empty Slide

Our First App

Using Spiceworks API

DEMO – Empty Slide

Using Spiceworks API

Spiceworks API Basics

Cards• Represents an instance of your app• Your window to the Desktop

Services• API for a Spiceworks app (e.g.

Inventory, Helpdesk, etc.)• Responds to requests

Spiceworks API Basics

Creating a Card

var card = new SW.Card();

Variable

Spiceworks Library

Card Constructor

Spiceworks API Basics

Accessing Services with a Card

var card = new SW.Card(); card.services('helpdesk');

Services List

Service Name

Spiceworks API Basics

Passing Parameters

card.services('helpdesk').request('ticket:update', 2, {status: ‘open’})

Request Name(‘object:action’)

Required Parameter

Optional Parameters

Spiceworks API Basics

Handling Responses

card.services('helpdesk').request('tickets', { status: 'open' }).then(function(data){ // do something with tickets... }, function(error){// handle error... });

Spiceworks API Basics

Paging

card.services('helpdesk').request('tickets', { status: 'open', page: 2, per_page: 50 })

Spiceworks API Basics

Paging (Cont.)

{"meta": {

"total_entries": 205, // total number of items, across all pages "page_count": 7, // total number of pages

"per_page": 30, // number of items per page "current_page": 2 // the current page number

},“tickets”: […]

}

Spiceworks API Basics

Searching

card.services('helpdesk').request('tickets', { search: {

query: { terms: ['Microsoft', 'keyboard'], operator: 'and'

},

fields: { names: ['summary']

} }})

Using the Spiceworks API

Try It Out!

https://developers.spiceworks.comDocumentation > Cloud Apps

API BasicsAPI Reference

Using Spiceworks API

DEMO – Empty Slide

Our First REAL App

Where to go from here?

Learning Resources

• Coding Resources• Code School• Khan Academy• Bootcamps• Stack Overflow• Nodeschool.io

• Spiceworks Developer Resources• developers.spiceworks.com• Extending Spiceworks• Checkout Feature Requests

Future Plans

What’s coming next?

• App Center• Better browsing• Free trials without credit cards• More apps!

• Developer Tools• API Improvements• Tiered Purchasing• Open Submissions

Thanks!

Thanks!