Giter VIP home page Giter VIP logo

api-docs's Introduction

Trello's Developer and API Documentation Site

๐Ÿ‘‹ Hey there,

Trello's documentation and developer site can be found at https://developer.atlassian.com/cloud/trello. There you can find info on building Power-Ups, using the REST API, and much more! ๐ŸŽ‰

We no longer use this repository to manage nor host the documentation. You can use the "Give docs feedback" button throughout the developer site to suggest edits to any pages.

โ‰๏ธ Need help? Head over to the Trello developer forum to ask a question out loud about the Trello API or Power-Ups platform.

Sign up for the Developer Newsletter โœ‰ to stay informed about the latest changes and announcements for developers.

Looking for something old? Here's the last commit prior to the docs moving.

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

Watchers

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

api-docs's Issues

trello adds 9.5 hours to due value

I create a new card with due field set. Card is created but when I open it in trello I see the due time/date is off by 9.5 hours. I tried creating card first and then putting the due value even then I am having the same issue. My timezone offset is 5 hr 30mins. So I don't think thats an issue here.

Any suggestions what might be happening ?

null mimeType after posting attachment to a card

Posting an uploaded file as an attachment to a card, does not return a mimeType.

A POST request with the file. Node code:

function postAttachment(cardId, file) {
    return new Promise(function (resolve, reject) {
        var formData = {
            file: {
                value: <fileBuffer>,
                options: {
                    filename: <filename.ext>,
                    contentType: <file.mimetype>
                }
            }
        };
        request.post({
                url: 'https://api.trello.com/1/cards/' + cardId + '/attachments?key=' + <TRELLO_API_KEY> + '&token=' + <Token>,
                formData: formData
            },
            function (err, httpResponse, body) {
                if (!err) {
                    resolve(body)
                } else {
                    reject(err)
                }
            });
    })
}

Expected result
Json data about attachment with all fields.

Actual result
Json data about attachment with all fields (id, bytes, previews, etc) but mimeType is null

PS: the tested attachment is a png file, mimeType is set correctly, and trello recognize it as image.

Icons in card detail badges

Hi, for our power-up, we'd like to be able to use an icon along with a card detail badge. For us, we hope that the icon will call attention to the badge and give the user more context for it.

Ideally the icon would be to the left of the text of the badge (below the label) similar to the checkbox on the due date badge.

Dragging & dropping a checklist item generates no actions, even on webhooks

Steps to reproduce:

  • Set up a webhook listener on a board.
  • Create a card with two checklists, add an item to one of the checklists.
  • Drag & drop the item between the checklists.

Result: no actions are received on the webhook. This is inconsistent with adding or removing the checklist item, and can cause applications to miss state changes (e.g. checklist complete / incomplete). No actions appear in the action history either.

Can we link to another trello card?

We'd like to be able to render links to other Trello cards in attachment sections and card detail badges. We can do it by specifying _target="parent, it works, but it opens a new browser tab for each click. We'd like to keep the user in the same tab. Is this possible?

By the way, is there a better place to ask questions than this?

idShort Can Change

Unlike the id and the shortLink, idShort value can change if the card is moved to another board.

Labels do not populate on webhooks requests

I created a card and it triggered a webhook into my POST endpoint, but in the webhook data i didn't see any label information, i have a custom label on the card, does it not work with custom label?

Subscribing to changes / events?

Hi all,

After perusing the docs, I'm not quite sure how we should subscribe to Trello updates to take actions (or if that's a recommended / welcomed practice).

For example, let's say that when a card is moved to a list or archived, I'd like to call t.set to update a piece of data. Is that currently possible? And if so, what is the recommended approach? It appears that render might be the key, as it receives every render message, but I'm not sure whether render is received upon every board change or not.

Thanks for clarifying. If the answer to this question ends up being useful to document, I'm happy to submit the subsequent information as a PR to the docs.

self.CustomEvent is not a constructor

Hi, we saw a slew of these today from one of our powerup users. Any idea what might cause it? He is on Chrome 56.0.2924. Thanks!

self.CustomEvent is not a constructor

The stack trace is as follows. I put a > at each line.

re@webpack:///./vendor/trello-power-up.js 1858:28

 } catch (e) {
   anyEventWorks = false;
 }
 }
 if (anyEventWorks) {
   fireDomEvent = function(type, detail) {
       var event;
       if (customEventWorks) {
>         event = new self.CustomEvent(type, {
           detail: detail,
           bubbles: false,
           cancelable: true
         });
       } else if (self.dispatchEvent) {
         event = document.createEvent("CustomEvent");
         event.initCustomEvent(type, false, true, detail);

Function.F.fireRejectionEvent@webpack:///./vendor/trello-power-up.js 1653:28

 } catch (e) {
   globalEventFired = true;
   async.throwLater(e);
 }
 
 var domEventFired = false;
 if (fireDomEvent) {
   try {
>     domEventFired = fireDomEvent(name.toLowerCase(), {
       reason: reason,
       promise: promise
     });
   } catch (e) {
     domEventFired = true;
     async.throwLater(e);
   }

F._notifyUnhandledRejection@webpack:///./vendor/trello-power-up.js 2058:22

 CapturedTrace.fireRejectionEvent("rejectionHandled",
   unhandledRejectionHandled, undefined, this);
 };
 
 Promise.prototype._notifyUnhandledRejection = function() {
   if (this._isRejectionUnhandled()) {
     var reason = this._getCarriedStackTrace() || this._settledValue;
     this._setUnhandledRejectionIsNotified();
>     CapturedTrace.fireRejectionEvent("unhandledRejection",
       possiblyUnhandledRejection, reason, this);
   }
 };
 
 Promise.prototype._setUnhandledRejectionIsNotified = function() {
   this._bitField = this._bitField | 524288;
 };

F._drainQueue@webpack:///./vendor/trello-power-up.js 1129:11

 while (queue.length() > 0) {
   var fn = queue.shift();
   if (typeof fn !== "function") {
     fn._settlePromises();
     continue;
   }
   var receiver = queue.shift();
   var arg = queue.shift();
>   fn.call(receiver, arg);
 }
 };
 
 Async.prototype._drainQueues = function() {
     this._drainQueue(this._normalQueue);
     this._reset();
     this._drainQueue(this._lateQueue);

F._drainQueues@webpack:///./vendor/trello-power-up.js 1136:9

 var arg = queue.shift();
 fn.call(receiver, arg);
 }
 };
 
 Async.prototype._drainQueues = function() {
   this._drainQueue(this._normalQueue);
   this._reset();
>   this._drainQueue(this._lateQueue);
 };
 
 Async.prototype._queueTick = function() {
     if (!this._isTickUsed) {
       this._isTickUsed = true;
       this._schedule(this.drainQueues);
     }

F.drainQueues@webpack:///./vendor/trello-power-up.js 1017:5

function Async() {
  this._isTickUsed = false;
  this._lateQueue = new Queue(16);
  this._normalQueue = new Queue(16);
  this._trampolineEnabled = true;
  var self = this;
  this.drainQueues = function() {
    self._drainQueues();
>  };
  this._schedule =
    schedule.isStatic ? schedule(this.drainQueues) : schedule;
}

Unclear Checklists Actions

Unable to list actions with type 'updateCheckItem'

Changing the name of a checklistItem will trigger a webhook on the board and will POST an action of type updateCheckItem with the old and new name. However, no /actions/ resources ever return action types of updateCheckItem: /cards/idCard/actions/, /boards/idBoard/actions/. However you can get that specific action instance: /actions/idAction/.

Need to document this behavior and other ignored action types.

CORS Problems w/ Power-Ups

There is no documentation around the fact that you need to change CORS settings to allow trello.com to access the manifest:

It looks like your Power-Up can't be loaded because the CORS settings on your server. Because the request for this file is coming from trello.com, your server will need to allow for cross-origin requests from our domain.

Hosting it on Github pages works because they allow cross-site requests: http://stackoverflow.com/questions/26416727/cross-origin-resource-sharing-on-github-pages

If you're not sure how to change CORS settings, I'm happy to help you figure it out - just let me know what type of server you're running. The gomix example shows how to set CORS in the server.js file: https://gomix.com/#!/project/rune-friend

Most programming languages have a package that helps you configure CORS.
Programming Language / Framework - CORS Package
Python/Flask - https://flask-cors.readthedocs.io/en/latest/
Javascript/Express - https://github.com/expressjs/cors
ASP.net - https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api

I need to know the members' webhooks.

I have several webhooks that the idModel is my idMember. And I need to know all the webhooks created. If I search for my token, it didn't retrieve all of them.

idLabels not being pulled on card creation

When applying labels objectid during a card creation, the value gets sent through jsonobj but is not applied to newly created cards on Trello.

Does the card need to be created prior to applying a label?

Document New Power-Ups API Features

We've started building new features for the Power-Ups API. Once they go live we'll update the docs. Rough API outlines look like:

t.navigate({ url: 'https://trello.com/c/abc123' }) - Generic navigation to any url that can be handled by the Trello web client. Only trello.com URLs will be allowed.

t.showCard('abc123') - Bring up the card details (card back) for an open card on the current board by id (or idShort).

Webhooks Timeout and Retry

Info on the webhooks walkthrough that should be added to the docs.

In particular:
If for some reason the connection is disrupted, or unavailable, the webhook will retry 3 times before stopping.

Additionally, webhook POSTs only wait 30 seconds for a response before considering the request to have not succeeded.

Access the root board (Team board) with API

Hi

When you setup an account you get personal board. You can create a team board to collaborate with members in your team. Using the API I need to create a boards within the team board, what is the API endpoint to do it. In the attached screenshot, I need to create a board within the ABC Firm.

trelloboard

BUG? Webhooks being created in duplicate, triplicate without being able to remove with OAUTH.

There seems to be no way to get a comprehensive list of Webhooks from the Trello API, if a user has logged multiple times with OAUTH (having multiple tokens).

There is a Trello edge case, that authenticating with oauth on different occasions will create different tokens. If the same webhook is attached to different tokens, it will become duplicated. So, there is no way to delete duplicated tokens, if they are not searchable in the Trello API.

Calling 'https://api.trello.com/1/tokens/'+ oauth.token + '/webhooks' will only return the webhooks on that token.

When authenticated calling https://api.trello.com/1/members/me/tokens/webhooks=true, always returns unauthorized member permission requested.

In that case, how can we retrieve the list of webhooks that this user created (using OAUTH)? For example. I user may have multiple OAUTH tokens with webhooks attached to it.

Extend card data in deleteCard Board action

When creating an activity log in a client application that utilizes the Trello API, it would be great if the name of the card that was just deleted were included in the data passed back with the deleteCard action. That would allow my client application to create a more informative activity log, instead of just showing "card [number] was deleted". I don't know how your event API is built, so it might be a real hassle to implement this, but if the event is created simultaneously when the card is deleted, then it seems like you could use the name of the card when creating the action prior to losing the data when the card is deleted.

How do I make a badge that can come into or leave existence?

At the moment, it seems that there is a way to allow a badge to update, but there doesn't appear to be a way to specify that a card may eventually have a badge but does not yet.

One can return {refresh: 10} from a dynamic: callback, but that still renders an empty badge.

Our use case is that badges can appear due to external changes (it so happens that those changes are in other cards, but it seems like it'd be nice to be able make a badge appear or disappear based on anything).

In other words, we'd like it if the card-badges function was polled at an interval rather than only dynamic badges being polled. At the moment, we're working around this by forcing a refresh with t.set every 10 seconds (along with some locking to ensure we don't call that while one of our power-up iframes is open). It's a gross hack, but it seems to be the only way we can get it to work.

Closed not updated

@bentleycook Hello, when a card is updated in trello.com and archived, the api returns closed=false instead of closed=true. Example: Card #58b7fb5a6d401bd837658551 is closed=true in trello.com but closed=false in api

Trello client library local storage dependency

If a user has local storage disabled, they get errors and are forced to re-authorize every time they load the app. It would be good if there was a fallback strategy, maybe to cookies. At the least, it seems like local storage access should be wrapped in a try / catch.

How to encode attachments for use via Trello web API

The file parameter documentation for the POST /1/cards/[card id or shortlink]/attachments API call does not specify how the file should be encoded. For "Valid Values" it simply says "A file". I was wondering if anyone has a working example of how to get files into Trello cards using the API.

The card is created but attachment is empty.

I tried everything, here is my code :

var data = {file: "C://Users/User/Downloads/monfichier.docx",
name: "name"};

	Trello.post('/cards/'+idCard+'/attachments', data, success, error);

The authentication example doesn't work... sometimes

We have a user who has some security setting somewhere in Chrome checked that prevents accessing window.opener.authorize as recommended here: https://developers.trello.com/power-ups/topics#authentication

We've worked around it like this:

let authorize

try {
  if (window.opener && typeof window.opener.authorize === 'function') {
    authorize = window.opener.authorize
  }
} catch (e) {
  // Security settings are preventing this, fall back to local storage.
}

if (authorize) {
  authorize(token)
} else {
  localStorage.setItem('token', token)
}

Of course, now we rely on localStorage being present, but what are the odds of both of those failing?!?!? ๐Ÿ™ƒ

card-detail-badges with callback

Hi,

It doesn't seem to be documented, but it does seem that you can use callbacks with card-detail-badges. This is great as we're using the new t.showCard api. Unfortunately, I can't figure out how to preventDefault to prevent the link from being clicked when the user clicks on the badge. Any ideas?

Thanks!

[enhancement] user email from google login?

I noticed that getting the email for the current user (/1/members/me) can be null.
I'm assuming in that case, that the user signed up with googe (correct me if i'm wrong)
But wouldn't it make sense to have the email saved after the oauth login?

Action event for list to board doesn't seem to fire?

I see that there's an action for moveListToBoard under Card Actions, but it doesn't seem to actually fire when a list is moved to another board. I tried looking for anything under the results of /actions?filter=all, but there doesn't appear to be anything for that either. When a card is moved to another list individually, it works fine with a moveCardToList and the new board/list ID, just doesn't seem to be firing with the movement of a whole list.

Thanks!

Authentication without browser

Hi there,

Is there a way of authenticating users with out making them click the button on the pop up? Like if we keep the username and password, can we do a callout to authenticate and create-edit a card without using any browser?

Unclear Power-Ups Documentation Topics

Things to Document:

  • "Remove Personal Settings" button only appears when there is private data stored.
  • Further explain how authorization-status and show-authorization play together and what buttons/UI/UX come with the capabilities.

power-up callback when a card-badge is clicked by a user

I am developing a power-up and would like to take an action when the user clicks on my power-ups card badge. Right now card badges only support a callback for periodic updating. Is there any way to do this with the current API. If not can this be added to the power-up API. It seems awkward for users to have to dig down into card back to take a simple action.

t.authorize() only resolves on Allow

t.authorize() doesn't complete the promise unless the user clicks 'Allow' which leaves a dangling promise.

It would be nice if the Promise would be rejected if the user clicks 'Deny' or closes the popup.

Labels Limited to 50

It appears that listing all of the labels on a board is limited to returning only 50. This affects the JSON export tool too.

Allow sending data uris for badge icons

At the moment, Trello appends ?color=fff or the like to the url we return for badges so that we know what color badge to render. We'd like to be able to render data uris that we generate on the client instead of having to generate them on a server and the query string addition prevents this.

It'd be great if we could return a function that took color as a parameter and returned a data-uri as a response. It'd probably need to call it for both possible colors given the iframe boundary. Alternatively, Trello could just detect that we sent a data-uri and not append the query string, but that would prevent us from being able to vary our badge color (which we do).

Thanks!

Can we self-host the power-up client library?

The power-up client library returns cache headers that disallow caching. This means that every time a user opens a popup for our powerup they have to refetch this file, which takes time. Is there any harm in us hosting this file or bundling it and managing the caching ourselves?

`billableMemberCount` is null for non-admins

It seems that billableMemberCount from /organizations/{id}/billableMemberCount is null for non-admins. It seems we can still get the billableMemberCount just by querying /organizations/{id}/memberships?filter=active and counting them, so there's an inconsistency here. It'd be nice if we could just access billableMemberCount. Thanks!

Is it possible to subscribe to cards via the api?

Hi there,

I'm looking to subscribe users to cards via the api. I have the python api pretty well set and currently I'm only using my user token, but I could get other users tokens. I have the ability to read the state of the card and I can clearly see the badges field "subscribed" status.

card = trello.cards.get(id)
print card["badges"]

According to the api docs the subscribed field is a true or false read only. Perhaps I'm going about it the wrong way but I don't see an obvious subscribe to card action in the api.

Thanks!
-Gates

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.