Pod
Pod

Reputation: 1

api access to cloud drives attachment (url)

Can we get attachment URL trough podio API if we use a cloud drive ex: onedrive or dropbox?

Unfortunately offical export function doesn't containt that URLs.

Can we reach this data through API?

thank you

Upvotes: 0

Views: 63

Answers (1)

Brandon Tweed
Brandon Tweed

Reputation: 348

You can get a URL for a Dropbox file, although it is a shortened URL. Here's how I did it:

I attached a Dropbox file to an item. First, I looked up the ID of the associated item (https://developers.podio.com/doc/items/get-item-22360) and used the API to retrieve the item's details. Within the response JSON you will find a list of files that looks something like this (some details shown below are redacted to protect the innocent):

"files": [
{
  "mimetype": "application/pdf",
  "perma_link": null,
  "hosted_by": "dropbox",
  "replaces": [

  ],
  "description": null,
  "hosted_by_humanized_name": "Dropbox",
  "presence": null,
  "created_via": {
    "url": null,
    "auth_client_id": 1,
    "display": false,
    "name": "Podio",
    "id": 1
  },
  "created_by": {
    "user_id": REDACTED,
    "name": "REDACTED",
    "url": "https://podio.com/users/REDACTED",
    "type": "user",
    "image": {
      "hosted_by": "podio",
      "hosted_by_humanized_name": "Podio",
      "thumbnail_link": "REDACTED",
      "link": "REDACTED",
      "file_id": REDACTED,
      "external_file_id": null,
      "link_target": "_blank"
    },
    "avatar_type": "file",
    "avatar": REDACTED,
    "id": REDACTED,
    "avatar_id": REDACTED,
    "last_seen_on": "2016-10-31 20:56:58"
  },
  "thumbnail_link": null,
  "created_on": "2016-10-31 20:59:41",
  "link": "https://db.tt/N3sW8SwL",
  "file_id": REDACTED,
  "rights": [
    "view",
    "download",
    "delete",
    "update"
  ],
  "push": null,
  "external_file_id": "/Get Started with Dropbox.pdf",
  "link_target": "_blank",
  "size": null,
  "name": "Get Started with Dropbox.pdf"
}
]

I believe the field you are looking for is "link," but it appears to contain a shortened URL instead of the full-length URL.

Upvotes: 2

Related Questions