Connector for the Box View API. View API Arrow Connector


$ appc install connector/

In your Arrow configuration, ensure you have the following:

connectors: {
‘’: {
generateModelsFromSchema: true


Two models will be auto-generated when you install this connector: and

Programmatic Usage

var model = Arrow.getModel('');

// Creating a document via URL
    url: ''
}, function(err, instance) {


// Creating a document via file
    file: fs.createReadStream(__dirname + '/files/file.pdf')
}, function(err, instance) {

// Retrieve all documents
model.findAll(function(err, data) {

// Retrieve document
model.findOne('DOCUMENT_ID_HERE', function(err, data) {

// Update a document
model.findOne('DOCUMENT_ID_HERE', function(err, instance) {
    instance.set('name', 'Test Document');, savedRecord) {});

// Create a view session
var sessionModel = Arrow.getModel('');

    doc_id: 'DOCUMENT_ID_HERE'
}, function(err, instance) {

// etc.

Creating a model

If you are not extending off the two pre-build models (mentioned above), you’ll need to provide some metadata
in your model to ensure the connector knows which endpoints to point to. For example, if you want a custom model
to point to the documents endpoint of the Box View API:

var Arrow = require('arrow');

var Model = Arrow.createModel('myCustomModel', {
    fields: {
        // your fields here
    connector: '',
    metadata: {
        '': {
            endpoint: 'documents'

module.exports = Model;

Likewise set the endpoint to “sessions”, if you want it to point to that endpoint.


This project is open source and licensed under the Apache Public License (version 2). Please consider forking this project to improve, enhance or fix issues. If you feel like the community will benefit from your fork, please open a pull request.

To protect the interests of the contributors, Appcelerator, customers and end users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is simple and straightforward - it requires that the contributions you make to any Appcelerator open source project are properly licensed and that you have the legal authority to make those changes. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes only a few minutes, and only needs to be completed once.

You can digitally sign the CLA online. Please indicate your email address in your first pull request so that we can make sure that will locate your CLA. Once you’ve submitted it, you no longer need to send one for subsequent submissions.

Legal Stuff

This software is licensed under the Apache 2 Public License. However, usage of the software to access the Appcelerator Platform is governed by the Appcelerator Enterprise Software License Agreement. Copyright (c) 2014-2017 by Appcelerator, Inc. All Rights Reserved.

Appcelerator is a registered trademark of Appcelerator, Inc. Arrow and associated marks are trademarks of Appcelerator. All other marks are intellectual property of their respective owners. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at