Bambu API Documentation

Similar documents
tally Documentation Release Dan Watson

Tangent MicroServices Documentation

django-ratelimit-backend Documentation

Django IPRestrict Documentation

Django MFA Documentation

ClickToCall SkypeTest Documentation

django-openid Documentation

Django-Select2 Documentation. Nirupam Biswas

wagtail-robots Documentation

django-app-metrics Documentation

Bambu Bootstrap Documentation

django-subdomains Documentation

django-facebook-graph Documentation

Tailor Documentation. Release 0.1. Derek Stegelman, Garrett Pennington, and Jon Faustman

Magento Survey Extension User Guide

Leveraging the Globus Platform in your Web Applications. GlobusWorld April 26, 2018 Greg Nawrocki

django-allauth-2fa Documentation

django-oauth2-provider Documentation

Using Microsoft Azure Active Directory MFA as SAML IdP with Pulse Connect Secure. Deployment Guide

django-sticky-uploads Documentation

DJOAuth2 Documentation

django-avatar Documentation

django-dajaxice Documentation

flask-jwt Documentation

Trunk Player Documentation

django-password-reset Documentation

Kinto Documentation. Release Mozilla Services Da French Team

Leveraging the Globus Platform in your Web Applications

Biostar Central Documentation. Release latest

ForgeRock Access Management Customization and APIs

django-mama-cas Documentation

StorageGRID Webscale 11.0 Tenant Administrator Guide

django-facebook-graph Documentation

Black Box DCX3000 / DCX1000 Using the API

micawber Documentation

MapEntity Documentation

Cloud Help for Community Managers...3. Release Notes System Requirements Administering Jive for Office... 6

Django-frontend-notification Documentation

django-avatar Documentation

django-modern-rpc Documentation

openid connect all the things

django-oscar-paypal Documentation

Check to enable generation of refresh tokens when refreshing access tokens

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

sanction Documentation

bzz Documentation Release Rafael Floriano and Bernardo Heynemann

Create OData API for Use With Salesforce Connect

How to Configure Authentication and Access Control (AAA)

Release Joris Beckers

Installation and Configuration Worksheet for AquaLogic Ensemble 1.0 MP2

Flask-SimpleLDAP Documentation

Integrating with ClearPass HTTP APIs

The simple but powerful elegance of Django REST Framework. start

8.0 Help for Community Managers Release Notes System Requirements Administering Jive for Office... 6

Gargoyle Documentation

Administering Jive Mobile Apps

Django Synctool Documentation

How to social login with Aruba controller. Bo Nielsen, CCIE #53075 (Sec) December 2016, V1.00

django-conduit Documentation

Installation and Configuration Worksheet for AquaLogic Ensemble 1.0

Django File Picker Documentation

BLACKBERRY SPARK COMMUNICATIONS PLATFORM. Getting Started Workbook

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface

Djam Documentation. Release Participatory Culture Foundation

SAP BusinessObjects Explorer API Guide SAP BusinessObjects Explorer XI 3.2 SP2

Postman User Guide. Document Reference: July Version: 2

Kiki Documentation. Release 0.7a1. Stephen Burrows

OAuth2 Autoconfig. Copyright

django-embed-video Documentation

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

If you are not registered as Developer yet, you need to click blue button Register.

Seshat Documentation. Release Joshua P Ashby

Grandstream Networks, Inc. Captive Portal Authentication via Twitter

django-slim Documentation

Archer Documentation. Release 0.1. Praekelt Dev

Composer Help. Web Request Common Block

Migration Tool. User Guide. SHOPIFY to MAGENTO. Copyright 2014 LitExtension.com. All Rights Reserved.

Building the Modern Research Data Portal using the Globus Platform. Rachana Ananthakrishnan GlobusWorld 2017

Configuring Apache Knox SSO

django-session-security Documentation

django-revproxy Documentation

PyZabbixObj Documentation

django-cron Documentation

Entrust GetAccess 7.0 Technical Integration Brief for IBM WebSphere Portal 5.0

django-mongonaut Documentation

API Security Management SENTINET

Django CBTools Documentation

silk Documentation Release 0.3 Michael Ford

Configuring Anonymous Access to Analysis Files in TIBCO Spotfire 7.5

EXPERIENCES MOVING FROM DJANGO TO FLASK

LUCITY REST API INTRODUCTION AND CORE CONCEPTS

Django Test Utils Documentation

django-telegram-bot Documentation

django-push Documentation

Protect Your API with OAuth 2. Rob Allen

Asana for bpm'online. User manual

Tutorial: Building the Services Ecosystem

Lesson 7: Defining an Application

ClearPass. ClearPass Extension Universal Authentication Proxy. ClearPass Extension Universal Authentication Proxy TechNote

django-users2 Documentation

Transcription:

Bambu API Documentation Release 2.0.1 Steadman Sep 27, 2017

