Content Publishing Service

The Content Publishing Service allows users to create, post, and manage content on the Frequency network. It supports various content types such as text, images, and videos.

API Reference

Configuration

ℹ️ Feel free to adjust your environment variables to taste. This application recognizes the following environment variables:

NameDescriptionRange/TypeRequired?Default
API_PORTHTTP port that the application listens on1025 - 655353000
ASSET_EXPIRATION_INTERVAL_SECONDSNumber of seconds to keep completed asset entries in the cache before expiring them> 0Y
ASSET_UPLOAD_VERIFICATION_DELAY_SECONDSBase delay in seconds used for exponential backoff while waiting for uploaded assets to be verified available before publishing a content notice>= 0Y
BATCH_INTERVAL_SECONDSNumber of seconds between publishing batches. This is so that the service waits a reasonable amount of time for additional content to publish before submitting a batch--it represents a trade-off between maximum batch fullness and minimal wait time for content> 0Y
BATCH_MAX_COUNTMaximum number of items that can be submitted in a single batch> 0Y
CACHE_KEY_PREFIXPrefix to use for Redis cache keysstringY
CAPACITY_LIMITMaximum amount of provider capacity this app is allowed to use (per epoch) type: 'percentage' 'amount' value: number (may be percentage, ie '80', or absolute amount of capacity)JSON (example)Y
FILE_UPLOAD_MAX_SIZE_IN_BYTESMax file size (in bytes) allowed for asset upload> 0Y
FILE_UPLOAD_COUNT_LIMITMax number of files to be able to upload at the same time via one upload call> 0Y
FREQUENCY_API_WS_URLBlockchain API Websocket URLws(s): URLY
FREQUENCY_TIMEOUT_SECSFrequency chain connection timeout limit; app will terminate if disconnected longerinteger10
IPFS_BASIC_AUTH_SECRETIf using Infura, put auth token here, or leave blank for Kubo RPCstringblank
IPFS_BASIC_AUTH_USERIf using Infura, put Project ID here, or leave blank for Kubo RPCstringblank
IPFS_ENDPOINTURL to IPFS endpointURLY
IPFS_GATEWAY_URLIPFS gateway URL '[CID]' is a token that will be replaced with an actual content IDURL templateY
PROVIDER_ACCOUNT_SEED_PHRASESeed phrase for provider MSA control keystringY
PROVIDER_IDProvider MSA IdintegerY
REDIS_URLConnection URL for RedisURLY
API_TIMEOUT_MSApi timeout limit in milliseconds> 060000
API_BODY_JSON_LIMITApi json body size limit in string (some examples: 100kb or 5mb or etc)string1mb

Best Practices

  • Metadata Management: Always ensure metadata is correctly associated with content to maintain data integrity.
  • Content Validation: Validate content to prevent the submission of inappropriate or harmful material.