All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
userfilesChangeProviderPost | POST /userfiles/change_provider | Moves the Userfiles from their current Data Provider to a new one. |
userfilesCompressPost | POST /userfiles/compress | Compresses many Userfiles each into their own GZIP archive. |
userfilesDeleteFilesDelete | DELETE /userfiles/delete_files | Delete several files that have been registered as Userfiles |
userfilesDownloadPost | POST /userfiles/download | Download several files |
userfilesGet | GET /userfiles | List of the Userfiles accessible to the current user. |
userfilesIdContentGet | GET /userfiles/{id}/content | Get the content of a Userfile |
userfilesIdGet | GET /userfiles/{id} | Get information on a Userfile. |
userfilesIdPut | PUT /userfiles/{id} | Update information on a Userfile. |
userfilesPost | POST /userfiles | Creates a new Userfile and upload its content. |
userfilesSyncMultiplePost | POST /userfiles/sync_multiple | Syncs Userfiles to the local Data Providers cache. |
userfilesUncompressPost | POST /userfiles/uncompress | Uncompresses many Userfiles. |
userfilesChangeProviderPost($multi_userfile_mod_req)
Moves the Userfiles from their current Data Provider to a new one.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to move.
try {
$apiInstance->userfilesChangeProviderPost($multi_userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesChangeProviderPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to move. |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userfilesCompressPost($multi_userfile_mod_req)
Compresses many Userfiles each into their own GZIP archive.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to compress.
try {
$apiInstance->userfilesCompressPost($multi_userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesCompressPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to compress. |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userfilesDeleteFilesDelete($multi_userfile_mod_req)
Delete several files that have been registered as Userfiles
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to destroy.
try {
$apiInstance->userfilesDeleteFilesDelete($multi_userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesDeleteFilesDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to destroy. |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\SplFileObject userfilesDownloadPost($multi_userfile_mod_req)
Download several files
This method compresses several Userfiles in .gz format and prepares them to be downloaded.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to be downloaded. If more than one file is specified, they will be zipped into a gzip archive.
try {
$result = $apiInstance->userfilesDownloadPost($multi_userfile_mod_req);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesDownloadPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to be downloaded. If more than one file is specified, they will be zipped into a gzip archive. |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/*, text/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Userfile[] userfilesGet($page, $per_page)
List of the Userfiles accessible to the current user.
This method returns a list of Userfiles that are available to the current User.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 56; // int | Page number when paginating. See also the per_page parameter
$per_page = 56; // int | Size of each page when paginating. See also the page parameter
try {
$result = $apiInstance->userfilesGet($page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
page | int | Page number when paginating. See also the per_page parameter | [optional] |
per_page | int | Size of each page when paginating. See also the page parameter | [optional] |
\Swagger\Client\Model\Userfile[]
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\SplFileObject userfilesIdContentGet($id)
Get the content of a Userfile
This method allows you to download the content of a userfile.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int | The ID number of the Userfile to download
try {
$result = $apiInstance->userfilesIdContentGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesIdContentGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID number of the Userfile to download |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/*, text/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Userfile userfilesIdGet($id)
Get information on a Userfile.
This method returns information about a single Userfile, specified by its ID. Information returned includes the ID of the owner, the Group (project) it is a part of, a description, information about where the acutal copy of the file currently is, and what the status is of any synhronization operations that may have been requested.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int | The ID number of the Userfile to get information on.
try {
$result = $apiInstance->userfilesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID number of the Userfile to get information on. |
\Swagger\Client\Model\Userfile
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userfilesIdPut($id, $userfile_mod_req)
Update information on a Userfile.
This method allows a User to update information on a userfile.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 789; // int | The ID number of the Userfile to update.
$userfile_mod_req = new \Swagger\Client\Model\UserfileModReq(); // \Swagger\Client\Model\UserfileModReq |
try {
$apiInstance->userfilesIdPut($id, $userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID number of the Userfile to update. | |
userfile_mod_req | \Swagger\Client\Model\UserfileModReq |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object userfilesPost($upload_file, $data_provider_id, $userfile_group_id, $file_type, $_do_extract, $_up_ex_mode)
Creates a new Userfile and upload its content.
This method creates a new Userfile in CBRAIN, with the current user as the owner of the file.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$upload_file = "/path/to/file.txt"; // \SplFileObject | File content to upload to CBRAIN
$data_provider_id = 56; // int | The ID of the Data Provider to upload the file to.
$userfile_group_id = 56; // int | ID of the group that will have access to the Userfile
$file_type = "SingleFile"; // string | The type of the file
$_do_extract = "_do_extract_example"; // string | set to the string 'on' to indicate that the uploaded content is a tar.gz or .zip archive that need to be extracted. See also the parameter _up_ex_mode
$_up_ex_mode = "_up_ex_mode_example"; // string | if '_do_extract' is set to 'on', set this to 'collection' to create a single collection, or 'multiple' to create one file per entry in the uploaded content
try {
$result = $apiInstance->userfilesPost($upload_file, $data_provider_id, $userfile_group_id, $file_type, $_do_extract, $_up_ex_mode);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
upload_file | \SplFileObject | File content to upload to CBRAIN | |
data_provider_id | int | The ID of the Data Provider to upload the file to. | |
userfile_group_id | int | ID of the group that will have access to the Userfile | |
file_type | string | The type of the file | [default to SingleFile] |
_do_extract | string | set to the string 'on' to indicate that the uploaded content is a tar.gz or .zip archive that need to be extracted. See also the parameter _up_ex_mode | [optional] |
_up_ex_mode | string | if '_do_extract' is set to 'on', set this to 'collection' to create a single collection, or 'multiple' to create one file per entry in the uploaded content | [optional] |
object
- Content-Type: multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userfilesSyncMultiplePost($multi_userfile_mod_req)
Syncs Userfiles to the local Data Providers cache.
Synchronizing files to their the local cache allows you to download, visualize and do processing on them that is not available if not synced. CBRAIN operations will sync files automatically, and this is only necessary if a file is changed on its host Data Provdier by an external process.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to synchronize.
try {
$apiInstance->userfilesSyncMultiplePost($multi_userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesSyncMultiplePost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to synchronize. |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userfilesUncompressPost($multi_userfile_mod_req)
Uncompresses many Userfiles.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BrainPortalSession
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserfilesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$multi_userfile_mod_req = new \Swagger\Client\Model\MultiUserfilesModReq(); // \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to uncompress.
try {
$apiInstance->userfilesUncompressPost($multi_userfile_mod_req);
} catch (Exception $e) {
echo 'Exception when calling UserfilesApi->userfilesUncompressPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
multi_userfile_mod_req | \Swagger\Client\Model\MultiUserfilesModReq | The IDs of the files to uncompress. |
void (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]