|
| 1 | +# SwaggerClient-php |
| 2 | +API for interacting with the CBRAIN Platform |
| 3 | + |
| 4 | +This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: |
| 5 | + |
| 6 | +- API version: 6.2.0.1 |
| 7 | +- Build package: io.swagger.codegen.languages.PhpClientCodegen |
| 8 | +For more information, please visit [https://github.com/aces/cbrain](https://github.com/aces/cbrain) |
| 9 | + |
| 10 | +## Requirements |
| 11 | + |
| 12 | +PHP 5.5 and later |
| 13 | + |
| 14 | +## Installation & Usage |
| 15 | +### Composer |
| 16 | + |
| 17 | +To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: |
| 18 | + |
| 19 | +``` |
| 20 | +{ |
| 21 | + "repositories": [ |
| 22 | + { |
| 23 | + "type": "git", |
| 24 | + "url": "https://github.com//aces/cbrain-php-client.git" |
| 25 | + } |
| 26 | + ], |
| 27 | + "require": { |
| 28 | + "/aces/cbrain-php-client": "*@dev" |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +Then run `composer install` |
| 34 | + |
| 35 | +### Manual Installation |
| 36 | + |
| 37 | +Download the files and include `autoload.php`: |
| 38 | + |
| 39 | +```php |
| 40 | + require_once('/path/to/SwaggerClient-php/vendor/autoload.php'); |
| 41 | +``` |
| 42 | + |
| 43 | +## Tests |
| 44 | + |
| 45 | +To run the unit tests: |
| 46 | + |
| 47 | +``` |
| 48 | +composer install |
| 49 | +./vendor/bin/phpunit |
| 50 | +``` |
| 51 | + |
| 52 | +## Getting Started |
| 53 | + |
| 54 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 55 | + |
| 56 | +```php |
| 57 | +<?php |
| 58 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 59 | + |
| 60 | +// Configure API key authorization: BrainPortalSession |
| 61 | +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY'); |
| 62 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 63 | +// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer'); |
| 64 | + |
| 65 | +$apiInstance = new Swagger\Client\Api\BourreauxApi( |
| 66 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 67 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 68 | + new GuzzleHttp\Client(), |
| 69 | + $config |
| 70 | +); |
| 71 | +$page = 56; // int | Page number when paginating. See also the per_page parameter |
| 72 | +$per_page = 56; // int | Size of each page when paginating. See also the page parameter |
| 73 | + |
| 74 | +try { |
| 75 | + $result = $apiInstance->bourreauxGet($page, $per_page); |
| 76 | + print_r($result); |
| 77 | +} catch (Exception $e) { |
| 78 | + echo 'Exception when calling BourreauxApi->bourreauxGet: ', $e->getMessage(), PHP_EOL; |
| 79 | +} |
| 80 | + |
| 81 | +?> |
| 82 | +``` |
| 83 | + |
| 84 | +## Documentation for API Endpoints |
| 85 | + |
| 86 | +All URIs are relative to *http://localhost:3000* |
| 87 | + |
| 88 | +Class | Method | HTTP request | Description |
| 89 | +------------ | ------------- | ------------- | ------------- |
| 90 | +*BourreauxApi* | [**bourreauxGet**](docs/Api/BourreauxApi.md#bourreauxget) | **GET** /bourreaux | Get a list of the Bourreaux available to be used by the current user. |
| 91 | +*BourreauxApi* | [**bourreauxIdGet**](docs/Api/BourreauxApi.md#bourreauxidget) | **GET** /bourreaux/{id} | Get information about a Bourreau. |
| 92 | +*DataProvidersApi* | [**dataProvidersGet**](docs/Api/DataProvidersApi.md#dataprovidersget) | **GET** /data_providers | Get a list of the Data Providers available to the current user. |
| 93 | +*DataProvidersApi* | [**dataProvidersIdBrowseGet**](docs/Api/DataProvidersApi.md#dataprovidersidbrowseget) | **GET** /data_providers/{id}/browse | List the files on a Data Provider. |
| 94 | +*DataProvidersApi* | [**dataProvidersIdDeletePost**](docs/Api/DataProvidersApi.md#dataprovidersiddeletepost) | **POST** /data_providers/{id}/delete | Deletes unregistered files from a CBRAIN Data provider. |
| 95 | +*DataProvidersApi* | [**dataProvidersIdGet**](docs/Api/DataProvidersApi.md#dataprovidersidget) | **GET** /data_providers/{id} | Get information on a particular Data Provider. |
| 96 | +*DataProvidersApi* | [**dataProvidersIdIsAliveGet**](docs/Api/DataProvidersApi.md#dataprovidersidisaliveget) | **GET** /data_providers/{id}/is_alive | Pings a Data Provider to check if it is running. |
| 97 | +*DataProvidersApi* | [**dataProvidersIdRegisterPost**](docs/Api/DataProvidersApi.md#dataprovidersidregisterpost) | **POST** /data_providers/{id}/register | Registers a file as a Userfile in CBRAIN. |
| 98 | +*DataProvidersApi* | [**dataProvidersIdUnregisterPost**](docs/Api/DataProvidersApi.md#dataprovidersidunregisterpost) | **POST** /data_providers/{id}/unregister | Unregisters files as Userfile in CBRAIN. |
| 99 | +*GroupsApi* | [**groupsGet**](docs/Api/GroupsApi.md#groupsget) | **GET** /groups | Get a list of the Groups (projects) available to the current user. |
| 100 | +*GroupsApi* | [**groupsIdDelete**](docs/Api/GroupsApi.md#groupsiddelete) | **DELETE** /groups/{id} | Deletes a Group (project). |
| 101 | +*GroupsApi* | [**groupsIdGet**](docs/Api/GroupsApi.md#groupsidget) | **GET** /groups/{id} | Get information on a Group (project). |
| 102 | +*GroupsApi* | [**groupsIdPut**](docs/Api/GroupsApi.md#groupsidput) | **PUT** /groups/{id} | Update the properties of a Group (project). |
| 103 | +*GroupsApi* | [**groupsPost**](docs/Api/GroupsApi.md#groupspost) | **POST** /groups | Creates a new Group. |
| 104 | +*SessionsApi* | [**sessionDelete**](docs/Api/SessionsApi.md#sessiondelete) | **DELETE** /session | Destroy the current session |
| 105 | +*SessionsApi* | [**sessionGet**](docs/Api/SessionsApi.md#sessionget) | **GET** /session | Get session information |
| 106 | +*SessionsApi* | [**sessionPost**](docs/Api/SessionsApi.md#sessionpost) | **POST** /session | Create a new session |
| 107 | +*TagsApi* | [**tagsGet**](docs/Api/TagsApi.md#tagsget) | **GET** /tags | Get a list of the tags currently in CBRAIN. |
| 108 | +*TagsApi* | [**tagsIdDelete**](docs/Api/TagsApi.md#tagsiddelete) | **DELETE** /tags/{id} | Delete a tag. |
| 109 | +*TagsApi* | [**tagsIdGet**](docs/Api/TagsApi.md#tagsidget) | **GET** /tags/{id} | Get one tag. |
| 110 | +*TagsApi* | [**tagsIdPut**](docs/Api/TagsApi.md#tagsidput) | **PUT** /tags/{id} | Update a tag. |
| 111 | +*TagsApi* | [**tagsPost**](docs/Api/TagsApi.md#tagspost) | **POST** /tags | Create a new tag. |
| 112 | +*TasksApi* | [**tasksGet**](docs/Api/TasksApi.md#tasksget) | **GET** /tasks | Get the list of Tasks. |
| 113 | +*TasksApi* | [**tasksIdGet**](docs/Api/TasksApi.md#tasksidget) | **GET** /tasks/{id} | Get information on a Task. |
| 114 | +*TasksApi* | [**tasksPost**](docs/Api/TasksApi.md#taskspost) | **POST** /tasks | Create a new Task. |
| 115 | +*ToolConfigsApi* | [**toolConfigsGet**](docs/Api/ToolConfigsApi.md#toolconfigsget) | **GET** /tool_configs | Get a list of tool versions installed. |
| 116 | +*ToolConfigsApi* | [**toolConfigsIdGet**](docs/Api/ToolConfigsApi.md#toolconfigsidget) | **GET** /tool_configs/{id} | Get information about a particular tool configuration |
| 117 | +*ToolsApi* | [**toolsGet**](docs/Api/ToolsApi.md#toolsget) | **GET** /tools | Get the list of Tools. |
| 118 | +*UserfilesApi* | [**userfilesChangeProviderPost**](docs/Api/UserfilesApi.md#userfileschangeproviderpost) | **POST** /userfiles/change_provider | Moves the Userfiles from their current Data Provider to a new one. |
| 119 | +*UserfilesApi* | [**userfilesCompressPost**](docs/Api/UserfilesApi.md#userfilescompresspost) | **POST** /userfiles/compress | Compresses many Userfiles each into their own GZIP archive. |
| 120 | +*UserfilesApi* | [**userfilesDeleteFilesDelete**](docs/Api/UserfilesApi.md#userfilesdeletefilesdelete) | **DELETE** /userfiles/delete_files | Delete several files that have been registered as Userfiles |
| 121 | +*UserfilesApi* | [**userfilesDownloadPost**](docs/Api/UserfilesApi.md#userfilesdownloadpost) | **POST** /userfiles/download | Download several files |
| 122 | +*UserfilesApi* | [**userfilesGet**](docs/Api/UserfilesApi.md#userfilesget) | **GET** /userfiles | List of the Userfiles accessible to the current user. |
| 123 | +*UserfilesApi* | [**userfilesIdContentGet**](docs/Api/UserfilesApi.md#userfilesidcontentget) | **GET** /userfiles/{id}/content | Get the content of a Userfile |
| 124 | +*UserfilesApi* | [**userfilesIdGet**](docs/Api/UserfilesApi.md#userfilesidget) | **GET** /userfiles/{id} | Get information on a Userfile. |
| 125 | +*UserfilesApi* | [**userfilesIdPut**](docs/Api/UserfilesApi.md#userfilesidput) | **PUT** /userfiles/{id} | Update information on a Userfile. |
| 126 | +*UserfilesApi* | [**userfilesPost**](docs/Api/UserfilesApi.md#userfilespost) | **POST** /userfiles | Creates a new Userfile and upload its content. |
| 127 | +*UserfilesApi* | [**userfilesSyncMultiplePost**](docs/Api/UserfilesApi.md#userfilessyncmultiplepost) | **POST** /userfiles/sync_multiple | Syncs Userfiles to the local Data Providers cache. |
| 128 | +*UserfilesApi* | [**userfilesUncompressPost**](docs/Api/UserfilesApi.md#userfilesuncompresspost) | **POST** /userfiles/uncompress | Uncompresses many Userfiles. |
| 129 | +*UsersApi* | [**usersGet**](docs/Api/UsersApi.md#usersget) | **GET** /users | Returns all of the users in CBRAIN. Only available to admins. |
| 130 | +*UsersApi* | [**usersIdDelete**](docs/Api/UsersApi.md#usersiddelete) | **DELETE** /users/{id} | Deletes a CBRAIN user |
| 131 | +*UsersApi* | [**usersIdGet**](docs/Api/UsersApi.md#usersidget) | **GET** /users/{id} | Returns information about a user |
| 132 | +*UsersApi* | [**usersIdPatch**](docs/Api/UsersApi.md#usersidpatch) | **PATCH** /users/{id} | Update information about a user |
| 133 | +*UsersApi* | [**usersPost**](docs/Api/UsersApi.md#userspost) | **POST** /users | Create a new user in CBRAIN. Only available to admins. |
| 134 | + |
| 135 | + |
| 136 | +## Documentation For Models |
| 137 | + |
| 138 | + - [Bourreau](docs/Model/Bourreau.md) |
| 139 | + - [CbrainTask](docs/Model/CbrainTask.md) |
| 140 | + - [CbrainTaskModReq](docs/Model/CbrainTaskModReq.md) |
| 141 | + - [DataProvider](docs/Model/DataProvider.md) |
| 142 | + - [FileInfo](docs/Model/FileInfo.md) |
| 143 | + - [Group](docs/Model/Group.md) |
| 144 | + - [GroupModReq](docs/Model/GroupModReq.md) |
| 145 | + - [MultiRegistrationModReq](docs/Model/MultiRegistrationModReq.md) |
| 146 | + - [MultiUserfilesModReq](docs/Model/MultiUserfilesModReq.md) |
| 147 | + - [RegistrationInfo](docs/Model/RegistrationInfo.md) |
| 148 | + - [SessionInfo](docs/Model/SessionInfo.md) |
| 149 | + - [Tag](docs/Model/Tag.md) |
| 150 | + - [TagModReq](docs/Model/TagModReq.md) |
| 151 | + - [Tool](docs/Model/Tool.md) |
| 152 | + - [ToolConfig](docs/Model/ToolConfig.md) |
| 153 | + - [User](docs/Model/User.md) |
| 154 | + - [UserModReq](docs/Model/UserModReq.md) |
| 155 | + - [Userfile](docs/Model/Userfile.md) |
| 156 | + - [UserfileModReq](docs/Model/UserfileModReq.md) |
| 157 | + |
| 158 | + |
| 159 | +## Documentation For Authorization |
| 160 | + |
| 161 | + |
| 162 | +## BrainPortalSession |
| 163 | + |
| 164 | +- **Type**: API key |
| 165 | +- **API key parameter name**: cbrain_api_token |
| 166 | +- **Location**: URL query string |
| 167 | + |
| 168 | + |
| 169 | +## Author |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
0 commit comments