Skip to content

Latest commit

 

History

History
296 lines (211 loc) · 8.54 KB

UsersApi.md

File metadata and controls

296 lines (211 loc) · 8.54 KB

neurosynth_compose_sdk.UsersApi

All URIs are relative to https://compose.neurosynth.org/api

Method HTTP request Description
users_get GET /users GET list of Users
users_id_get GET /users/{id} Get User Info by User ID
users_id_put PUT /users/{id} Update User Information
users_post POST /users Create A New User

users_get

UserList users_get()

GET list of Users

List all users

Example

import time
import os
import neurosynth_compose_sdk
from neurosynth_compose_sdk.models.user_list import UserList
from neurosynth_compose_sdk.rest import ApiException
from pprint import pprint

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


# Enter a context with an instance of the API client
with neurosynth_compose_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurosynth_compose_sdk.UsersApi(api_client)

    try:
        # GET list of Users
        api_response = api_instance.users_get()
        print("The response of UsersApi->users_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

UserList

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]

users_id_get

UserReturn users_id_get(id)

Get User Info by User ID

Retrieve the information of the user with the matching user ID.

Example

import time
import os
import neurosynth_compose_sdk
from neurosynth_compose_sdk.models.user_return import UserReturn
from neurosynth_compose_sdk.rest import ApiException
from pprint import pprint

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


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

    try:
        # Get User Info by User ID
        api_response = api_instance.users_id_get(id)
        print("The response of UsersApi->users_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

UserReturn

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]

users_id_put

UserReturn users_id_put(id, user=user)

Update User Information

update information about a user

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
import neurosynth_compose_sdk
from neurosynth_compose_sdk.models.user import User
from neurosynth_compose_sdk.models.user_return import UserReturn
from neurosynth_compose_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://compose.neurosynth.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurosynth_compose_sdk.Configuration(
    host = "https://compose.neurosynth.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 = neurosynth_compose_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

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

    try:
        # Update User Information
        api_response = api_instance.users_id_put(id, user=user)
        print("The response of UsersApi->users_id_put:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_id_put: %s\n" % e)

Parameters

Name Type Description Notes
id str
user User [optional]

Return type

UserReturn

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]

users_post

UserReturn users_post(user=user)

Create A New User

create a single user

Example

  • Bearer Authentication (JSON-Web-Token):
import time
import os
import neurosynth_compose_sdk
from neurosynth_compose_sdk.models.user import User
from neurosynth_compose_sdk.models.user_return import UserReturn
from neurosynth_compose_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://compose.neurosynth.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurosynth_compose_sdk.Configuration(
    host = "https://compose.neurosynth.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 = neurosynth_compose_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with neurosynth_compose_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = neurosynth_compose_sdk.UsersApi(api_client)
    user = neurosynth_compose_sdk.User() # User |  (optional)

    try:
        # Create A New User
        api_response = api_instance.users_post(user=user)
        print("The response of UsersApi->users_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_post: %s\n" % e)

Parameters

Name Type Description Notes
user User [optional]

Return type

UserReturn

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]