Contents 1 About Bambu API 3 2 About Bambu Tools 2.0 5 3 Installation 7 4 Basic usage 9 5 Questions or suggestions? 11 6 Contents 13 6.1 Defining and registering endpoints.................................... 13 6.2 Settings.................................................. 13 6.3 Throttling requests............................................ 14 6.4 Internal requests............................................. 14 6.5 Making data ready for serialisation................................... 14 6.6 Serialising data.............................................. 14 6.7 Authentication.............................................. 14 7 API reference 15 7.1 Decorators................................................ 15 7.2 Exceptions................................................ 15 7.3 Helper functions............................................. 15 7.4 Menus.................................................. 15 7.5 Models.................................................. 15 7.6 Responses................................................ 15 7.7 The API site............................................... 15 7.8 URLconf................................................. 15 8 Indices and tables 17 i

ii

Bambu API Documentation, Release 2.0.1 Quickly expose your models to a JSON or XML API, authenticated via HTTP or OAuth. Contents 1

Bambu API Documentation, Release 2.0.1 2 Contents

CHAPTER 1 About Bambu API This package allows you to easily expose Django models to RESTful endpoints which can send data in XML or JSON format. 3

Bambu API Documentation, Release 2.0.1 4 Chapter 1. About Bambu API

CHAPTER 2 About Bambu Tools 2.0 This is part of a toolset called Bambu Tools. It s being moved from a namespace of bambu to its own root-level package, along with all the other tools in the set. If you re upgrading from a version prior to 2.0, please make sure to update your code to use bambu_api rather than bambu.api. 5

Bambu API Documentation, Release 2.0.1 6 Chapter 2. About Bambu Tools 2.0

CHAPTER 3 Installation Install the package via Pip: pip install bambu-api Add it to your INSTALLED_APPS list: INSTALLED_APPS = (... 'bambu_api' ) Add bambu_api.urls to your URLconf: urlpatterns = patterns('',... url(r'^', include('bambu_api.urls')), ) The prefix should be kept blank, as the package exposes two main URL stems: /api/, wherein the RESTful endpoints live, and /docs/ where auto-generated documentation for each endpoint is found. 7

Bambu API Documentation, Release 2.0.1 8 Chapter 3. Installation

CHAPTER 4 Basic usage You define API endpoints like Django admins, and register them in a similar way. Teka the Django polls app as an example. Within the polls directory, you d create a file called api.py. A simple API endpoint would be defined like this: from bambu_api import ModelAPI, site from myproject.polls.models import Question class QuestionAPI(ModelAPI): pass site.register(question, QuestionAPI) This registers the QuestionAPI endpoint for the Question model. The endpoint is then accessible at /api/ polls/question.json. 9

Bambu API Documentation, Release 2.0.1 10 Chapter 4. Basic usage

CHAPTER 5 Questions or suggestions? Find me on Twitter (@iamsteadman) or visit my blog. 11

Bambu API Documentation, Release 2.0.1 12 Chapter 5. Questions or suggestions?

CHAPTER 6 Contents Defining and registering endpoints Settings API_AUTH_BACKEND The provider used to authenticate users through the API (default is bambu_api.auth.http.httpauthentication ) API_AUTH_REALM The HTTP authentication realm (default is Restricted access ) API_LOGIN_URL The URL to redirect anonymous API users to (defaults to the result of reversing the URL name login ) API_AUTH_ALLOW_REGISTRATION When True, this allows users to sign up via the API thus creating an auth. User object (defaults to False) API_ALLOW_USER_MANAGEMENT When True, allows users to edit their login details via the API (defaults to False) API_ALLOW_GROUP_MANAGEMENT When True, allows authenticated users to create, read, update and delete auth.group objects (defaults to False) API_CACHE_VARY_HEADERS Which HTTP headers are used to decide whether to cache content or not. Defaults to Cookie API_THROTTLE_REQUESTS The number of requests permitted in X minutes (where X is the value of API_THROTTLE_MINUTES). The default is 60. API_THROTTLE_MINUTES The number of minutes that defines how many requests to allow before throttling. The default is 1. API_REQUEST_LOGGER The default request logger to use (the means by which throttling occurs). Specify the fully qualified module and class name of the logger. Defaults to bambu_api.requestlogging.databaserequestlogger 13

Bambu API Documentation, Release 2.0.1 Redis-specific settings If using Redis to log the number of requests by a specific app for throttling, you can configure Bambu API to use a specific host and database API_REDIS_HOST The Redis host to use (defaults to localhost ) API_REDIS_PORT The Redis port to use (defaults to 6379) API_REDIS_DB The index of the Redis database to use (defaults to 0) API_REDIS_PASSWORD The password for the Redis database (defaults to ) Throttling requests Internal requests Making data ready for serialisation Serialising data Authentication Built-in providers Decorators 14 Chapter 6. Contents

CHAPTER 7 API reference Decorators Exceptions Helper functions Menus Provides a menu builder used by bambu_navigation. Models Managers Responses The API site URLconf 15

Bambu API Documentation, Release 2.0.1 16 Chapter 7. API reference

CHAPTER 8 Indices and tables genindex modindex search 17