API for interacting with the CBRAIN Platform
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 6.2.0.1
- Build package: io.swagger.codegen.languages.PhpClientCodegen
- Swagger specification: https://app.swaggerhub.com/apis/prioux/CBRAIN/6.2.0.1
For more information, please visit https://github.com/aces/cbrain
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json:
{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/aces/cbrain-php-client.git"
    }
  ],
  "require": {
    "aces/cbrain-php-client": "dev-main"
  }
}
Then run composer install
Download the files and include autoload.php:
    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?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\BourreauxApi(
    // 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->bourreauxGet($page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BourreauxApi->bourreauxGet: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to http://localhost:3000
| Class | Method | HTTP request | Description | 
|---|---|---|---|
| BourreauxApi | bourreauxGet | GET /bourreaux | Get a list of the Bourreaux available to be used by the current user. | 
| BourreauxApi | bourreauxIdGet | GET /bourreaux/{id} | Get information about a Bourreau. | 
| DataProvidersApi | dataProvidersGet | GET /data_providers | Get a list of the Data Providers available to the current user. | 
| DataProvidersApi | dataProvidersIdBrowseGet | GET /data_providers/{id}/browse | List the files on a Data Provider. | 
| DataProvidersApi | dataProvidersIdDeletePost | POST /data_providers/{id}/delete | Deletes unregistered files from a CBRAIN Data provider. | 
| DataProvidersApi | dataProvidersIdGet | GET /data_providers/{id} | Get information on a particular Data Provider. | 
| DataProvidersApi | dataProvidersIdIsAliveGet | GET /data_providers/{id}/is_alive | Pings a Data Provider to check if it is running. | 
| DataProvidersApi | dataProvidersIdRegisterPost | POST /data_providers/{id}/register | Registers a file as a Userfile in CBRAIN. | 
| DataProvidersApi | dataProvidersIdUnregisterPost | POST /data_providers/{id}/unregister | Unregisters files as Userfile in CBRAIN. | 
| GroupsApi | groupsGet | GET /groups | Get a list of the Groups (projects) available to the current user. | 
| GroupsApi | groupsIdDelete | DELETE /groups/{id} | Deletes a Group (project). | 
| GroupsApi | groupsIdGet | GET /groups/{id} | Get information on a Group (project). | 
| GroupsApi | groupsIdPut | PUT /groups/{id} | Update the properties of a Group (project). | 
| GroupsApi | groupsPost | POST /groups | Creates a new Group. | 
| SessionsApi | sessionDelete | DELETE /session | Destroy the current session | 
| SessionsApi | sessionGet | GET /session | Get session information | 
| SessionsApi | sessionPost | POST /session | Create a new session | 
| TagsApi | tagsGet | GET /tags | Get a list of the tags currently in CBRAIN. | 
| TagsApi | tagsIdDelete | DELETE /tags/{id} | Delete a tag. | 
| TagsApi | tagsIdGet | GET /tags/{id} | Get one tag. | 
| TagsApi | tagsIdPut | PUT /tags/{id} | Update a tag. | 
| TagsApi | tagsPost | POST /tags | Create a new tag. | 
| TasksApi | tasksGet | GET /tasks | Get the list of Tasks. | 
| TasksApi | tasksIdGet | GET /tasks/{id} | Get information on a Task. | 
| TasksApi | tasksPost | POST /tasks | Create a new Task. | 
| ToolConfigsApi | toolConfigsGet | GET /tool_configs | Get a list of tool versions installed. | 
| ToolConfigsApi | toolConfigsIdGet | GET /tool_configs/{id} | Get information about a particular tool configuration | 
| ToolsApi | toolsGet | GET /tools | Get the list of Tools. | 
| UserfilesApi | userfilesChangeProviderPost | POST /userfiles/change_provider | Moves the Userfiles from their current Data Provider to a new one. | 
| UserfilesApi | userfilesCompressPost | POST /userfiles/compress | Compresses many Userfiles each into their own GZIP archive. | 
| UserfilesApi | userfilesDeleteFilesDelete | DELETE /userfiles/delete_files | Delete several files that have been registered as Userfiles | 
| UserfilesApi | userfilesDownloadPost | POST /userfiles/download | Download several files | 
| UserfilesApi | userfilesGet | GET /userfiles | List of the Userfiles accessible to the current user. | 
| UserfilesApi | userfilesIdContentGet | GET /userfiles/{id}/content | Get the content of a Userfile | 
| UserfilesApi | userfilesIdGet | GET /userfiles/{id} | Get information on a Userfile. | 
| UserfilesApi | userfilesIdPut | PUT /userfiles/{id} | Update information on a Userfile. | 
| UserfilesApi | userfilesPost | POST /userfiles | Creates a new Userfile and upload its content. | 
| UserfilesApi | userfilesSyncMultiplePost | POST /userfiles/sync_multiple | Syncs Userfiles to the local Data Providers cache. | 
| UserfilesApi | userfilesUncompressPost | POST /userfiles/uncompress | Uncompresses many Userfiles. | 
| UsersApi | usersGet | GET /users | Returns all of the users in CBRAIN. Only available to admins. | 
| UsersApi | usersIdDelete | DELETE /users/{id} | Deletes a CBRAIN user | 
| UsersApi | usersIdGet | GET /users/{id} | Returns information about a user | 
| UsersApi | usersIdPatch | PATCH /users/{id} | Update information about a user | 
| UsersApi | usersPost | POST /users | Create a new user in CBRAIN. Only available to admins. | 
- Bourreau
- CbrainTask
- CbrainTaskModReq
- DataProvider
- FileInfo
- Group
- GroupModReq
- MultiRegistrationModReq
- MultiUserfilesModReq
- RegistrationInfo
- SessionInfo
- Tag
- TagModReq
- Tool
- ToolConfig
- User
- UserModReq
- Userfile
- UserfileModReq
- Type: API key
- API key parameter name: cbrain_api_token
- Location: URL query string
The CBRAIN Team