The create method allows you to create a retrieval request for a specified Decentralized Storage Network (DSN) and file.

try {
  const retrievalRequest = await sdk.retrievalRequests.create({
    dsn: 'dsn_here', // The DSN identifier.
    fileId: 'file_id_here', // The identifier of the file for which the retrieval request is created.
  });

  console.log(retrievalRequest); // Details of the created retrieval request
} catch (error) {
  console.error(error.message);
}

Params

  • dsn (string): The Decentralized Storage Network (DSN) identifier.
  • fileId (string): The identifier of the file for which the retrieval request is created..

Required API Key Permission

  • Read Directory