Git Product home page Git Product logo

api-docs's Introduction

Fieldbook API docs

The Fieldbook API lets you read and write records in your books. Each book has its own API, based on the structure of that book.

Use cases

Use the Fieldbook API to...

  • Store content or configuration for your app: Create a Fieldbook to hold app configuration or content, in lieu of a custom admin interface. Then read it through the Fieldbook API from your production app.

  • Prototype and demo: Use Fieldbook as a quick back end for prototyping workflows and client apps.

  • Glue together systems and processes: Dump structured output from one program, review and revise the results by hand, then feed it into the next stage of the process.

Documentation

Official Clients

Community

Unofficial client projects:

Other projects:

api-docs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-docs's Issues

Deleting an item

Hi,
I'm trying to delete a record with the API, following the docs here. They just say to call DELETE .../book/sheet/record but I get a 400 response from the API stating 'invalid json, empty body'... so is there some json I should also be providing?

Return All Books

Is it possible to send a request to /books and return a list of all books in an account?

Add new fields to a sheet

It'd be great to add new fields to a sheet using the API. This would, ideally, be done in one of two ways:

  1. Write mode for metadata API. Specifically, an endpoint to update the fields in a sheet.
  2. When creating a record, send a parameter (eg create_fields=true), that if the new record has fields not in the sheet, those fields will be created.

This enables templates or importing data without having to manually set up the sheet structure. Eg - imagine an integration that lets someone import their CRM into a sheet. Currently, they'd need to manually create each column, then do the import.

Feature Request: filter/query by list of items

Some APIs support this way of querying a resource to return based on any matches in a given list:
posts?name[]=Karl&name[]=Noam

There is also posts?name=Karl,Noam.

It would be great to query by an array or comma-separated list. I imagine this can be done through a codelet right now, however, this would be tremendously useful!

Access last or first item, Pagination or Sheet info

Hi,

First of all - great product you guys are building - I'm certainly curious what I can get done with it.

I had a few questions regarding the API:

  • Is there a quick way of accessing the first and/or last item in a sheet?
  • How do I paginate, for example if I have a huge number of rows (as I expect to have over time)?
  • Is there a way I can query book info? (So that I can access, for example the number of items in each sheet)
  • Could I somehow list a subset of items in a sheet? e.g. filter

Thanks

Feature Request: Query by saved views

e.g. I have a sheet for "Mentors". Mentors can be either grouped by the organisation they belong to, their field of expertise, or the themes they're related to.

I can achieve this in the UI by grouping and sorting by a particular column or columns - it would be very nice to expose these same views over the API.

Feature request: Eager loading related rows

When pulling in a sheet that has linked sheets it would be pretty nice to be able to pass a flag to include the full data for the relations instead of just an ID. To get around this currently I have to pull down the "main" sheet and then loop over all items, calling the API for each relation ID.

Fetching image field and uploading to cloudinary fails

Hi @jasoncrawford
I have a use case where I use Fieldbook as backend UI and store. I pull content from a Book via API successfully (using axios) and sync into the website database. In my sheet I have an Image column. I need to upload the image from the sheet to Cloudinary.

As you'd see below, I pass image.url - url received in the sheet column - but it fails. I notice that when I paste the same url in browser, it goes through redirect with some kind of access attached to it. I am guessing this is to keep sheet content secure. How do I go about it? Any ideas will help.

Cloudinary.uploader.upload(image.url, Meteor.bindEnvironment(function(res) {
          if (!res.error) {
            Items.update({
              _id: foundItem._id
            }, {
              $push: {
                photos: res
              }
            });
            done({}, {
              success: true,
              message: image.name + ' uploaded successfully.'
            });
          } else {
            console.log(res.error);
            done({}, {
              success: false,
              message: image.name + ' failed to upload.'
            });
          }
        }));
      });

Metadata API: Access the sheet to which a field/column is linked

I would expect a field object to also contain a linkedSheet property (or something similar) which is the id of sheet this field is linked to, if fieldType=link.

I've updated the docs to illustrate what I want:

Getting field info

GET https://api.fieldbook.com/v1/sheets/:sheet_id/fields

Lists fields in a sheet. The response is an array of objects, each with:

  • key: permanent field id, unique only within a sheet
  • name: display name for the field
  • slug: field slug used in reading/writing records via the main API
  • fieldType: data, link or formula
  • inputType: data input type, if fieldType=data
  • linkedSheet: id of the sheet this field is linked to, if fieldType=link
  • required: boolean, may be omitted if false
  • enum: for pick list fields, this is the choice list in order

...

Example:

$ curl -u $KEY:$SECRET https://api.fieldbook.com/v1/sheets/58e1a67f5662a603001916ed/fields

Response (HTTP 200 OK):

[
  {
    "key": "f0",
    "name": "Name",
    "required": true,
    "slug": "name",
    "fieldType": "data",
    "inputType": "generic"
  },
  {
    "key": "f1",
    "name": "Description",
    "slug": "description",
    "fieldType": "data",
    "inputType": "text"
  },
  {
    "key": "f2",
    "name": "Price",
    "slug": "price",
    "fieldType": "data",
    "inputType": "currency"
  },
  {
    "key": "f3",
    "name": "Status",
    "slug": "status",
    "fieldType": "data",
    "inputType": "picklist",
    "enum": [
      "Available",
      "Out of stock",
      "Discontinued"
    ]
  },
  {
    "key": "f4",
    "name": "Line items",
    "slug": "line_items",
    "fieldType": "link",
    "linkedSheet":"58e1ac185662a6030019170e"
  }
]

Formula data in responses

There are a couple of mentions in the API docs about future support for returning formula data in responses:

The API doesn't yet support formulas. We'll serve up your data, but if you want to do calculations you'll have to do them yourself for now.

Any idea when this might be implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.