Skip to content

Latest commit

 

History

History
290 lines (206 loc) · 10.4 KB

GroupsApi.md

File metadata and controls

290 lines (206 loc) · 10.4 KB

Swagger\Client\GroupsApi

All URIs are relative to http://localhost:3000

Method HTTP request Description
groupsGet GET /groups Get a list of the Groups (projects) available to the current user.
groupsIdDelete DELETE /groups/{id} Deletes a Group (project).
groupsIdGet GET /groups/{id} Get information on a Group (project).
groupsIdPut PUT /groups/{id} Update the properties of a Group (project).
groupsPost POST /groups Creates a new Group.

groupsGet

\Swagger\Client\Model\Group[] groupsGet($page, $per_page)

Get a list of the Groups (projects) available to the current user.

This method returns a list of all of the groups that the current user has access to.

Example

<?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\GroupsApi(
    // 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->groupsGet($page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->groupsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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]

Return type

\Swagger\Client\Model\Group[]

Authorization

BrainPortalSession

HTTP request headers

  • 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]

groupsIdDelete

groupsIdDelete($id)

Deletes a Group (project).

This method allows the removal of Groups (projects) that are no longer necessary. Groups that have Userfiles associated with them may not be deleted.

Example

<?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\GroupsApi(
    // 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 | ID of the Group to delete.

try {
    $apiInstance->groupsIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->groupsIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of the Group to delete.

Return type

void (empty response body)

Authorization

BrainPortalSession

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

groupsIdGet

\Swagger\Client\Model\Group groupsIdGet($id)

Get information on a Group (project).

This method returns information on a single Group (project), specified by the ID parameter. Information returned includes the list of Users who are members of the group, the ID of the Site the Group is part of, and whether or not the group is visible to Regular Users.

Example

<?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\GroupsApi(
    // 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 | ID of the Group to get information on.

try {
    $result = $apiInstance->groupsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->groupsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of the Group to get information on.

Return type

\Swagger\Client\Model\Group

Authorization

BrainPortalSession

HTTP request headers

  • 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]

groupsIdPut

groupsIdPut($id, $group_mod_req)

Update the properties of a Group (project).

This method allows the properties of a Group (project) to be updated. This includes the User membership, the ID of the site the Group belongs to, and the visibility status of the group to Regular Users.

Example

<?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\GroupsApi(
    // 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 | ID of the Group
$group_mod_req = new \Swagger\Client\Model\GroupModReq(); // \Swagger\Client\Model\GroupModReq | An object with the group information to update

try {
    $apiInstance->groupsIdPut($id, $group_mod_req);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->groupsIdPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of the Group
group_mod_req \Swagger\Client\Model\GroupModReq An object with the group information to update

Return type

void (empty response body)

Authorization

BrainPortalSession

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

groupsPost

\Swagger\Client\Model\Group groupsPost($group_mod_req)

Creates a new Group.

This method creates a new Group, which allows users to organize their files and tasks.

Example

<?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\GroupsApi(
    // 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
);
$group_mod_req = new \Swagger\Client\Model\GroupModReq(); // \Swagger\Client\Model\GroupModReq | An object describing the group to create

try {
    $result = $apiInstance->groupsPost($group_mod_req);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->groupsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
group_mod_req \Swagger\Client\Model\GroupModReq An object describing the group to create

Return type

\Swagger\Client\Model\Group

Authorization

BrainPortalSession

HTTP request headers

  • 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]