GetFile - 获取文件详情

更新时间: 2023-08-30 17:40:10

获取文件详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST /v2/file/get

请求参数

名称类型必填描述示例值
bodyobject

请求体参数。

share_idstring

分享id。 如果通过分享操作文件,请携带x-share-token header鉴权并传递此字段,此时drive_id无效。否则请使用aksk或者access_token方式鉴权,并传递drive_id字段。 share_iddrive_id两者必须有一个字段赋值。

7JQX1FswpQ8
drive_idstring

空间 id

1
file_idstring

文件 id

9520943DC264
url_expire_secinteger

过期时间,单位为秒,取值范围为:[10,14400] 秒

100
fieldsstring

筛选返回字段:

  1. 当填 * 时,返回文件所有字段(必须进行设置的除外);
  2. 当只需要特定字段时,可设置为:url、thumbnail、exif、cropping_suggestion、characteristic_hash、video_metadata、video_preview_metadata,当需要多个字段时,以逗号 , 分割,如 url,thumbnail;
  3. 当需要时必须进行设置才会返回的字段:investigation_info

默认返回所有字段(必须进行设置的除外)

*

返回参数

名称类型描述示例值
File

Schema of Response

示例

正常返回示例

JSON格式

{
  "domain_id": "",
  "drive_id": "",
  "file_id": "",
  "name": "",
  "type": "",
  "content_type": "",
  "created_at": "",
  "updated_at": "",
  "description": "",
  "trashed_at": "",
  "file_extension": "",
  "mime_type": "",
  "mime_extension": "",
  "hidden": true,
  "size": 0,
  "starred": true,
  "status": "",
  "user_meta": "",
  "labels": [
    ""
  ],
  "upload_id": "",
  "parent_file_id": "",
  "crc64_hash": "",
  "content_hash": "",
  "content_hash_name": "",
  "download_url": "",
  "thumbnail": "",
  "category": "",
  "local_created_at": "",
  "local_modified_at": "",
  "revision_id": "",
  "investigation_info": {
    "status": 0,
    "suggestion": ""
  },
  "thumbnail_urls": {
    "key": ""
  },
  "image_media_metadata": {
    "time": "2006-01-02T15:04:05.000Z07:00",
    "width": 1920,
    "height": 1080,
    "location": "30.185453,120.218522",
    "country": "中国",
    "province": "浙江省",
    "city": "杭州市",
    "district": "滨江区",
    "township": "西兴街道",
    "address_line": "浙江省杭州市滨江区西兴街道江陵路",
    "image_tags": [
      {
        "confidence": 0.98,
        "parent_name": "运动",
        "name": "篮球",
        "tag_level": 3,
        "source": "一起打篮球",
        "centric_score": 0.877
      }
    ],
    "faces": "[{\"FaceId\":\"a9a66a86-73dd-4c95-8b79-1d8a49db5226\",\"GroupId\":\"Cluster-e3b7fb52-22b3-44f2-9746-8c1804bd6af0\",\"FaceConfidence\":0.999,\"Age\":13,\"AgeConfidence\":4,\"Gender\":\"female\",\"GenderConfidence\":1,\"Emotion\":\"none\",\"EmotionConfidence\":0.672,\"FaceAttributes\":{\"Mask\":\"none\",\"MaskConfidence\":0.894,\"Beard\":\"none\",\"BeardConfidence\":0.997,\"Glasses\":\"none\",\"GlassesConfidence\":0.999,\"Mouth\":\"close\",\"MouthConfidence\":0.937,\"Hat\":\"none\",\"HatConfidence\":0.998,\"HeadPose\":{\"Pitch\":10.684,\"Roll\":-10.707,\"Yaw\":-20.094},\"FaceBoundary\":{\"Width\":457,\"Height\":687,\"Top\":1324,\"Left\":1356}}}]",
    "faces_thumbnail": [
      {
        "face_id": "a9a66a86-73dd-4c95-8b79-1d8a49db5226",
        "face_group_id": "Cluster-e3b7fb52-22b3-44f2-9746-8c1804bd6af0",
        "face_thumbnail": "https://pds-domain.region.aliyuncs.com/QieGeH98%2F1001%2F63e5e551ee621482ab934a0687c6cda75fc07864%2F642a8a40c00f1ad379df421694713ee65170f09b?security-token=CAIS%2BgF1q6Ft5B2yfSjIr5bjHPCNnrdR8aSaSW7woVlmVd1Bt5HorDz2IHpPfHdoBe0btvU%2BlWxX6fwZlq5rR4QAXlDfNSyFeX20qFHPWZHInuDox55m4cTXNAr%2BIhr%2F29CoEIedZdjBe%2FCrRknZnytou9XTfimjWFrXWv%2Fgy%2BQQDLItUxK%2FcCBNCfpPOwJms7V6D3bKMuu3OROY6Qi5TmgQ41En1DIlt%2FXuk5DCtkqB12eXkLFF%2B97DRbG%2FdNRpMZtFVNO44fd7bKKp0lQLsUMSqv8q0fEcqGaW4o7CWQJLnzyCMvvJ9OVDFyN0aKEnH7J%2Bq%2FzxhTPrMnpkSlacGoABPMvZ8rSESUEP96Vbf%2Bk0JRg9Qb1MnaIJqWAgo8K6K0UP1CtqL2zrUtugpKKDHOYiKbq2O0S5yLUPVX5vBHqEi%2FFc7i6ZnHCMcXLJs4rKDKwRBEhovUXXlklq2q43OSVtLrXkBy9Xs1ers%2FhJhcxpNA0Vl3EWfJxa2BTylEdnLOQ%3D&x-oss-access-key-id=STS.NUVWJ9shpFfqKHAEY3YRmXTCN&x-oss-expires=1686455451&x-oss-process=image%2Fcrop%2Cx_1128%2Cy_1211%2Cw_914%2Ch_914%2Fformat%2Cjpg&x-oss-signature=jmhOz91Tww1ciMEwadDiioU7d93FDiBNr8s8mHyMqW0%3D&x-oss-signature-version=OSS2"
      }
    ],
    "exif": "{\"Compression\":{\"value\":\"6\"},\"DateTime\":{\"value\":\"2020:08:19 17:11:11\"}}",
    "image_quality": {
      "overall_score": 0.736
    }
  },
  "ex_fields_info": {
    "key": ""
  },
  "content_uri": "",
  "streams_info": {
    "key": {
      "crc64_hash": "",
      "size": 0,
      "content_hash": "",
      "content_hash_name": "",
      "download_url": "",
      "url": "",
      "thumbnail": ""
    }
  },
  "user_tags": {
    "key": ""
  },
  "revision_version": 0
}

错误码

访问错误中心查看更多错误码。

阿里云首页 网盘与相册服务 相关技术圈