For example we have this power up Card Numbers by Reenhanced
It shows when I call /boards/{id}/boardPlugins and /boards/{id}/plugins
Is there any way to get the prefix that has been set for this power up?
Thanks
Ashley
@Ashley_AbellCan you go into more detail what you mean by prefix?
The card number that they are using is returned as the idShort in the API. For instance, using a public board, you can retrieve the field with the following call: https://api.trello.com/1/boards/ALJlJokP/cards/?limit=1&fields=idShort
idShort is what we're getting but we want the prefix from the powerup in the screenshot attached so we can put them both together like it shows on the card itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, yeah - I see!
It looks like they are storing that at the board-level in pluginData. You can get at this data with the following API request:
https://api.trello.com/1/boards/{idBoard}/pluginData/5af9c282a659e51fde5aef26
This works because the Card Numbers Power-Up's ID is: 5af9c282a659e51fde5aef26. When you make this request you will get a response similar to:
{
"id": "5af9c282a659e51fde5aef26",
"idPlugin": "59c3d177178a761767b49278",
"scope": "board",
"idModel": "586e8f681d4fe9b06a928307",
"value": "{\"prefix\":\"ohLookThePrefix\"}",
"access": "shared"
}
And you can see in the value key the prefix is there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I keep getting pluginData not found errors.
Below is the result from this request: /boards/{boardId}/boardPlugins
I've tried every combination of but still getting 404's. Anything you can do on your end to see if I've got the right details
array (size=2)
0 =>
object(stdClass)[408]
public 'id' => string '5aec6afde0e2cb5e58e3b283' (length=24)
public 'idBoard' => string '5aec47bb0623fa833993acf1' (length=24)
public 'idPlugin' => string '56d5e249a98895a9797bebb9' (length=24)
1 =>
object(stdClass)[407]
public 'id' => string '5aec6b0577b3ea8f3ed52a54' (length=24)
public 'idBoard' => string '5aec47bb0623fa833993acf1' (length=24)
public 'idPlugin' => string '59c3d177178a761767b49278' (length=24)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like I misspoke. You need to get all of the pluginData for the board first:
https://api.trello.com/1/boards/{idBoard}/pluginData/
This will return all of the pluginData that has been set on the board, including the data set by Card Numbers. You can parse through it to find the Card Numbers plugin ID (59c3d177178a761767b49278):
{
"id": "5af9c282a659e51fde5aef26",
"idPlugin": "59c3d177178a761767b49278",
"scope": "board",
"idModel": "586e8f681d4fe9b06a928307",
"value": "{\"prefix\":\"ohLookThePrefix\"}",
"access": "shared"
}
And then you can access that specific set of pluginData via the ID:
https://api.trello.com/1/boards/{idBoard}/pluginData/{id}
Using the example response from above, we'd use:
https://api.trello.com/1/boards/586e8f681d4fe9b06a928307/pluginData/5af9c282a659e51fde5aef26
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.