Skip to content

Latest commit

 

History

History
414 lines (306 loc) · 14.5 KB

StudysetsApi.md

File metadata and controls

414 lines (306 loc) · 14.5 KB

neurostore_sdk.StudysetsApi

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

Method HTTP request Description
studysets_get GET /studysets/ GET a list of studysets
studysets_id_delete DELETE /studysets/{id} DELETE a studyset
studysets_id_get GET /studysets/{id} GET a studyset
studysets_id_put PUT /studysets/{id} PUT/update a studyset
studysets_post POST /studysets/ POST/create a studyset

studysets_get

StudysetList studysets_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, nested=nested, name=name, description=description, source_id=source_id, unique=unique, source=source, authors=authors, user_id=user_id)

GET a list of studysets

Get a list of studysets.

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.models.studyset_list import StudysetList
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.StudysetsApi(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)
    nested = True # bool | whether to show the URI to a resource (false) or to embed the object in the response (true) (optional)
    name = 'name_example' # str | search the name field for a term (optional)
    description = 'description_example' # str | search description field for a term (optional)
    source_id = '1234567890ab' # str | id of the resource you are either filtering/copying on (optional)
    unique = None # object | whether to list clones with originals (optional)
    source = 'neurostore' # str | the source of the resource you would like to filter/copy from (optional) (default to 'neurostore')
    authors = 'authors_example' # str | search authors (optional)
    user_id = 'user_id_example' # str | user id you want to filter by (optional)

    try:
        # GET a list of studysets
        api_response = api_instance.studysets_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, nested=nested, name=name, description=description, source_id=source_id, unique=unique, source=source, authors=authors, user_id=user_id)
        print("The response of StudysetsApi->studysets_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling StudysetsApi->studysets_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]
nested bool whether to show the URI to a resource (false) or to embed the object in the response (true) [optional]
name str search the name field for a term [optional]
description str search description field for a term [optional]
source_id str id of the resource you are either filtering/copying on [optional]
unique object whether to list clones with originals [optional]
source str the source of the resource you would like to filter/copy from [optional] [default to 'neurostore']
authors str search authors [optional]
user_id str user id you want to filter by [optional]

Return type

StudysetList

Authorization

JSON-Web-Token

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]

studysets_id_delete

studysets_id_delete(id)

DELETE a studyset

delete a studyset

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
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.StudysetsApi(api_client)
    id = 'id_example' # str | 

    try:
        # DELETE a studyset
        api_instance.studysets_id_delete(id)
    except Exception as e:
        print("Exception when calling StudysetsApi->studysets_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]

studysets_id_get

StudysetReturn studysets_id_get(id, nested=nested, gzip=gzip)

GET a studyset

Retrieve the information of a studyset with the matching studyset ID.

Example

import time
import os
import neurostore_sdk
from neurostore_sdk.models.studyset_return import StudysetReturn
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.StudysetsApi(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)
    gzip = True # bool | return the content as gzipped content (optional)

    try:
        # GET a studyset
        api_response = api_instance.studysets_id_get(id, nested=nested, gzip=gzip)
        print("The response of StudysetsApi->studysets_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling StudysetsApi->studysets_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]
gzip bool return the content as gzipped content [optional]

Return type

StudysetReturn

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 studyset found -
404 Example response -

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

studysets_id_put

StudysetReturn studysets_id_put(id, studyset_request=studyset_request)

PUT/update a studyset

Update a studyset.

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.models.studyset_request import StudysetRequest
from neurostore_sdk.models.studyset_return import StudysetReturn
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.StudysetsApi(api_client)
    id = 'id_example' # str | 
    studyset_request = neurostore_sdk.StudysetRequest() # StudysetRequest |  (optional)

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

Parameters

Name Type Description Notes
id str
studyset_request StudysetRequest [optional]

Return type

StudysetReturn

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 Example response -

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

studysets_post

StudysetReturn studysets_post(studyset_request=studyset_request)

POST/create a studyset

Create a studyset.

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.models.studyset_request import StudysetRequest
from neurostore_sdk.models.studyset_return import StudysetReturn
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.StudysetsApi(api_client)
    studyset_request = neurostore_sdk.StudysetRequest() # StudysetRequest |  (optional)

    try:
        # POST/create a studyset
        api_response = api_instance.studysets_post(studyset_request=studyset_request)
        print("The response of StudysetsApi->studysets_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling StudysetsApi->studysets_post: %s\n" % e)

Parameters

Name Type Description Notes
studyset_request StudysetRequest [optional]

Return type

StudysetReturn

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]