---
title: Read
slug: LO0--read
docTags: 
createdAt: 2022-01-05T08:13:03.000Z
---

Link Enterprise provides a web service endpoint that will allow you to retrieve a file or folders metadata or binary content of a file.

Included below are examples of reading a files metadata and it's binary content. (Two separate calls)

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/read",
  "name": "Read (metadata)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the sharepoint system configured in Link Enterprise ."
      },
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Unique id of sharepoint file or folder."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"sp\" to let Link Enterprise know which configured content system to search."
      },
      {
        "kind": "optional",
        "name": "getContent",
        "type": "Boolean",
        "description": "true/false (will retrieve binary of file)"
      },
      {
        "name": "repo",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint repository Id. It consists of sharepoint domain name and root site name separated with \"/sites/\" or \":/teams/\"",
        "children": []
      },
      {
        "name": "location",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint Document Library location (including any sub site present). Each field is separated with \"/\".",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "ymgovs5m1fdI32-gkqqCH",
        "code": "{\n\t\"ContentElements\": \"demo1.txt#DFLOW#text/plain#DFLOW#2111\",\n\t\"comment_count\": \"0\",\n\t\"companyCode\": \"\",\n\t\"content_created_at\": \"10/12/2021 12:48:52 p.m. PDT\",\n\t\"content_modified_at\": \"10/12/2021 12:48:52 p.m. PDT\",\n\t\"created_at\": \"12/20/2021 07:29:31 a.m. PST\",\n\t\"created_by\": \"Bhavani Singetam\",\n\t\"description\": \"\",\n\t\"LinkEnterpriseSaplinkEnabled\": \"\",\n\t\"LinkEnterpriseTimestamp\": \"\",\n\t\"LinkEnterpriseUsername\": \"\",\n\t\"LinkEnterprisetaskid\": \"15103846926\",\n\t\"LinkEnterprisetaskstatus\": \"in-process\",\n\t\"LinkEnterpriseworkflowid\": \"\",\n\t\"embed1\": \"https://gimmal-box.app.box.com/preview/expiring_embed/gvoct6FE!hc4EhSwuz8Zl-y-Sf8ObT25vPUi0lkTN3P_G1lELtgvcTHI4XYWYP-XZhZWcK5z5CI4u9e7c3_RoAfYB20tZMuFl0x2V7fSwClu8AhnPutLbNP1FtCxFafNsqjCtAHvpS_se8df5J8GEz9i-tcBi4b1opVcVAGLMDiZ4KX2GroXLuGTzx4aMT80hFSHoR-NCXUOkX-ybyMNUp78Tsk8L3Ka1O3mji4NA1uUuA7UPluNXgai7tpzUd-ZNvnLJdAXlrxhYftkAIDGEKAhq4CEFk4nyQ7gvU_WueSQiyHzSbwAY8VofPHTPcyrR8S7Mr7Bm-51RkzeL6SHhgIDkP-GeFLI3aHbpVKRlK5jKx74E9mJ8jbp3ll6W-9sFaKJj_UQgfcxObiNS-uT2ens9z8HzNxdLY4G-XuEzY3zFyDUdGzDKWIF8kUrC-UUMnJbE8ZjJx_Ae4Hv8kygHHJAmaU3SbHUekHLNMssnAp_jkPXg2zJupr-hjimdAldrxYV6owh-ak3op7a22qzUqmsGad7sDjsPDTm5NxP7Ea87N-T6Rrqirgrg9sxUjc1jeVCueysT-xL6ekW70oh_WM2ZFJNnf_qSDWisSyrtMGFSSNUAxySNwMZA-YRBgaKHwBHp3C942PvhLyFtxtCZ3tLA1n1acf9ow3RKmgEoV65hih6Tlaq2gfdy6wbgIRfwsKYmrP2xH67YMibfKn22xI0Isgw49Vo1VvDLFqsJ5OCUcsucG-ouuB3j4kAcwvoQa-rWdLL-Tym-04Xzp4ZmzAXZIZ0AQSfS-ifcqGPoXuL79WMYN7QAc9RgALvtq6qmkMvHaHKAbPI4G0Mnkisyiy-1xYKiAUQZlsJ4UXVhtc6qK3w78rmO8b7xVyE2lLDTQVg0McmrWk9csdNNGjVZS9vQ5Wj6SFcVFw1rw3r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V65hih6Tlaq2gfdy6wbgIRfwsKYmrP2xH67YMibfKn22xI0Isgw49Vo1VvDLFqJ5OCUcsucG-ouuB3j4kAcwvoQa-rWdLL-Tym-04Xzp4ZmzAXZIZ0AQSfS-ifcqGPoXuL79WMYN7QAc9RgALvtq6qmkMvHaHKAbPI4G0Mnkisyiy-1xYKiAUQZlsJ4UXVhtc6qK3w78rmO8b7xVyE2lLDTQVg0McmrWk9csdNNGjVZS9vQ5Wj6SFcVFw1rw3r6r0epOH-ryN8FRy2BU4b-rV1qX1_UO1Kne34qBnDfTAL8DoHZoq7qssnDf9P-aznmofY-lZNz0Bk8oek5Qcgf_NChMzkPyNgAT6_RSgwhMNgGh7hUuNMNOdak5_xs-bZANve68DtQWwBqwwG6kGydnZcu8Upg7JczEuwIhVO8O-5YZvMt6rq7_fFnnFeyOLx41cjNQZ3MmnK6IBw18FQhhEKU2r_pMoy4ft6-NF0D48Elhc2WxD1PIy9q6ZL4qhNHFdIMSK-tbWR0cD9lanR6GFh9h2Gghs7AWFq-K126TEgY5jD2NC\",\n\t\"extension\": \"txt\",\n\t\"fileVersion\": \"967518965567\",\n\t\"file_version\": \"967518965567\",\n\t\"has_collaborations\": \"true\",\n\t\"id\": \"897859484481\",\n\t\"is_package\": \"false\",\n\t\"item_status\": \"active\",\n\t\"lastUpdated\": \"1640195853\",\n\t\"linkedToSap\": \"\",\n\t\"lock\": \"\",\n\t\"modified_at\": \"12/22/2021 09:57:30 a.m. PST\",\n\t\"modified_by\": \"someone\",\n\t\"name\": \"demo1.txt\",\n\t\"owned_by\": \"Link Enterprise Demo\",\n\t\"parent\": \"1474026705828\",\n\t\"path_collection\": \"/test\",\n\t\"paymentTerm\": \"\",\n\t\"permissions\": \"can_download:true,can_preview:true,can_upload:true,can_comment:true,can_rename:true,can_delete:true,can_share:true,can_set_share_access:true\",\n\t\"poNumber\": \"5900\",\n\t\"poStatus\": \"\",\n\t\"purged_at\": \"\",\n\t\"sequence_id\": \"1\",\n\t\"sha1\": \"013efd1020dea4fcdc4f9118433acc8ded3bf895\",\n\t\"shared_link\": \"\",\n\t\"size\": \"2111\",\n\t\"tags\": \"\",\n\t\"trashed_at\": \"\",\n\t\"type\": \"file\",\n\t\"vendorName\": \"\",\n\t\"vendorNumber\": \"\",\n\t\"version_number\": \"2\"\n}",
        "language": "200"
      },
      {
        "id": "guaZg_Kjaci06qaXI6hoD",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "ymgovs5m1fdI32-gkqqCH"
  },
  "examples": {
    "languages": [
      {
        "id": "yA6PAHJgLMNa-NjR8XpmC",
        "code": "{\n   \"cmsName\":\"insertProductionSystemName (located in Link Enterprise gui)\",\n   \"id\":\"unique sharepoint id specfic to folder/id\",\n   \"location\":\"/<subsite>/<documentLibraray>\",\n   \"repo\":\"<domainName>/sites/<siteName>\",\n   \"getContent\":false,\n\t\"selectedCMS\":\"sp\"\n\t\n}\n",
        "language": "json"
      }
    ],
    "selectedLanguageId": "yA6PAHJgLMNa-NjR8XpmC"
  },
  "description": "Retrieve a file or folders metadata by using sharepoint unique one drive Id.",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "read-metadata",
  "legacyHash": "RTkIuAhig8f9DkChR6cM4"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/read",
  "name": "Read (Binary content)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the sharepoint system configured in Link Enterprise."
      },
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Unique id of sharepoint file or folder."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"sp\" to let Link Enterprise know which configured content system to search."
      },
      {
        "name": "repo",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint repository Id. It consists of sharepoint domain name and root site name.",
        "children": []
      },
      {
        "name": "location",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint Document Library location (including any sub site present). Each field is separated with \"/\".",
        "children": []
      },
      {
        "name": "tmpDirectory",
        "kind": "optional",
        "type": "string",
        "description": "temporary directory where the retrieved the document is stored.",
        "children": []
      },
      {
        "name": "getContent",
        "kind": "required",
        "type": "string",
        "description": "true/false (will retrieve binary of file)",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "qsuZNFPgIsSVantMQCRHv",
        "code": "...binary",
        "language": "200"
      },
      {
        "id": "PKMksZm--cuDmKfft4kGf",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "qsuZNFPgIsSVantMQCRHv"
  },
  "examples": {
    "languages": [
      {
        "id": "x1biY5DVAqDpMMm0qvQhO",
        "code": "{\n   \"cmsName\":\"insertProductionSystemName (located in Link Enterprise gui)\",\n   \"id\":\"unique sharepoint id specfic to folder/id\",\n   \"location\":\"/<subsite>/<documentLibraray>\",\n   \"repo\":\"<domainName>/sites/<siteName>\",\n   \"getContent\":true,\n\t\"selectedCMS\":\"sp\"\n\t\"tmpDirectory\":\"C:\\\\middleware\\\\tmp\"\n}",
        "language": "json"
      },
      {
        "id": "q4sc9OgyJFxO60XBl5eYN",
        "code": "< HTTP/1.1 200 OK\r\n< filename: demo1.txt\r\n< size: 2111\r\n< transfer-encoding: chunked",
        "language": "none",
        "customLabel": "Headers Response (200)"
      }
    ],
    "selectedLanguageId": "x1biY5DVAqDpMMm0qvQhO"
  },
  "description": "Retrieve a files binary by using sharepoint one drive Id.",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "read-binary-content",
  "legacyHash": "1qlCNhBogYf8ukTiGmKWL"
}
```
:::



