estuary-client.ContentApi
All URIs are relative to https://api.estuary.tech
Method | HTTP request | Description |
---|---|---|
content_add_car_post | POST /content/add-car | Add Car object |
content_add_ipfs_post | POST /content/add-ipfs | Add IPFS object |
content_add_post | POST /content/add | Add new content |
content_aggregated_content_get | GET /content/aggregated/{content} | Get aggregated content stats |
content_all_deals_get | GET /content/all-deals | Get all deals for a user |
content_bw_usage_content_get | GET /content/bw-usage/{content} | Get content bandwidth |
content_create_post | POST /content/create | Add a new content |
content_deals_get | GET /content/deals | Content with deals |
content_ensure_replication_datacid_get | GET /content/ensure-replication/{datacid} | Ensure Replication |
content_failures_content_get | GET /content/failures/{content} | List all failures for a content |
content_id_get | GET /content/{id} | Content |
content_importdeal_post | POST /content/importdeal | Import a deal |
content_list_get | GET /content/list | List all pinned content |
content_read_cont_get | GET /content/read/{cont} | Read content |
content_staging_zones_get | GET /content/staging-zones | Get staging zone for user |
content_stats_get | GET /content/stats | Get content statistics |
content_status_id_get | GET /content/status/{id} | Content Status |
content_add_car_post
content_add_car_post(body, ignore_dupes=ignore_dupes, filename=filename)
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
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
body = 'body_example' # str | Car
ignore_dupes = 'ignore_dupes_example' # str | Ignore Dupes (optional)
filename = 'filename_example' # str | Filename (optional)
try:
# Add Car object
api_instance.content_add_car_post(body, ignore_dupes=ignore_dupes, filename=filename)
except ApiException as e:
print("Exception when calling ContentApi->content_add_car_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | str | Car | |
ignore_dupes | str | Ignore Dupes | [optional] |
filename | str | Filename | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_add_ipfs_post
content_add_ipfs_post(body, ignore_dupes=ignore_dupes)
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
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
body = estuary-client.UtilContentAddIpfsBody() # UtilContentAddIpfsBody | IPFS Body
ignore_dupes = 'ignore_dupes_example' # str | Ignore Dupes (optional)
try:
# Add IPFS object
api_instance.content_add_ipfs_post(body, ignore_dupes=ignore_dupes)
except ApiException as e:
print("Exception when calling ContentApi->content_add_ipfs_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | UtilContentAddIpfsBody | IPFS Body | |
ignore_dupes | str | Ignore Dupes | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_add_post
UtilContentAddResponse content_add_post(data, filename=filename, coluuid=coluuid, replication=replication, ignore_dupes=ignore_dupes, lazy_provide=lazy_provide, dir=dir)
Add new content
This endpoint is used to upload new content.
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
data = '/path/to/file.txt' # file | File to upload
filename = 'filename_example' # str | Filenam to use for upload (optional)
coluuid = 'coluuid_example' # str | Collection UUID (optional)
replication = 56 # int | Replication value (optional)
ignore_dupes = 'ignore_dupes_example' # str | Ignore Dupes true/false (optional)
lazy_provide = 'lazy_provide_example' # str | Lazy Provide true/false (optional)
dir = 'dir_example' # str | Directory (optional)
try:
# Add new content
api_response = api_instance.content_add_post(data, filename=filename, coluuid=coluuid, replication=replication, ignore_dupes=ignore_dupes, lazy_provide=lazy_provide, dir=dir)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentApi->content_add_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
data | file | File to upload | |
filename | str | Filenam to use for upload | [optional] |
coluuid | str | Collection UUID | [optional] |
replication | int | Replication value | [optional] |
ignore_dupes | str | Ignore Dupes true/false | [optional] |
lazy_provide | str | Lazy Provide true/false | [optional] |
dir | str | Directory | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_aggregated_content_get
str content_aggregated_content_get(content)
Get aggregated content stats
This endpoint returns aggregated content stats
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
content = 'content_example' # str | Content ID
try:
# Get aggregated content stats
api_response = api_instance.content_aggregated_content_get(content)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentApi->content_aggregated_content_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
content | str | Content ID |
Return type
str
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
begin = 'begin_example' # str | Begin
duration = 'duration_example' # str | Duration
all = 'all_example' # str | All
try:
# Get all deals for a user
api_instance.content_all_deals_get(begin, duration, all)
except ApiException as e:
print("Exception when calling ContentApi->content_all_deals_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
begin | str | Begin | |
duration | str | Duration | |
all | str | All |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_bw_usage_content_get
content_bw_usage_content_get(content)
Get content bandwidth
This endpoint returns content bandwidth
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
content = 'content_example' # str | Content ID
try:
# Get content bandwidth
api_instance.content_bw_usage_content_get(content)
except ApiException as e:
print("Exception when calling ContentApi->content_bw_usage_content_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
content | str | Content ID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_create_post
content_create_post(req, ignore_dupes=ignore_dupes)
Add a new content
This endpoint adds a new content
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
req = estuary-client.UtilContentCreateBody() # UtilContentCreateBody | Content
ignore_dupes = 'ignore_dupes_example' # str | Ignore Dupes (optional)
try:
# Add a new content
api_instance.content_create_post(req, ignore_dupes=ignore_dupes)
except ApiException as e:
print("Exception when calling ContentApi->content_create_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
req | UtilContentCreateBody | Content | |
ignore_dupes | str | Ignore Dupes | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_deals_get
content_deals_get(limit=limit, offset=offset)
Content with deals
This endpoint lists all content with deals
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
limit = 56 # int | Limit (optional)
offset = 56 # int | Offset (optional)
try:
# Content with deals
api_instance.content_deals_get(limit=limit, offset=offset)
except ApiException as e:
print("Exception when calling ContentApi->content_deals_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Limit | [optional] |
offset | int | Offset | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
datacid = 'datacid_example' # str | Data CID
try:
# Ensure Replication
api_instance.content_ensure_replication_datacid_get(datacid)
except ApiException as e:
print("Exception when calling ContentApi->content_ensure_replication_datacid_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacid | str | Data CID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_failures_content_get
str content_failures_content_get(content)
List all failures for a content
This endpoint returns all failures for a content
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
content = 'content_example' # str | Content ID
try:
# List all failures for a content
api_response = api_instance.content_failures_content_get(content)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentApi->content_failures_content_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
content | str | Content ID |
Return type
str
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_id_get
content_id_get(id)
Content
This endpoint returns a content by its ID
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
id = 56 # int | Content ID
try:
# Content
api_instance.content_id_get(id)
except ApiException as e:
print("Exception when calling ContentApi->content_id_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Content ID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_importdeal_post
content_importdeal_post(body)
Import a deal
This endpoint imports a deal into the shuttle.
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
body = estuary-client.MainImportDealBody() # MainImportDealBody | Import a deal
try:
# Import a deal
api_instance.content_importdeal_post(body)
except ApiException as e:
print("Exception when calling ContentApi->content_importdeal_post: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | MainImportDealBody | Import a deal |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_list_get
list[str] content_list_get()
List all pinned content
This endpoint lists all content
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
try:
# List all pinned content
api_response = api_instance.content_list_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentApi->content_list_get: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
list[str]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_read_cont_get
content_read_cont_get(cont)
Read content
This endpoint reads content from the blockstore
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
cont = 'cont_example' # str | CID
try:
# Read content
api_instance.content_read_cont_get(cont)
except ApiException as e:
print("Exception when calling ContentApi->content_read_cont_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
cont | str | CID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_staging_zones_get
content_staging_zones_get()
Get staging zone for user
This endpoint is used to get staging zone for user.
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
try:
# Get staging zone for user
api_instance.content_staging_zones_get()
except ApiException as e:
print("Exception when calling ContentApi->content_staging_zones_get: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
limit = 'limit_example' # str | limit
offset = 'offset_example' # str | offset
try:
# Get content statistics
api_instance.content_stats_get(limit, offset)
except ApiException as e:
print("Exception when calling ContentApi->content_stats_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
limit | str | limit | |
offset | str | offset |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
content_status_id_get
content_status_id_get(id)
Content Status
This endpoint returns the status of a content
Example
from __future__ import print_function
import time
import estuary-client
from estuary-client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearerAuth
configuration = estuary-client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = estuary-client.ContentApi(estuary-client.ApiClient(configuration))
id = 56 # int | Content ID
try:
# Content Status
api_instance.content_status_id_get(id)
except ApiException as e:
print("Exception when calling ContentApi->content_status_id_get: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Content ID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]