Skip to main content

SwaggerClient::ContentApi

All URIs are relative to https://api.estuary.tech

MethodHTTP requestDescription
content_add_car_postPOST /content/add-carAdd Car object
content_add_ipfs_postPOST /content/add-ipfsAdd IPFS object
content_add_postPOST /content/addAdd new content
content_aggregated_content_getGET /content/aggregated/{content}Get aggregated content stats
content_all_deals_getGET /content/all-dealsGet all deals for a user
content_bw_usage_content_getGET /content/bw-usage/{content}Get content bandwidth
content_create_postPOST /content/createAdd a new content
content_deals_getGET /content/dealsContent with deals
content_ensure_replication_datacid_getGET /content/ensure-replication/{datacid}Ensure Replication
content_failures_content_getGET /content/failures/{content}List all failures for a content
content_id_getGET /content/{id}Content
content_importdeal_postPOST /content/importdealImport a deal
content_list_getGET /content/listList all pinned content
content_read_cont_getGET /content/read/{cont}Read content
content_staging_zones_getGET /content/staging-zonesGet staging zone for user
content_stats_getGET /content/statsGet content statistics
content_status_id_getGET /content/status/{id}Content Status

content_add_car_post

content_add_car_post(body, opts)

Add Car object

This endpoint is used to add a car object to the network. The object can be a file or a directory.

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

body = 'body_example' # String | Car

opts = {
ignore_dupes: 'ignore_dupes_example', # String | Ignore Dupes
filename: 'filename_example' # String | Filename
}

begin
#Add Car object
api_instance.content_add_car_post(body, opts)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_car_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
bodyStringCar
ignore_dupesStringIgnore Dupes[optional]
filenameStringFilename[optional]

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_add_ipfs_post

content_add_ipfs_post(body, opts)

Add IPFS object

This endpoint is used to add an IPFS object to the network. The object can be a file or a directory.

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

body = SwaggerClient::UtilContentAddIpfsBody.new # UtilContentAddIpfsBody | IPFS Body

opts = {
ignore_dupes: 'ignore_dupes_example' # String | Ignore Dupes
}

begin
#Add IPFS object
api_instance.content_add_ipfs_post(body, opts)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_ipfs_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
bodyUtilContentAddIpfsBodyIPFS Body
ignore_dupesStringIgnore Dupes[optional]

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_add_post

UtilContentAddResponse content_add_post(data, opts)

Add new content

This endpoint is used to upload new content.

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

data = File.new('/path/to/file.txt') # File | File to upload

opts = {
filename: 'filename_example', # String | Filenam to use for upload
coluuid: 'coluuid_example', # String | Collection UUID
replication: 56, # Integer | Replication value
ignore_dupes: 'ignore_dupes_example', # String | Ignore Dupes true/false
lazy_provide: 'lazy_provide_example', # String | Lazy Provide true/false
dir: 'dir_example' # String | Directory
}

