This service allows to retrieve the list of recently uploaded files.

The scope of the attachments being checked can be specified with the scope param:

  • The value company will look for attachments uploaded by the token’s owner company. This option is only authorized for Company admins/product_owner.

  • The value user (default) will look for attachments directly uploaded by the token’s owner

Information on what the file has been uploaded to can be found in the uploaded_to key of the response.

The current version of the file can be found at the top level of the array, however, all other versions are available in the key versions.

The default time delta in days is 3 days but can be customized to any integer value up to 100 days.

See the example below to see the available data.

Examples

{
  "resource": {
    "type": "attachments",
    "action": "recent"
  },
  "attachments": [
    {
      "id": 686,
      "source_id": null,
      "name": "Example_File.ext",
      "filename": "Example_File.ext",
      "url": <url to download the file from>,
      "size": "1255",
      "created_at": "2014-05-14T02:03:20.000Z",
      "updated_at": "2014-05-14T02:03:20.000Z",
      "updatable": true,
      "px40": "",
      "px75": "",
      "px150": "",
      "nc1000": "",
      "mime_type": "test/csv",
      "versions": [
        {
          "id": 719,
          "filename": "Import_exemple__3.csv",
          "size": "1255",
          "mime_type": "test/csv",
          "url": <url to download the file from>,
          "created_at": "2014-05-14T02:03:20.000Z",
          "px40": "",
          "px75": "",
          "px150": "",
          "nc1000": "",
          "owner": {
            "id": 62,
            "first_name": "Guillaume",
            "last_name": "Grenet",
            "full_name": "Guillaume Grenet",
            "initials": "GG",
            "email": "guillaume.grenet@winddle.com",
            "created_at": "2013-07-23T01:17:34.000Z",
            "updated_at": "2014-05-14T02:02:47.000Z",
            "px40": null,
            "px150": null,
            "company": "Winddle"
          }
        }
      ],
      "owner": {
        "id": 62,
        "first_name": "Guillaume",
        "last_name": "Grenet",
        "full_name": "Guillaume Grenet",
        "initials": "GG",
        "email": "guillaume.grenet@winddle.com",
        "created_at": "2013-07-23T01:17:34.000Z",
        "updated_at": "2014-05-14T02:02:47.000Z",
        "px40": null,
        "px150": null,
        "company": "Winddle"
      },
      "uploaded_to": {
        "type": "LineItem",
        "id": 3188,
        "source_id": null,
        "reference": null
      }
    }
  ]
}

Params

Param name Description
delta_days
optional

List updated attachments in past X delta days (default to 3)

Must be a Integer
delta_hours
optional

Overwrite delta_days, allow to set the delta in hours (default to 72)

Must be a Integer
since
optional

Timestamp for filtering updated attachments (RFC2616, RFC2822, ISO8601)

Must be a String
scope
optional

Scope of the project lines to check (default to user)

Must be one of: user, company.