Results 1 to 3 of 3

Thread: GET/Dir Response Documentation

  1. #1

    GET/Dir Response Documentation

    Hello HiDrive Developer Team,

    could you please provide a more detailed documentation of the GET/dir response fields? I can only gues what some fields mean.

    Right now, I have some concrete questions:
    - What does chash mean? Is it only a hash for directory?
    - Do the IDs change, e.g. if you move a file or directory?
    - Are the IDs unique for my complete hidrive storage?
    - What is the maximum length of each string field in the response?

    Thanks,
    René

  2. #2
    HiDrive Development
    Join Date
    Oct 2013
    Posts
    12
    Hello René,

    we are still in the process of readying our documentation of the sync-related features for public release. I currently cannot offer an estimate regarding the time-frame. In short: the hash fields contain values for either content (chash) and metadata (nhash, mhash, mohash). For files the actual file content is hashed on hierarchical levels. The content of a directory is defined by the contained files and their metadata, thus a directory has a recursive content-hash built from the contained files and their metadata. Also, metadata-only hashes are available for directories that are non-recursive. The documentation will explain in detail how this works, how to calculate hashes locally and how to integrate this for a sync client.

    The path id (pid in requests or id in responses) is made up of two components separated by a dot. It can usually be regarded as constant as long as the first part is unchanged. For example, an appication can cache the path id of the user's home directory and as long as a /user/me returns the same path id, all other cached path id values are still valid. Any API call that modifies the location of a file-system object returns the path id in the response. There is no promise that a given path id will not change as a result of a modification.

    Yes, the path ids are guaranteed to be unique for a given (single- or multi-user) HiDrive.

    I currently do not have authoritative information on maximum field lengths in the JSON responses given by the API. Please let us know if you consider this to be essential or nice-to-have information.
    --
    Cornelius Bartke, STRATO HiDrive, Development

  3. #3
    Hello Cornelius,

    thanks for your reply. I restarted my work on my snyc client...
    Do you have some more insights on hash calculation? The most important:

    how can I calculate the hash myself?
    is it sufficient th calculate a local directory hash and compare it with the cloud hash, to find out, if there are any differences in the directory?

    Kind regards and merry christmas,
    René

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •