FileStorage

This service provides functionality to manage assets and generate pdf. You can upload the assets, get the cdn link for the assets, proxy the assets and many more things.

Browse File

Browse files by fetching all files in a directory based on the provided namespace, query, and request body parameters. It determines the directory path, retrieves paginated files accordingly, and serializes the response for further processing. This method optimizes directory browsing functionality within the system.

Operations
GET
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
# Browse Files
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}/browse
# Browse Files
GET

Browse Files

Browse Files
Parameters
namespace
string
Required
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
application_id
string
Required
Unique identifier for the application.
company_id
integer
Required
Unique numeric identifier for the company.
page
integer
page no
limit
integer
Limit
Response
200
400
Success
Properties
items
array of object
Array of Properties
_id
string
file_name
string
file_path
string
success
boolean
namespace
string
content_type
string
size
number
operation
string
tags
array of string
cdn
object
Properties
url
string
upload
object
Properties
url
string
expiry
number
created_by
object
Properties
user_id
string
username
string
company_id
number
bucket_key
string
created_at
string
updated_at
string
__v
number
page
object
Properties
item_total
integer
| int32
next_id
string
has_previous
boolean
has_next
boolean
current
integer
| int32
type
string
size
integer
| int32
Examples
Parameters
namespace:
"test"
organization_id:
"t6hcne7r2ewmc888"
application_id:
"5eda528b97457fe43a733ace"
company_id:
2
page:
1
limit:
1
GET
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/namespaces/{namespace}/browse
Loading...
Response
Loading...
GET

Browse Files

Browse Files
Parameters
namespace
string
Required
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
page
integer
page no
limit
integer
Limit
Response
200
400
Success
Properties
items
array of object
Array of Properties
_id
string
file_name
string
file_path
string
success
boolean
namespace
string
content_type
string
size
number
operation
string
tags
array of string
cdn
object
Properties
url
string
upload
object
Properties
url
string
expiry
number
created_by
object
Properties
user_id
string
username
string
company_id
number
bucket_key
string
created_at
string
updated_at
string
__v
number
page
object
Properties
item_total
integer
| int32
next_id
string
has_previous
boolean
has_next
boolean
current
integer
| int32
type
string
size
integer
| int32
Examples
Parameters
namespace:
"test"
organization_id:
"t6hcne7r2ewmc888"
page:
1
limit:
1
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}/browse
Loading...
Response
Loading...

File Upload

File upload is a feature that enables users to upload files from their device to a designated storage location in the system. The process of uploading begins by validating user parameters and organizing files into different groups based on their type using something called a "namespace". This helps in storing the files into Public and Private buckets Private - The files stored in private bucket is accessible via getSignedUrl method for a temporary duration. Public - The files stored in public bucket is accessible via cdn url Customer initiate the upload process by selecting from pre-existing images, choosing from your device, uploading via URL, or entering an image URL. 1. Start Upload - Once seller calls start upload will receive a signed URL to initiate the upload process. 2. Utilize a Google Cloud Platform (GCP) method to upload the file through the obtained signed URL. 3. Complete File upload - Important file details such as name, size, content type, and namespace are collected and linked to maintain data integrity within the system's database. Once you upload a file, you receive a message with all the details about where your file is stored, including a secure URL for uploading files to the designated storage and a CDN (Content Delivery Network) URL for future accessibility. Furthermore, the system sets an expiration time for access links(signed Url) enhancing security measures.

Operations
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces
# Get details of all namespaces
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}
# Get details of a namespace
POST
/service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/complete
# This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
POST
/service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/start
# This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
GET

Get details of all namespaces

Retrieve information about all available namespaces
Parameters
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
Response
200
Success
AllNamespaceDetails
items
array of object (NamespaceDetails)
An Array of all the existing Namespace
Array of NamespaceDetails
namespace
string
The namespace identifier
valid_content_types
array of string
Nullable
List of valid content types for the namespace
size
object (SizeConstraints)
SizeConstraints
max
integer
Maximum allowed size (in bytes) for files in the namespace
file_acl
string
Access control level for files in the namespace
Examples
Parameters
organization_id:
"t6hcne7r2ewmc888"
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces
Loading...
Response
Loading...
GET

