Skip to main content

SwaggerClient::CollectionsApi

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

MethodHTTP requestDescription
collections_coluuid_commit_postPOST /collections/{coluuid}/commitProduce a CID of the collection contents
collections_coluuid_contents_deleteDELETE /collections/{coluuid}/contentsDeletes a content from a collection
collections_coluuid_deleteDELETE /collections/{coluuid}Deletes a collection
collections_coluuid_getGET /collections/{coluuid}Get contents in a collection
collections_coluuid_postPOST /collections/{coluuid}Add contents to a collection
collections_fs_add_postPOST /collections/fs/addAdd a file to a collection
collections_getGET /collections/List all collections
collections_postPOST /collections/Create a new collection

collections_coluuid_commit_post

String collections_coluuid_commit_post(coluuid)

Produce a CID of the collection contents

This endpoint is used to save the contents in a collection, producing a top-level CID that references all the current CIDs in the collection.

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | coluuid


begin
#Produce a CID of the collection contents
result = api_instance.collections_coluuid_commit_post(coluuid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_commit_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringcoluuid

Return type

String

Authorization

bearerAuth

HTTP request headers

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

collections_coluuid_contents_delete

String collections_coluuid_contents_delete(coluuid, contentid, body)

Deletes a content from a collection

This endpoint is used to delete an existing content from an existing collection. If two or more files with the same contentid exist in the collection, delete the one in the specified path

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | Collection ID

contentid = 'contentid_example' # String | Content ID

body = SwaggerClient::MainDeleteContentFromCollectionBody.new # MainDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id')


begin
#Deletes a content from a collection
result = api_instance.collections_coluuid_contents_delete(coluuid, contentid, body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_contents_delete: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringCollection ID
contentidStringContent ID
bodyMainDeleteContentFromCollectionBodyVariable to use when filtering for files (must be either 'path' or 'content_id')

Return type

String

Authorization

bearerAuth

HTTP request headers

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

collections_coluuid_delete

collections_coluuid_delete(coluuid)

Deletes a collection

This endpoint is used to delete an existing collection.

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | Collection ID


begin
#Deletes a collection
api_instance.collections_coluuid_delete(coluuid)
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_delete: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringCollection ID

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

collections_coluuid_get

String collections_coluuid_get(coluuid, opts)

Get contents in a collection

This endpoint is used to get contents in a collection. If no colpath query param is passed

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | coluuid

opts = {
dir: 'dir_example' # String | Directory
}

begin
#Get contents in a collection
result = api_instance.collections_coluuid_get(coluuid, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_get: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringcoluuid
dirStringDirectory[optional]

Return type

String

Authorization

bearerAuth

HTTP request headers

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

collections_coluuid_post

Hash<String, String> collections_coluuid_post(coluuid, content_i_ds)

Add contents to a collection

This endpoint adds already-pinned contents (that have ContentIDs) to a collection.

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | coluuid

content_i_ds = [SwaggerClient::Array<Integer>.new] # Array<Integer> | Content IDs to add to collection


begin
#Add contents to a collection
result = api_instance.collections_coluuid_post(coluuid, content_i_ds)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringcoluuid
content_i_dsArray<Integer>Content IDs to add to collection

Return type

Hash<String, String>

Authorization

bearerAuth

HTTP request headers

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

collections_fs_add_post

collections_fs_add_post(coluuid, content, path)

Add a file to a collection

This endpoint adds a file to a collection

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::CollectionsApi.new

coluuid = 'coluuid_example' # String | Collection ID

content = 'content_example' # String | Content

path = 'path_example' # String | Path to file


begin
#Add a file to a collection
api_instance.collections_fs_add_post(coluuid, content, path)
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_fs_add_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
coluuidStringCollection ID
contentStringContent
pathStringPath to file

Return type

nil (empty response body)

Authorization

bearerAuth

HTTP request headers

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

collections_get

Array<CollectionsCollection> collections_get

List all collections

This endpoint is used to list all collections. Whenever a user logs on estuary, it will list all collections that the user has access to. This endpoint provides a way to list all collections to the 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::CollectionsApi.new

begin
#List all collections
result = api_instance.collections_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_get: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Array<CollectionsCollection>

Authorization

bearerAuth

HTTP request headers

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

collections_post

CollectionsCollection collections_post(body)

Create a new collection

This endpoint is used to create a new collection. A collection is a representaion of a group of objects added on the estuary. This endpoint can be used to create a new collection.

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::CollectionsApi.new

body = SwaggerClient::MainCreateCollectionBody.new # MainCreateCollectionBody | Collection name and description


begin
#Create a new collection
result = api_instance.collections_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_post: #{e}"
end

Parameters

NameTypeDescriptionNotes
bodyMainCreateCollectionBodyCollection name and description

Return type

CollectionsCollection

Authorization

bearerAuth

HTTP request headers

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