begin
#Add new content
result = api_instance.content_add_post(data, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
dataFileFile to upload
filenameStringFilenam to use for upload[optional]
coluuidStringCollection UUID[optional]
replicationIntegerReplication value[optional]
ignore_dupesStringIgnore Dupes true/false[optional]
lazy_provideStringLazy Provide true/false[optional]
dirStringDirectory[optional]

Return type

UtilContentAddResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

content_aggregated_content_get

String content_aggregated_content_get(content)

Get aggregated content stats

This endpoint returns aggregated content stats

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

content = 'content_example' # String | Content ID


begin
#Get aggregated content stats
result = api_instance.content_aggregated_content_get(content)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_aggregated_content_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
contentStringContent ID

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_all_deals_get

content_all_deals_get(_begin, duration, all)

Get all deals for a user

This endpoint is used to get all deals for a user

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

_begin = '_begin_example' # String | Begin

duration = 'duration_example' # String | Duration

all = 'all_example' # String | All


begin
#Get all deals for a user
api_instance.content_all_deals_get(_begin, duration, all)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_all_deals_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
_beginStringBegin
durationStringDuration
allStringAll

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_bw_usage_content_get

content_bw_usage_content_get(content)

Get content bandwidth

This endpoint returns content bandwidth

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

content = 'content_example' # String | Content ID


begin
#Get content bandwidth
api_instance.content_bw_usage_content_get(content)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_bw_usage_content_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
contentStringContent ID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_create_post

content_create_post(req, opts)

Add a new content

This endpoint adds a new content

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

req = SwaggerClient::UtilContentCreateBody.new # UtilContentCreateBody | Content

opts = {
ignore_dupes: 'ignore_dupes_example' # String | Ignore Dupes
}

begin
#Add a new content
api_instance.content_create_post(req, opts)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_create_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
reqUtilContentCreateBodyContent
ignore_dupesStringIgnore Dupes[optional]

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_deals_get

content_deals_get(opts)

Content with deals

This endpoint lists all content with deals

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

opts = {
limit: 56, # Integer | Limit
offset: 56 # Integer | Offset
}

begin
#Content with deals
api_instance.content_deals_get(opts)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_deals_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
limitIntegerLimit[optional]
offsetIntegerOffset[optional]

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_ensure_replication_datacid_get

content_ensure_replication_datacid_get(datacid)

Ensure Replication

This endpoint ensures that the content is replicated to the specified number of providers

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

datacid = 'datacid_example' # String | Data CID


begin
#Ensure Replication
api_instance.content_ensure_replication_datacid_get(datacid)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_ensure_replication_datacid_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
datacidStringData CID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_failures_content_get

String content_failures_content_get(content)

List all failures for a content

This endpoint returns all failures for a content

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

content = 'content_example' # String | Content ID


begin
#List all failures for a content
result = api_instance.content_failures_content_get(content)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_failures_content_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
contentStringContent ID

Return type

String

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_id_get

content_id_get(id)

Content

This endpoint returns a content by its ID

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

id = 56 # Integer | Content ID


begin
#Content
api_instance.content_id_get(id)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_id_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
idIntegerContent ID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_importdeal_post

content_importdeal_post(body)

Import a deal

This endpoint imports a deal into the shuttle.

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

body = SwaggerClient::MainImportDealBody.new # MainImportDealBody | Import a deal


begin
#Import a deal
api_instance.content_importdeal_post(body)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_importdeal_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
bodyMainImportDealBodyImport a deal

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_list_get

Array<String> content_list_get

List all pinned content

This endpoint lists all content

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

begin
#List all pinned content
result = api_instance.content_list_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_list_get: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<String>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_read_cont_get

content_read_cont_get(cont)

Read content

This endpoint reads content from the blockstore

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

cont = 'cont_example' # String | CID


begin
#Read content
api_instance.content_read_cont_get(cont)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_read_cont_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
contStringCID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_staging_zones_get

content_staging_zones_get

Get staging zone for user

This endpoint is used to get staging zone for user.

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

begin
#Get staging zone for user
api_instance.content_staging_zones_get
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_staging_zones_get: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_stats_get

content_stats_get(limit, offset)

Get content statistics

This endpoint is used to get content statistics. Every content stored in the network (estuary) is tracked by a unique ID which can be used to get information about the content. This endpoint will allow the consumer to get the collected stats of a conten

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

limit = 'limit_example' # String | limit

offset = 'offset_example' # String | offset


begin
#Get content statistics
api_instance.content_stats_get(limit, offset)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_stats_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
limitStringlimit
offsetStringoffset

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

content_status_id_get

content_status_id_get(id)

Content Status

This endpoint returns the status of a content

Example

# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SwaggerClient::ContentApi.new

id = 56 # Integer | Content ID


begin
#Content Status
api_instance.content_status_id_get(id)
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_status_id_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
idIntegerContent ID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json