Get details of a namespace

Retrieve information about a specific namespace
Parameters
namespace
string
Required
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
Response
200
Success
NamespaceDetails
namespace
string
The namespace identifier
valid_content_types
array of string
Nullable
List of valid content types for the namespace
size
object (SizeConstraints)
SizeConstraints
max
integer
Maximum allowed size (in bytes) for files in the namespace
file_acl
string
Access control level for files in the namespace
Examples
Parameters
namespace:
"test"
organization_id:
"t6hcne7r2ewmc888"
GET
/service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}
Loading...
Response
Loading...
POST

This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.

Uploads an arbitrarily sized buffer or blob. It has three Major Steps: * Start * Upload * Complete ### Start Initiates the assets upload using `startUpload`. It returns the storage link in response. ### Upload Use the storage link to upload a file (Buffer or Blob) to the File Storage. Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body. ### Complete After successfully upload, call `completeUpload` api to complete the upload process. This operation will return the url for the uploaded file.
Parameters
namespace
string
Required
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
Request body
file_name
string
Required
The name of the uploaded file.
file_path
string
Required
The storage path of the uploaded file.
content_type
string
Required
The MIME type of the uploaded file.
method
string
The method used for the upload.
namespace
string
Required
The namespace where the file is stored.
operation
string
Required
The operation type performed on the file.
size
integer
Required
The size of the uploaded file in bytes.
upload
object (Upload)
Required
Upload
expiry
integer
Required
The expiration time of the uploaded file.
url
string
Required
The URL of the uploaded file.
tags
array of string
Tags associated with the uploaded file.
Response
200
400
Success
FileUploadComplete
_id
string
The unique identifier of the uploaded file.
file_name
string
The name of the file.
file_path
string
The storage path of the file.
content_type
string
The MIME type of the file.
namespace
string
The namespace where the file is stored.
operation
string
The type of operation performed on the file.
size
integer
The size of the file in bytes.
upload
object (Upload)
Upload
expiry
integer
The expiration time of the uploaded file.
url
string
The URL of the uploaded file.
cdn
object (CDN)
CDN
url
string
The CDN URL of the file.
absolute_url
string
The absolute URL of the file.
relative_url
string
The relative path of the file within the CDN.
success
boolean
Indicates if the upload was successful.
tags
array of string
Tags associated with the file.
created_on
string
| date-time
The timestamp when the file was created.
modified_on
string
| date-time
The timestamp when the file was last modified.
created_by
object (CreatedBy)
CreatedBy
user_id
string
The unique identifier of the user.
username
string
The username of the creator.
Examples
Parameters
namespace:
"test"
organization_id:
"t6hcne7r2ewmc888"
body:
body
POST
/service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/complete
Loading...
Response
Loading...
POST

This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.

Uploads an arbitrarily sized buffer or blob. It has three Major Steps: * Start * Upload * Complete ### Start Initiates the assets upload using `startUpload`. It returns the storage link in response. ### Upload Use the storage link to upload a file (Buffer or Blob) to the File Storage. Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body. ### Complete After successfully upload, call `completeUpload` api to complete the upload process. This operation will return the url for the uploaded file.
Parameters
namespace
string
Required
Segregation of different types of files(products, orders, logistics etc), Required for validating the data of the file being uploaded, decides where exactly the file will be stored inside the storage bucket.
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
Request body
file_name
string
Required
The name of the file to be uploaded.
content_type
string
Required
The MIME type of the file.
size
integer
Required
The file size in bytes.
tags
array of string
Tags associated with the file.
params
object
Additional parameters for file upload.
Response
200
400
Success. Returns a response containing relaving and absolute_url of storage service
FileUpload
file_name
string
The name of the uploaded file.
file_path
string
The storage path of the uploaded file.
content_type
string
The MIME type of the uploaded file.
method
string
The method used for the upload.
namespace
string
The namespace where the file is stored.
operation
string
The operation type performed on the file.
size
integer
The size of the uploaded file in bytes.
upload
object (Upload)
Upload
expiry
integer
The expiration time of the uploaded file.
url
string
The URL of the uploaded file.
tags
array of string
Tags associated with the uploaded file.
Examples
Parameters
namespace:
"test"
organization_id:
"t6hcne7r2ewmc888"
body:
body
POST
/service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/start
Loading...
Response
Loading...

