Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Type

Description

target_id

String

The id of the target which is related to the files. Should be equal to user_id if target_type is user or visit_id if target_type is visit.

target_type

String user | visit

The file of the target which is related to the files. For now the possible values are 'user' and 'visit'

category_type

String

The category type of this file. For now the possible reasons are 'user_document', 'intake_attachment', 'user_consent', 'user_avatar'.

include_shared

Boolean true|false

Include this param will get all the files that tagged user_document and notes files that shared to the user.

Response

Code Block
breakoutModewide
languagejson
curl --location --request GET \
> 'https://api-vclinic.vsee.me/api_v3/files?target_id=2317820300&target_type=user' \
> --header 'X-AccountCode: vclinic' --header 'X-ApiToken: vclinic_api_key'

{
    "data": [
        {
            "created": 1657668358,
            "creator": {
                "full_name": "Patient's Name",
                "type": 200,
                "username": "62ce09a2940adc6474"
            },
            "ext": "pdf",
            "fullpath": "https://api-vclinic.vsee.me/files/view/62ce0306-bd68-8fj3-7771-6dfc0ks8219474?auth_code=bb7e2d413f9jd93unf92u4e35584d10&time=1669924552",
            "id": "62ce0306-bd68-8fj3-7771-6dfc0ks8219474",
            "is_deletable": true,
            "meta": {
                "account": {
                    "code": "vclinic"
                },
                "category": "user_document",
                "target": {
                    "id": "2317820300",
                    "type": "user"
                },
                "visible": true
            },
            "name": "2017-01-21 04:00:00 - filename.pdf",
            "size": 274988
        }
    ]
}

GET /files/

...

:id

Download the file itselfRetrieve file info including the download link.

Parameters

Parameter

Type

Description

:id

String

File id. E.g. _id from Intake attachments array, etc.

auth_code

String

Response

...

Code Block

...

...

Response

curl -X GET "https://api-vclinic.vsee.me/api_v3/files/
Code Block
languagejson
language

...

String

...

Timestamp as returned by other API method

...

size

...

String

...

(optional) Resized image dimensions in {W}x{H} format. Example: 320x240. If the file is not image, this parameter will be ignored. Resized Image is always PNG format, Content-type: image/png header will be set in response

json

curl -X GET "https://api-vclinic.vsee.me/api_v3/files/63f67f95-41f8-4581-bdc3-792f0adc0a9f" -k

{
    "data": {
        "id": "57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=01f72b633c40c9c272f9dc73a87f1bc66694ee31&time=1475236382&size=320x480" -k

Binary object

GET /files/:id

Retrieve file info including the download link.

Parameters

...

Parameter

...

Type

...

Description

...

:id

...

String

...

File id. E.g. _id from Intake attachments array, etc.

Response

Code Block
languagejson

curl -X GET "https://api-vclinic.vsee.me/api_v3/files/63f67f95-41f8-4581-bdc3-792f0adc0a9f" -k

{",
        "name": "Screenshot 2023-02-22 at 21.47.43.png",
        "datasize": {25473,
        "idext": "57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144png",
        "namefullpath": "Screenshot 2023-02-22 at 21.47.43.pnghttps://api-vclinic.vsee.me/files/view/57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=01f72b633c40c73a87f1bc66694ee31&time=1677099046",
        "sizemeta": {
   25473,         "exttarget": "png",{
                "fullpathid": "https://api-vclinic.vsee.me/files/view/57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=01f72b633c40c73a87f1bc66694ee31&time=167709904663f67fb0-9864-4059-ad1b-63b10adc6474",
        "meta": {       "type": "intake"
       "target": {    },
            "idcategory": "63f67fb0-9864-4059-ad1b-63b10adc6474",intake_attachment",
            "account": {
                "typecode": "intakevclinic"
            },
        },
        "categorycreator": "intake_attachment",{
            "accountusername": {
   "anton+test2@vseelab.com",
            "codetype": "vclinic"200,
            }
 "full_name": "anton test_2",
      },         "creatorid": {"27769243"
            "username": "anton+test2@vseelab.com",
},
           "typecreated": 2001677098901,
   
        "fullis_namedeletable": "anton test_2"false,
        "modified": 1677098901
  "id": "27769243"
        },
        "created": 1677098901,
        "is_deletable": false,
        "modified": 1677098901
    }
} }
}

data.fullpath - the link to download the file (see https://developers.vsee.com/wiki/spaces/VD/pages/15302716/File+Upload+API#GET-/files/view/:id )

GET /files/view/:id

Download the file itself.

Parameters

Parameter

Type

Description

:id

String

File id. E.g. _id from Intake attachments array, etc.

auth_code

String

Auth code returned by other API method

time

String

Timestamp as returned by other API method

size

String

(optional) Resized image dimensions in {W}x{H} format. Example: 320x240. If the file is not image, this parameter will be ignored. Resized Image is always PNG format, Content-type: image/png header will be set in response

Response

Code Block
languagejson

curl -X GET "https://api-vclinic.vsee.me/api_v3/files/57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=01f72b633c40c9c272f9dc73a87f1bc66694ee31&time=1475236382&size=320x480" -k

Binary object