Skip to content

Latest commit

History

History
85 lines (56 loc) 路 2.28 KB

TaskApi.md

File metadata and controls

85 lines (56 loc) 路 2.28 KB

flat_api.TaskApi

All URIs are relative to https://api.flat.io/v2

Method HTTP request Description
get_task GET /tasks/{task} Get a task details

get_task

Task get_task(task)

Get a task details

This method can be used to follow a task progression, for example while a score is being exported.

Example

  • OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.task import Task
from flat_api.rest import ApiException
from pprint import pprint

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

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

# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flat_api.TaskApi(api_client)
    task = 'task_example' # str | Unique identifier for the task

    try:
        # Get a task details
        api_response = api_instance.get_task(task)
        print("The response of TaskApi->get_task:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TaskApi->get_task: %s\n" % e)

Parameters

Name Type Description Notes
task str Unique identifier for the task

Return type

Task

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Task details -
0 Error -

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