Skip to content

Latest commit

 

History

History
404 lines (277 loc) · 12.6 KB

File metadata and controls

404 lines (277 loc) · 12.6 KB

neurostore_sdk.TablesApi

All URIs are relative to https://neurostore.org/api

Method HTTP request Description
tables_get GET /tables/ GET list of tables
tables_id_delete DELETE /tables/{id} DELETE a table
tables_id_get GET /tables/{id} GET a table
tables_id_put PUT /tables/{id} PUT/update a table
tables_post POST /tables/ POST/create a table

tables_get

TableList tables_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, paginate=paginate, name=name, description=description, nested=nested)

GET list of tables

List all tables across studies.

Example

import neurostore_sdk
from neurostore_sdk.models.table_list import TableList
from neurostore_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
    host = "https://neurostore.org/api"
)


# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurostore_sdk.TablesApi(api_client)
    search = 'imagin' # str | search for entries that contain the substring (optional)
    sort = 'created_at' # str | Parameter to sort results on (optional) (default to 'created_at')
    page = 56 # int | page of results (optional)
    desc = True # bool | sort results by descending order (as opposed to ascending order) (optional)
    page_size = 56 # int | number of results to show on a page (optional)
    paginate = True # bool | whether to paginate results (true) or return all results at once (false) (optional) (default to True)
    name = 'name_example' # str | search the name field for a term (optional)
    description = 'description_example' # str | search description field for a term (optional)
    nested = True # bool | whether to show the URI to a resource (false) or to embed the object in the response (true) (optional)

    try:
        # GET list of tables
        api_response = api_instance.tables_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, paginate=paginate, name=name, description=description, nested=nested)
        print("The response of TablesApi->tables_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TablesApi->tables_get: %s\n" % e)

Parameters

Name Type Description Notes
search str search for entries that contain the substring [optional]
sort str Parameter to sort results on [optional] [default to 'created_at']
page int page of results [optional]
desc bool sort results by descending order (as opposed to ascending order) [optional]
page_size int number of results to show on a page [optional]
paginate bool whether to paginate results (true) or return all results at once (false) [optional] [default to True]
name str search the name field for a term [optional]
description str search description field for a term [optional]
nested bool whether to show the URI to a resource (false) or to embed the object in the response (true) [optional]

Return type

TableList

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

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

tables_id_delete

tables_id_delete(id)

DELETE a table

delete a table

Example

  • Bearer Authentication (JSON-Web-Token):
import neurostore_sdk
from neurostore_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
    host = "https://neurostore.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurostore_sdk.TablesApi(api_client)
    id = 'id_example' # str | 

    try:
        # DELETE a table
        api_instance.tables_id_delete(id)
    except Exception as e:
        print("Exception when calling TablesApi->tables_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

void (empty response body)

Authorization

JSON-Web-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 OK -

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

tables_id_get

TableReturn tables_id_get(id, nested=nested)

GET a table

Information about a specific table.

Example

import neurostore_sdk
from neurostore_sdk.models.table_return import TableReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
    host = "https://neurostore.org/api"
)


# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurostore_sdk.TablesApi(api_client)
    id = 'id_example' # str | 
    nested = True # bool | whether to show the URI to a resource (false) or to embed the object in the response (true) (optional)

    try:
        # GET a table
        api_response = api_instance.tables_id_get(id, nested=nested)
        print("The response of TablesApi->tables_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TablesApi->tables_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id str
nested bool whether to show the URI to a resource (false) or to embed the object in the response (true) [optional]

Return type

TableReturn

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

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

tables_id_put

TableReturn tables_id_put(id, table_request=table_request)

PUT/update a table

update a table

Example

  • Bearer Authentication (JSON-Web-Token):
import neurostore_sdk
from neurostore_sdk.models.table_request import TableRequest
from neurostore_sdk.models.table_return import TableReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
    host = "https://neurostore.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurostore_sdk.TablesApi(api_client)
    id = 'id_example' # str | 
    table_request = neurostore_sdk.TableRequest() # TableRequest |  (optional)

    try:
        # PUT/update a table
        api_response = api_instance.tables_id_put(id, table_request=table_request)
        print("The response of TablesApi->tables_id_put:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TablesApi->tables_id_put: %s\n" % e)

Parameters

Name Type Description Notes
id str
table_request TableRequest [optional]

Return type

TableReturn

Authorization

JSON-Web-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
422 Unprocessable Entity -

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

tables_post

TableReturn tables_post(table_request=table_request)

POST/create a table

create a table

Example

  • Bearer Authentication (JSON-Web-Token):
import neurostore_sdk
from neurostore_sdk.models.table_request import TableRequest
from neurostore_sdk.models.table_return import TableReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
    host = "https://neurostore.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurostore_sdk.TablesApi(api_client)
    table_request = neurostore_sdk.TableRequest() # TableRequest |  (optional)

    try:
        # POST/create a table
        api_response = api_instance.tables_post(table_request=table_request)
        print("The response of TablesApi->tables_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TablesApi->tables_post: %s\n" % e)

Parameters

Name Type Description Notes
table_request TableRequest [optional]

Return type

TableReturn

Authorization

JSON-Web-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

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