
The Beta release of our documentation is available at:
http://developer.mavenlink.com/beta/
User File Associations in Mavenlink act as a join object between Users, Workspaces, and Attachments / Google Documents.
To fetch a paginated set of User File Associations for the requesting user, make a GET request as follows:
curl "https://api.mavenlink.com/api/v1/user_file_associations.json"
The resulting JSON will contain the User File Association data in the user_file_associations
key at the root of the response.
These results will be referenced in the results
array, sorted by creation date. Each object will have the following fields:
id
- the internal user file association idpost_id
- the Mavenlink Post ID that the Attachment or Google Document is associated withworkspace_id
- the Workspace ID for the PostYou can include User File Associations' associations with the include
param. For example, to include the Workspace,
Post, and associated Attachment or Google Document, request the following:
curl "https://api.mavenlink.com/api/v1/user_file_associations.json?include=post,workspace,asset_object"
In this example, our API will ensure that the returned JSON contains top-level keys called posts
, workspaces
, and one or both of
attachments
and google_documents
, depending on what polymorphic assets were referenced. See Object Associations
to learn more about how the Mavenlink API handles associations. The following associations can be requested on this endpoint:
post
- When included, the post_id
will reference the Post for which the User File Association belongs.workspace
- When included, the workspace_id
will reference the Workspace for which the User File Association belongs.asset_object
- When included, the polymorphic asset_object_ref
struct will reference the Attachment or Google Document for
which the User File Association belongs. This will be a a two-key JSON object with "id" and "key", where the "key" will be "attachments" or "google_documents".