Proxy

The proxy acts as an intermediary, enabling communication between two entities by directing client requests to the correct server and sending responses back to the client. It fetches data from a designated URL and delivers it to the client, ensuring seamless interaction with files. This resource can be employed to provide the client (browser) with cross-domain asset URLs, preventing CORS errors.

Operations
GET
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/proxy/fetch
# Proxy
POST
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/proxy/fetch
# Proxy
GET
/service/partner/assets/v1.0/organization/{organization_id}/proxy/fetch
# Proxy
POST
/service/partner/assets/v1.0/organization/{organization_id}/proxy/fetch
# Proxy
GET

Proxy

Proxy
Parameters
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
application_id
string
Required
Unique identifier for the application.
company_id
integer
Required
Unique numeric identifier for the company.
url
string
Required
url
Response
200
Success
FetchProxyDetails
data
object
The actual response data
support
object
Support-related information
Examples
Parameters
organization_id:
"t6hcne7r2ewmc888"
application_id:
"5eda528b97457fe43a733ace"
company_id:
2
url:
"https://reqres.in/api/users/2"
GET
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/proxy/fetch
Loading...
Response
Loading...
POST

Proxy

Proxy
Parameters
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
application_id
string
Required
Unique identifier for the application.
company_id
integer
Required
Unique numeric identifier for the company.
Request body
id
integer
Unique identifier for the proxy request, used in failure scenarios.
customer
string
Name or identifier of the customer associated with the proxy file.
quantity
integer
Number of proxy instances or sessions requested.
price
number
Cost of the proxy service, provided in applicable currency units.
data
object (ProxyFileData)
ProxyFileData
email
string
User email address required for proxy authentication.
password
string
Password associated with the email for proxy authentication.
url
string
Endpoint URL for proxy-related API requests, such as user registration or fetching data.
Response
200
Success
SaveProxy
id
integer
Unique identifier assigned to the saved proxy session.
token
string
Authentication token generated for the created proxy session.
Examples
Parameters
organization_id:
"t6hcne7r2ewmc888"
application_id:
"5eda528b97457fe43a733ace"
company_id:
2
body:
body
POST
/service/partner/assets/v1.0/organization/{organization_id}/company/{company_id}/application/{application_id}/proxy/fetch
Loading...
Response
Loading...
GET

Proxy

Proxy
Parameters
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
url
string
Required
url
Response
200
Success
FetchProxyDetails
data
object
The actual response data
support
object
Support-related information
Examples
Parameters
organization_id:
"t6hcne7r2ewmc888"
url:
"https://reqres.in/api/users/2"
GET
/service/partner/assets/v1.0/organization/{organization_id}/proxy/fetch
Loading...
Response
Loading...
POST

Proxy

Proxy
Parameters
organization_id
string
Required
Unique identifier for the organization, used to specify the organization scope in API requests.
Request body
id
integer
Unique identifier for the proxy request, used in failure scenarios.
customer
string
Name or identifier of the customer associated with the proxy file.
quantity
integer
Number of proxy instances or sessions requested.
price
number
Cost of the proxy service, provided in applicable currency units.
data
object (ProxyFileData)
ProxyFileData
email
string
User email address required for proxy authentication.
password
string
Password associated with the email for proxy authentication.
url
string
Endpoint URL for proxy-related API requests, such as user registration or fetching data.
Response
200
Success
SaveProxy
id
integer
Unique identifier assigned to the saved proxy session.
token
string
Authentication token generated for the created proxy session.
Examples
Parameters
organization_id:
"t6hcne7r2ewmc888"
body:
body
POST
/service/partner/assets/v1.0/organization/{organization_id}/proxy/fetch
Loading...
Response
Loading...