Skip to content

Latest commit

 

History

History
176 lines (121 loc) · 5.58 KB

NotesApi.md

File metadata and controls

176 lines (121 loc) · 5.58 KB

groundlight_openapi_client.NotesApi

All URIs are relative to https://api.groundlight.ai/device-api

Method HTTP request Description
create_note POST /v1/notes
get_notes GET /v1/notes

create_note

create_note(detector_id)

Creates a new note.

Example

  • Api Key Authentication (ApiToken):
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import notes_api
from groundlight_openapi_client.model.note_request import NoteRequest
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
    host = "https://api.groundlight.ai/device-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 API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notes_api.NotesApi(api_client)
    detector_id = "detector_id_example" # str | the detector to associate the new note with
    note_request = NoteRequest(
        content="content_example",
        is_pinned=True,
        image=open('/path/to/file', 'rb'),
    ) # NoteRequest |  (optional)

    # example passing only required values which don't have defaults set
    try:
        api_instance.create_note(detector_id)
    except groundlight_openapi_client.ApiException as e:
        print("Exception when calling NotesApi->create_note: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_instance.create_note(detector_id, note_request=note_request)
    except groundlight_openapi_client.ApiException as e:
        print("Exception when calling NotesApi->create_note: %s\n" % e)

Parameters

Name Type Description Notes
detector_id str the detector to associate the new note with
note_request NoteRequest [optional]

Return type

void (empty response body)

Authorization

ApiToken

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -

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

get_notes

AllNotes get_notes(detector_id)

Retrieves all notes from a given detector and returns them in lists, one for each note_category.

Example

  • Api Key Authentication (ApiToken):
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import notes_api
from groundlight_openapi_client.model.all_notes import AllNotes
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
    host = "https://api.groundlight.ai/device-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 API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

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

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notes_api.NotesApi(api_client)
    detector_id = "detector_id_example" # str | the detector whose notes to retrieve

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.get_notes(detector_id)
        pprint(api_response)
    except groundlight_openapi_client.ApiException as e:
        print("Exception when calling NotesApi->get_notes: %s\n" % e)

Parameters

Name Type Description Notes
detector_id str the detector whose notes to retrieve

Return type

AllNotes

Authorization

ApiToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

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