Skip to content

Latest commit

 

History

History
187 lines (133 loc) · 10.4 KB

File metadata and controls

187 lines (133 loc) · 10.4 KB

kandji.LibraryItemsApi

All URIs are relative to https://<sub_domain>.api.kandji.io

Method HTTP request Description
get_library_item_activity GET /api/v1/library/library-items/{library_item_id}/activity Get Library Item Activity
get_library_item_statuses GET /api/v1/library/library-items/{library_item_id}/status Get Library Item Statuses

get_library_item_activity

BlueprintsListBlueprints200Response get_library_item_activity(library_item_id, activity_type=activity_type, user_id=user_id, user_email=user_email, limit=limit, offset=offset)

Get Library Item Activity

This endpoint retrieves the activity related to a specific library item. Activity is listed from newest to oldest.

To see a delta of the activity events between now and the last request, you can store the newest entry from the previous request and then look for that entry in the next request. Any entry post that will be the delta.

Request Parameters

library_item_id (path parameter): The unique identifier of the library item.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.blueprints_list_blueprints200_response import BlueprintsListBlueprints200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# 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 (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.LibraryItemsApi(api_client)
    library_item_id = 'library_item_id_example' # str | 
    activity_type = 'library_item_assignment_changed' # str | Filter actions by this activity type. Choices are: library_item_created, library_item_edited, library_item_deleted, library_item_duplicated, library_item_assignment_changed (optional)
    user_id = '{user uuid}' # str | Filter actions by this user (id) (optional)
    user_email = 'me@example.com' # str | Filter actions by this user (email) (optional)
    limit = '10' # str | A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results. (optional)
    offset = '100' # str | Specify the starting record to return (optional)

    try:
        # Get Library Item Activity
        api_response = api_instance.get_library_item_activity(library_item_id, activity_type=activity_type, user_id=user_id, user_email=user_email, limit=limit, offset=offset)
        print("The response of LibraryItemsApi->get_library_item_activity:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LibraryItemsApi->get_library_item_activity: %s\n" % e)

Parameters

Name Type Description Notes
library_item_id str
activity_type str Filter actions by this activity type. Choices are: library_item_created, library_item_edited, library_item_deleted, library_item_duplicated, library_item_assignment_changed [optional]
user_id str Filter actions by this user (id) [optional]
user_email str Filter actions by this user (email) [optional]
limit str A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results. [optional]
offset str Specify the starting record to return [optional]

Return type

BlueprintsListBlueprints200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

HTTP response details

Status code Description Response headers
200 OK * Accept-Ranges -
* Access-Control-Allow-Origin -
* Allow -
* Connection -
* Content-Encoding -
* Content-Security-Policy -
* Content-Type -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Ratelimit-Limit -
* Ratelimit-Remaining -
* Ratelimit-Reset -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* Via -
* X-Cache -
* X-Cache-Hits -
* X-Content-Type-Options -
* X-Frame-Options -
* X-Kong-Proxy-Latency -
* X-Kong-Upstream-Latency -
* X-Ratelimit-Limit-Hour -
* X-Ratelimit-Limit-Second -
* X-Ratelimit-Remaining-Hour -
* X-Ratelimit-Remaining-Second -
* X-Served-By -
* X-Timer -
* transfer-encoding -

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

get_library_item_statuses

BlueprintsListBlueprints200Response get_library_item_statuses(library_item_id, computer_id=computer_id, limit=limit, offset=offset)

Get Library Item Statuses

This endpoint retrieves the statuses related to a specific library item.

Request Parameters

library_item_id (path parameter): The unique identifier of the library item.

Example

  • Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.blueprints_list_blueprints200_response import BlueprintsListBlueprints200Response
from kandji.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
    host = "https://<sub_domain>.api.kandji.io"
)

# 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 (API Token): bearer
configuration = kandji.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kandji.LibraryItemsApi(api_client)
    library_item_id = 'library_item_id_example' # str | 
    computer_id = '{device_id}' # str | Query for the status of one device. (optional)
    limit = '300' # str | A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results. (optional)
    offset = '' # str | Specify the starting record to return (optional)

    try:
        # Get Library Item Statuses
        api_response = api_instance.get_library_item_statuses(library_item_id, computer_id=computer_id, limit=limit, offset=offset)
        print("The response of LibraryItemsApi->get_library_item_statuses:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LibraryItemsApi->get_library_item_statuses: %s\n" % e)

Parameters

Name Type Description Notes
library_item_id str
computer_id str Query for the status of one device. [optional]
limit str A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results. [optional]
offset str Specify the starting record to return [optional]

Return type

BlueprintsListBlueprints200Response

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

HTTP response details

Status code Description Response headers
200 OK * Accept-Ranges -
* Access-Control-Allow-Origin -
* Allow -
* Connection -
* Content-Encoding -
* Content-Security-Policy -
* Content-Type -
* Cross-Origin-Opener-Policy -
* Date -
* Feature-Policy -
* Ratelimit-Limit -
* Ratelimit-Remaining -
* Ratelimit-Reset -
* Referrer-Policy -
* Server -
* Strict-Transport-Security -
* Vary -
* Via -
* X-Cache -
* X-Cache-Hits -
* X-Content-Type-Options -
* X-Frame-Options -
* X-Kong-Proxy-Latency -
* X-Kong-Upstream-Latency -
* X-Ratelimit-Limit-Hour -
* X-Ratelimit-Limit-Second -
* X-Ratelimit-Remaining-Hour -
* X-Ratelimit-Remaining-Second -
* X-Served-By -
* X-Timer -
* transfer-encoding -

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