Skip to content

Files

Latest commit

 

History

History
526 lines (361 loc) · 17.8 KB

ProjectsApi.md

File metadata and controls

526 lines (361 loc) · 17.8 KB

eliona.api_client2.ProjectsApi

All URIs are relative to https://name.eliona.io/v2

Method HTTP request Description
get_project_by_id GET /projects/{project-id} Information about a project
get_project_role_by_name GET /project-roles/{role-name} Information about a project role
get_project_roles GET /project-roles Information about project roles
get_projects GET /projects Information about projects
put_project PUT /projects Create or update a project
put_project_role PUT /project-roles Create or update a project role

get_project_by_id

Project get_project_by_id(project_id, expansions=expansions)

Information about a project

Gets information about a project.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project import Project
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.ProjectsApi(api_client)
    project_id = '99' # str | The id of the project
    expansions = ['expansions_example'] # List[str] | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

    try:
        # Information about a project
        api_response = api_instance.get_project_by_id(project_id, expansions=expansions)
        print("The response of ProjectsApi->get_project_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->get_project_by_id: %s\n" % e)

Parameters

Name Type Description Notes
project_id str The id of the project
expansions List[str] List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. [optional]

Return type

Project

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the project by id. -
404 Project with id not found -

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

get_project_role_by_name

ProjectRole get_project_role_by_name(role_name)

Information about a project role

Gets information about a specific project role.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project_role import ProjectRole
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.ProjectsApi(api_client)
    role_name = 'readonly' # str | The name of the role

    try:
        # Information about a project role
        api_response = api_instance.get_project_role_by_name(role_name)
        print("The response of ProjectsApi->get_project_role_by_name:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->get_project_role_by_name: %s\n" % e)

Parameters

Name Type Description Notes
role_name str The name of the role

Return type

ProjectRole

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the project role by name. -
404 Project role with name not found -

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

get_project_roles

List[ProjectRole] get_project_roles()

Information about project roles

Retrieves a list of roles that can be assigned to users within projects

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project_role import ProjectRole
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

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

    try:
        # Information about project roles
        api_response = api_instance.get_project_roles()
        print("The response of ProjectsApi->get_project_roles:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->get_project_roles: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[ProjectRole]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the list of project roles -

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

get_projects

List[Project] get_projects(expansions=expansions)

Information about projects

Gets a list of projects

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project import Project
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.ProjectsApi(api_client)
    expansions = ['expansions_example'] # List[str] | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

    try:
        # Information about projects
        api_response = api_instance.get_projects(expansions=expansions)
        print("The response of ProjectsApi->get_projects:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->get_projects: %s\n" % e)

Parameters

Name Type Description Notes
expansions List[str] List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. [optional]

Return type

List[Project]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully returned the list of projects -

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

put_project

Project put_project(project, expansions=expansions)

Create or update a project

Creates a project if no project exists or update it if already exists. Uses the id for updating.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project import Project
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.ProjectsApi(api_client)
    project = eliona.api_client2.Project() # Project | 
    expansions = ['expansions_example'] # List[str] | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

    try:
        # Create or update a project
        api_response = api_instance.put_project(project, expansions=expansions)
        print("The response of ProjectsApi->put_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->put_project: %s\n" % e)

Parameters

Name Type Description Notes
project Project
expansions List[str] List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. [optional]

Return type

Project

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully created a new or updated an existing project -

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

put_project_role

ProjectRole put_project_role(project_role)

Create or update a project role

Creates a new project role if none exists, or updates an existing one by its name

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import eliona.api_client2
from eliona.api_client2.models.project_role import ProjectRole
from eliona.api_client2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://name.eliona.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = eliona.api_client2.Configuration(
    host = "https://name.eliona.io/v2"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = eliona.api_client2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with eliona.api_client2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = eliona.api_client2.ProjectsApi(api_client)
    project_role = eliona.api_client2.ProjectRole() # ProjectRole | 

    try:
        # Create or update a project role
        api_response = api_instance.put_project_role(project_role)
        print("The response of ProjectsApi->put_project_role:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->put_project_role: %s\n" % e)

Parameters

Name Type Description Notes
project_role ProjectRole

Return type

ProjectRole

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully created or updated the project role -

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