AnsweredAssumed Answered

REST Document endpoint not returning all fields?

Question asked by Mario Pham on Jul 19, 2016
Latest reply on Jul 20, 2016 by Matt Marum

Hello all,

 

I have encountered an issue with the documents REST endpoint and I would like to check with you guys.

The REST endpoint for Documents does not return any data for columns

"filename": "",

"file_mime_type": "",

 

Which should be returned as the filename is a mandatory field. Can you please clarify if there was a change from Sugar side or it is a bug. The current version of SugarCRM I am using is 7.7

 

Below is an example of the whole REST json result for one of the document records.

 

{

    "id": "8947006b-f5b2-2d74-a30a-578d81ab4f40",

"name": "Test document name",

"date_entered": "2016-07-19T08:24:40+07:00",

"date_modified": "2016-07-19T08:24:40+07:00",

"modified_user_id": "1",

"modified_by_name": "Mario Pham",

"modified_user_link": {

"full_name": "Mario Pham",

"id": "1",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"created_by": "1",

"created_by_name": "Mario Pham",

"created_by_link": {

"full_name": "Mario Pham",

"id": "1",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"description": "test document",

"deleted": false,

"document_name": "Test document name",

"doc_id": "",

    "doc_type": "Sugar",

"doc_url": "",

    "filename": "",

    "file_mime_type": "",

"active_date": "2016-07-19",

"exp_date": "",

"category_id": "",

"subcategory_id": "",

"status_id": "Active",

"status": "",

    "document_revision_id": "e7160d4a-539f-9cdd-45d0-578d81b16dd5",

    "revision": "",

"last_rev_created_name": "",

"last_rev_mime_type": "",

"latest_revision": "",

"last_rev_create_date": "2016-07-19T08:24:00+07:00",

"latest_document_revision_link": {

"date_entered": "2016-07-19T08:24:00+07:00",

"id": "e7160d4a-539f-9cdd-45d0-578d81b16dd5"

    },

"related_doc_id": "",

"related_doc_name": "",

"related_docs": {

"document_name": "",

"id": "",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"related_doc_rev_id": "",

"related_doc_rev_number": "1",

"revisions": {

"revision": "1",

"id": "",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"is_template": false,

"template_type": "",

"latest_revision_name": "",

"selected_revision_name": "",

"contract_status": "",

"contract_name": "",

"linked_id": "",

    "selected_revision_id": "",

"latest_revision_id": "",

"selected_revision_filename": "",

"following": false,

"my_favorite": false,

"assigned_user_id": "1",

"assigned_user_name": "Mario Pham",

"assigned_user_link": {

"full_name": "Mario Pham",

"id": "1",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"team_count": "",

"team_count_link": {

"team_count": "",

"id": "1",

"_acl": {

"fields": [],

"_hash": "654d337e0e912edaa00dbb0fb3dc3c17"

      }

    },

"team_name": [

      {

"id": "1",

"name": "Global",

"name_2": "",

"primary": true

      }

    ],

"_acl": {

"fields": {}

    },

"_module": "Documents"

  },

 

Outcomes