Remove Files from a Group
Usage
import { PinataSDK } from "pinata";
const pinata = new PinataSDK({
pinataJwt: process.env.PINATA_JWT!,
pinataGateway: "example-gateway.mypinata.cloud",
});
const group = await pinata.groups.removeFiles({
groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
files: [
"7e18c4a4-9501-44de-8f81-403db7de0e39",
"a606ef7e-70a0-40ad-9b8a-60563e009655"
],
});
Returns
type UpdateGroupFilesResponse[] = {
id: string;
status: string;
};
Parameters
groupId
ID of the target Group to remove files from
const group = await pinata.groups.removeFiles({
groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
files: [
"7e18c4a4-9501-44de-8f81-403db7de0e39",
"a606ef7e-70a0-40ad-9b8a-60563e009655"
],
});
files
An array of file IDs as strings that you want to remove from the group
const group = await pinata.groups.removeFiles({
groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
files: [
"7e18c4a4-9501-44de-8f81-403db7de0e39",
"a606ef7e-70a0-40ad-9b8a-60563e009655"
],
});