All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
tags_get | GET /tags | Get a list of the tags currently in CBRAIN. |
tags_id_delete | DELETE /tags/{id} | Delete a tag. |
tags_id_get | GET /tags/{id} | Get one tag. |
tags_id_put | PUT /tags/{id} | Update a tag. |
tags_post | POST /tags | Create a new tag. |
Array<Tag> tags_get
Get a list of the tags currently in CBRAIN.
This method returns a list of tag objects.
# load the gem
require 'cbrain_client'
# setup authorization
CbrainClient.configure do |config|
# Configure API key authorization: BrainPortalSession
config.api_key['cbrain_api_token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['cbrain_api_token'] = 'Bearer'
end
api_instance = CbrainClient::TagsApi.new
begin
#Get a list of the tags currently in CBRAIN.
result = api_instance.tags_get
p result
rescue CbrainClient::ApiError => e
puts "Exception when calling TagsApi->tags_get: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
tags_id_delete(id)
Delete a tag.
Delete the tag specified by the ID parameter.
# load the gem
require 'cbrain_client'
# setup authorization
CbrainClient.configure do |config|
# Configure API key authorization: BrainPortalSession
config.api_key['cbrain_api_token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['cbrain_api_token'] = 'Bearer'
end
api_instance = CbrainClient::TagsApi.new
id = 56 # Integer | ID of the tag to delete.
begin
#Delete a tag.
api_instance.tags_id_delete(id)
rescue CbrainClient::ApiError => e
puts "Exception when calling TagsApi->tags_id_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ID of the tag to delete. |
nil (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
Tag tags_id_get(id)
Get one tag.
Returns a single tag with the ID specified.
# load the gem
require 'cbrain_client'
# setup authorization
CbrainClient.configure do |config|
# Configure API key authorization: BrainPortalSession
config.api_key['cbrain_api_token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['cbrain_api_token'] = 'Bearer'
end
api_instance = CbrainClient::TagsApi.new
id = 56 # Integer | The ID of the tag to get.
begin
#Get one tag.
result = api_instance.tags_id_get(id)
p result
rescue CbrainClient::ApiError => e
puts "Exception when calling TagsApi->tags_id_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | The ID of the tag to get. |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
tags_id_put(id, tag_mod_req)
Update a tag.
Update the tag specified by the ID parameter.
# load the gem
require 'cbrain_client'
# setup authorization
CbrainClient.configure do |config|
# Configure API key authorization: BrainPortalSession
config.api_key['cbrain_api_token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['cbrain_api_token'] = 'Bearer'
end
api_instance = CbrainClient::TagsApi.new
id = 56 # Integer | ID of the tag to update.
tag_mod_req = CbrainClient::TagModReq.new # TagModReq |
begin
#Update a tag.
api_instance.tags_id_put(id, tag_mod_req)
rescue CbrainClient::ApiError => e
puts "Exception when calling TagsApi->tags_id_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ID of the tag to update. | |
tag_mod_req | TagModReq |
nil (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml
Tag tags_post(tag_mod_req)
Create a new tag.
Create a new tag in CBRAIN.
# load the gem
require 'cbrain_client'
# setup authorization
CbrainClient.configure do |config|
# Configure API key authorization: BrainPortalSession
config.api_key['cbrain_api_token'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['cbrain_api_token'] = 'Bearer'
end
api_instance = CbrainClient::TagsApi.new
tag_mod_req = CbrainClient::TagModReq.new # TagModReq |
begin
#Create a new tag.
result = api_instance.tags_post(tag_mod_req)
p result
rescue CbrainClient::ApiError => e
puts "Exception when calling TagsApi->tags_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tag_mod_req | TagModReq |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json, application/xml