EstuaryClient.CollectionsApi
All URIs are relative to //api.estuary.tech/
Method | HTTP request | Description |
---|---|---|
collectionsColuuidCommitPost | POST /collections/{coluuid}/commit | Produce a CID of the collection contents |
collectionsColuuidContentsDelete | DELETE /collections/{coluuid}/contents | Deletes a content from a collection |
collectionsColuuidDelete | DELETE /collections/{coluuid} | Deletes a collection |
collectionsColuuidGet | GET /collections/{coluuid} | Get contents in a collection |
collectionsColuuidPost | POST /collections/{coluuid} | Add contents to a collection |
collectionsFsAddPost | POST /collections/fs/add | Add a file to a collection |
collectionsGet | GET /collections/ | List all collections |
collectionsPost | POST /collections/ | Create a new collection |
collectionsColuuidCommitPost
'String' collectionsColuuidCommitPost(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
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let coluuid = "coluuid_example"; // String | coluuid
apiInstance.collectionsColuuidCommitPost(coluuid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | String | coluuid |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
collectionsColuuidContentsDelete
'String' collectionsColuuidContentsDelete(body, coluuid)
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
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let body = new EstuaryClient.ApiDeleteContentFromCollectionBody(); // ApiDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id')
let coluuid = "coluuid_example"; // String | Collection ID
apiInstance.collectionsColuuidContentsDelete(body, coluuid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | ApiDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id') | |
coluuid | String | Collection ID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
collectionsColuuidDelete
'String' collectionsColuuidDelete(coluuid)
Deletes a collection
This endpoint is used to delete an existing collection.
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let coluuid = "coluuid_example"; // String | Collection ID
apiInstance.collectionsColuuidDelete(coluuid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | String | Collection ID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
collectionsColuuidGet
[CollectionsCollectionListResponse] collectionsColuuidGet(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
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let coluuid = "coluuid_example"; // String | coluuid
let opts = {
'dir': "dir_example" // String | Directory
};
apiInstance.collectionsColuuidGet(coluuid, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | String | coluuid | |
dir | String | Directory | [optional] |
Return type
[CollectionsCollectionListResponse]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
collectionsColuuidPost
'String' collectionsColuuidPost(body, coluuid, opts)
Add contents to a collection
This endpoint adds already-pinned contents (that have ContentIDs) to a collection.
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let body = [3.4]; // [Number] | Content IDs to add to collection
let coluuid = "coluuid_example"; // String | Collection UUID
let opts = {
'dir': "dir_example", // String | Directory
'overwrite': "overwrite_example" // String | Overwrite conflicting files
};
apiInstance.collectionsColuuidPost(body, coluuid, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | [Number] | Content IDs to add to collection | |
coluuid | String | Collection UUID | |
dir | String | Directory | [optional] |
overwrite | String | Overwrite conflicting files | [optional] |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
collectionsFsAddPost
'String' collectionsFsAddPost(coluuid, content, opts)
Add a file to a collection
This endpoint adds a file to a collection
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let coluuid = "coluuid_example"; // String | Collection ID
let content = "content_example"; // String | Content
let opts = {
'dir': "dir_example", // String | Directory inside collection
'overwrite': "overwrite_example" // String | Overwrite file if already exists in path
};
apiInstance.collectionsFsAddPost(coluuid, content, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
coluuid | String | Collection ID | |
content | String | Content | |
dir | String | Directory inside collection | [optional] |
overwrite | String | Overwrite file if already exists in path | [optional] |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
collectionsGet
[CollectionsCollection] collectionsGet()
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
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
apiInstance.collectionsGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
collectionsPost
CollectionsCollection collectionsPost(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
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
let apiInstance = new EstuaryClient.CollectionsApi();
let body = new EstuaryClient.ApiCreateCollectionBody(); // ApiCreateCollectionBody | Collection name and description
apiInstance.collectionsPost(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | ApiCreateCollectionBody | Collection name and description |
Return type
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json