Demo to preview the settings
Introduction
Pinata is a cloud service for keeping your NFT. This plugin makes NFT file storage easy for everyone. You can upload and pin images or videos, 3D files, or even an app on Pinata.
All of Pinata's content is available on the public IPFS network. This means that anybody running an IPFS node can access content stored on Pinata through their own IPFS node.
How to setup
- Create an account on the pinata cloud.
2. In the upper right corner, click the profile icon and select "API Keys" from the menu.
3. Hit the "New key" button
4. In the popup enable toggle you need and give a name for the Key
5. You will get API Key, API Secret and JWT(secret access token).
Please copy them. You will need them later on.
6. In the plugin settings, in the corresponding plugin fields insert API Key and API secret
Actions
1. Pinata Pin File
This endpoint allows the sender to add and pin any file, or directory, to Pinata's IPFS nodes.
ANY FILE? Yeah! Any file. Here at Pinata, you can even host the plans for that awesome spaceship you're building.
Fields
File | The file from your local filesystem |
Name | (optional) - A name that Pinata will associate with this particular hash. A custom string to use as the name for your content |
Custom key | (optional) - The key-values object allows for users to provide any custom key-value pairs they want for the hash being uploaded. These values can be:* Strings |
- Numbers (integers or decimals)
- Dates (Provided in ISO_8601 format)In simple words, a Custom Key is the key associated with the uploaded file. It is possible to create up to 10 Custom Key- Key-value. For instance, Custom Key - Price, Key-value- 300$ for the file. |
| Key value | Custom key value (required when using a custom key). |
States
ipfsHash | This is the IPFS multi-hash provided for your content. |
PinSize | The file size (in bytes). |
Timestamp | The pinned file timestamp (represented in ISO 8601 format) |
Is duplicate | Return true or false if the file is duplicated. |
Error | Return Error message. |
2. Pinata Pin Files
This endpoint also allows users to pin an entire directory to IPFS. This works almost identically to pinning a file, with the main difference being that we provide an array of files and need to provide a relative file path for each file in the directory.
Fields
Files | Dynamic ink for the multi-file uploader. |
Name | File names list. |
States
ipfs hash | This is the IPFS multi-hash provided for your content. |
Pin size | The file size (in bytes). |
Time Stamp | The pinned files timestamp (represented in ISO 8601 format). |
3. Pinata Pin By CID
This endpoint allows you to add a hash to Pinata for asynchronous pinning. Content added through this endpoint is pinned in the background and will show up in your pinned items once the content has been found/pinned. For this operation to succeed, the content for the hash you provide must already be pinned by another node on the IPFS network.
Fields
Hash | Your CID to pin (ExampleHash). |
Name | (optional) - A name that Pinata will associate with this particular hash. |
Custom key | (optional) - The key-values object allows for users to provide any custom key-value pairs they want for the hash being uploaded. These values can be:* Strings |
- Numbers (integers or decimals)
- Dates (Provided in ISO_8601 format)In simple words, a Custom Key is the key associated with the uploaded file. It is possible to create up to 10 Custom Key- Key-value. For instance, Custom Key - Price, Key-value- 300$ for the file. |
| Key value | Custom key value (required when using a custom key). |
States
Id | Pinata's ID for the pin job. |
ipfs hash | IPFS multi-hash provided to Pinata to pin. |
Status | The current status of the pin job. If the request was successful the status should be 'searching'. |
Name | The name of the pin (if provided initially) |
Error | Return Error message. |
4. Pinata Unpin
This endpoint allows the sender to unpin content they previously uploaded to Pinata's IPFS nodes.
Field
Hash | Hash to unpin from pinata. |
State
Success | Return true if file unpinet. |
Error | Return error message |
5. Pinata Hash Metadata
This endpoint allows the sender to change the name and custom key-values associated with a piece of content stored on Pinata.
Changes made via this endpoint only affect the metadata for the hash passed in.
Fields
Hash | Your CID to pin (ExampleHash). |
New custom name | (optional) - A new name for Pinata to associate with the hash provided. |
Custom key | (optional) - The key-values object allows for users to provide any custom key-value pairs they want for the hash being uploaded. These values can be:* Strings |
- Numbers (integers or decimals)
- Dates (Provided in ISO_8601 format)In simple words, a Custom Key is the key associated with the uploaded file. It is possible to create up to 10 Custom Key- Key-value. For instance, Custom Key - Price, Key-value- 300$ for the file. |
| Key value | Custom key value (required when using a custom key). |
State:
Success | Return true if the file is modified |
Error | Return error message |
6. Pinata User Pined
The response for this call will be the total combined size of everything you currently have pinned on Pinata. This value will be expressed in bytes.
State
Pin size total | The total size of all files pinned in Pinata cloud. |
Pin count | Total count pinned files |
Pin size with replications Total | The total size of all files pinned in pinata cloud with replications. |
7. Pinata Pin List
Returns a list of files in Pinata cloud.
Fields
Filters | Filter by pinned or unpinned. |
Page limit | Limits elements to display. |
State
id | the id of your pin instance record. |
ipfs_pin_hash | IPFS multi-hash for the content you pinned. |
size | The pinned file size (in bytes). |
user_id | User id for Pinata. |
date_pinned | The timestamp for when this content was pinned - is represented in ISO 8601 format. |
date_unpinned | The timestamp for when this content was unpinned (if null, then you still have the content pinned on Pinata). |
name | The name of the file originally uploaded, or the custom name you set. |
keyvalues | The key value for the content you pinned. |
8. Pinata Pin JSON
This endpoint allows the sender to add and pin any JSON object they wish to Pinata's IPFS nodes. This endpoint is specifically optimized to only handle JSON content. Once the server receives the JSON, it is converted into a JSON file and pinned to our IPFS storage nodes.
Fields
JSON | Your JSON to pin. |
Name | (optional) - A name that Pinata will associate with this particular hash. |
Custom key | (optional) - The key-values object allows for users to provide any custom key-value pairs they want for the hash being uploaded. These values can be:* Strings |
- Numbers (integers or decimals)
- Dates (Provided in ISO_8601 format)In simple words, a Custom Key is the key associated with the uploaded file. It is possible to create up to 10 Custom Key- Key-value. For instance, Custom Key - Price, Key-value- 300$ for the file. |
| Key value | Custom key value (required when using a custom key). |
State
IpfsHash | This is the IPFS multi-hash provided back for your content. |
Pin Size | This is how large (in bytes) the content you just pinned is. |
Time Stamp | This is the timestamp for your content pinning (represented in ISO 8601 format) |