Skip to content

Latest commit

 

History

History
162 lines (108 loc) · 4.93 KB

ProcessesApi.md

File metadata and controls

162 lines (108 loc) · 4.93 KB

ecotaxa_py_client.ProcessesApi

All URIs are relative to https://ecotaxa.obs-vlfr.fr/api

Method HTTP request Description
process_query GET /process/{process_id} Process Query
update_processes POST /process_set/update Update Processes

process_query

ProcessModel process_query(process_id)

Process Query

Returns information about the process corresponding to the given id.

Example

  • OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.process_model import ProcessModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
    host = "https://ecotaxa.obs-vlfr.fr/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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ecotaxa_py_client.ProcessesApi(api_client)
    process_id = 1 # int | Internal, the unique numeric id of this process.

    try:
        # Process Query
        api_response = api_instance.process_query(process_id)
        print("The response of ProcessesApi->process_query:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProcessesApi->process_query: %s\n" % e)

Parameters

Name Type Description Notes
process_id int Internal, the unique numeric id of this process.

Return type

ProcessModel

Authorization

BearerOrCookieAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

update_processes

int update_processes(bulk_update_req)

Update Processes

Do the required update for each process in the set. Returns the number of updated entities.

Example

  • OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.bulk_update_req import BulkUpdateReq
from ecotaxa_py_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
    host = "https://ecotaxa.obs-vlfr.fr/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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ecotaxa_py_client.ProcessesApi(api_client)
    bulk_update_req = ecotaxa_py_client.BulkUpdateReq() # BulkUpdateReq | 

    try:
        # Update Processes
        api_response = api_instance.update_processes(bulk_update_req)
        print("The response of ProcessesApi->update_processes:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProcessesApi->update_processes: %s\n" % e)

Parameters

Name Type Description Notes
bulk_update_req BulkUpdateReq

Return type

int

Authorization

BearerOrCookieAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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