### cURL GET Request Example Source: https://team-asset-panda.readme.io/reference/authentication This snippet demonstrates how to construct a basic cURL GET request to interact with the API. It includes the request method and the target URL. Ensure you replace 'https://example.com/' with your actual API endpoint. ```shell curl --request GET \ --url https://example.com/ ``` -------------------------------- ### Retrieve Groups API Request Examples Source: https://team-asset-panda.readme.io/reference/groups-2 Examples of how to make a GET request to the Retrieve Groups API endpoint using various programming languages and cURL. Authentication is handled via an 'Authorization' Bearer token in the headers. ```shell curl --request GET \ --url https://api.assetpanda.com/v3/groups \ --header 'accept: application/json' ``` ```javascript fetch('https://api.assetpanda.com/v3/groups', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Accept': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ```python import requests url = "https://api.assetpanda.com/v3/groups" headers = { "Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json" } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.assetpanda.com/v3/groups") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Accept"] = "application/json" request["Authorization"] = "Bearer YOUR_API_TOKEN" response = http.request(request) puts response.read_body ``` ```php "https://api.assetpanda.com/v3/groups", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer YOUR_API_TOKEN", "Accept: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #" . $err; } else { echo $response; } ``` -------------------------------- ### Data Structure Examples for Team Asset Panda API Source: https://team-asset-panda.readme.io/reference/post_v3-reports Examples demonstrating the structure for report filters and form ordering fields in the Team Asset Panda API. These structures define how data can be filtered and ordered for reports. ```json { "report_filters_attributes": { "0": { "field_id": 229723, "invert_query": false, "fix_value": [ "6877738a83782344c03ec2b9" ] }, "1": { "field_id": 228311, "invert_query": true, "fix_value": "H" } }, "form_ordering_fields_attributes": { "0": { "field_id": 228311, "order": "desc", "_destroy": "" }, "1": { "field_id": 228310, "order": "asc", "_destroy": "" } } } ``` -------------------------------- ### Example API Request Body for Team Asset Panda Source: https://team-asset-panda.readme.io/reference/post_v3-reports A comprehensive example of an API request body for creating or updating a report in Team Asset Panda. It includes various settings like name, output format, entity details, and filtering/ordering configurations. ```json { "name": "Test API 3", "output": "csv", "size": "A4", "orientation": "landscape", "has_gridlines": true, "font_size": 13, "entity_id": 13876, "entity_action_id": 18427, "entity_action_show_all_object": true, "action_object_list": 1, "sum_currency": true, "sum_number": true, "company_logo": true, "reportable_id": "", "default_image": true, "archived_record_options": 0, "report_filters_attributes": { "0": { "field_id": 229723, "invert_query": false, "fix_value": [ "6877738a83782344c03ec2b9" ] }, "1": { "field_id": 228311, "invert_query": true, "fix_value": "H" } }, "form_ordering_fields_attributes": { "0": { "field_id": 228311, "order": "desc", "_destroy": "" }, "1": { "field_id": 228310, "order": "asc", "_destroy": "" } } } ``` -------------------------------- ### GET /v3/settings Source: https://team-asset-panda.readme.io/reference/get_v3-settings Retrieves the current settings for the authenticated user or account. ```APIDOC ## GET /v3/settings ### Description Retrieves the current settings for the authenticated user or account. ### Method GET ### Endpoint /v3/settings ### Parameters #### Header Parameters - **Authorization** (string) - Required - The authentication token for the request. Example: `Bearer {{token}}` ### Response #### Success Response (200) - **application/json** - Successful response with settings data. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /v3/groups/{group_id}/actions Source: https://team-asset-panda.readme.io/reference/get_v3-groups-group-id-actions Retrieves a list of actions and their configurations for a specified group. This is essential for understanding available actions and their parameters before performing API operations. ```APIDOC ## GET /v3/groups/{group_id}/actions ### Description Retrieves a list of actions and their configurations for a specified group. This is essential for understanding available actions and their parameters before performing API operations. ### Method GET ### Endpoint /v3/groups/{group_id}/actions ### Parameters #### Path Parameters - **group_id** (integer) - Required - The ID of the group for which to retrieve actions. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **actions** (array) - A list of action objects, each containing details like id, name, type, key, and configuration fields. #### Response Example ```json { "actions": [ { "id": 238309, "name": "Deliver", "type": "DefaultAction", "key": "deliver", "account_id": 21040, "entity_id": 139259, "has_all_entities": true, "has_all_statuses": true, "auto_return_linked_action": false, "fields_counter": 4, "is_default": false, "is_returnable": false, "is_auto_returnable": false, "allow_attachment_on_open": false, "allow_attachment_on_return": false, "perform_on_not_returned": true, "created_at": "2021-05-25T13:53:03.000Z", "updated_at": "2021-05-25T13:53:03.000Z", "ordering": 0, "track_gps": true, "return_name": "", "change_return_name": false, "deactivate_depreciation": false, "is_system": false, "feature_id": 0, "is_creating_entity_objects": false, "on_web_perform_group_action_before_scan_records": "scan_first", "on_mobile_perform_group_action_before_scan_records": "scan_first", "is_active": true } ] } ``` ### Authentication - **Authorization** (string) - Required - Your Bearer token. ``` -------------------------------- ### GET /v3/actions Source: https://team-asset-panda.readme.io/reference/get_v3-actions Retrieves all actions configured in the account. This will contain all actions that are configured and what the configurations are. ```APIDOC ## GET /v3/actions ### Description Retrieves all actions configured in the account. This will contain all actions that are configured and what the configurations are. ### Method GET ### Endpoint /v3/actions ### Parameters #### Header Parameters - **Authorization** (string) - Required - The authentication token for the API request. Example: `Bearer {{token}}` ### Request Example (No request body for this GET request) ### Response #### Success Response (200) - **actions** (array) - A list of action objects, each containing detailed configuration information. - **id** (integer) - The action identifier. - **name** (string) - The name of the action. - **type** (string) - The type of the action (e.g., "ReservationAction"). - **key** (string) - A unique key for the action. - **account_id** (integer) - The account identifier to which the action belongs. - **entity_id** (integer) - The identifier for the entity associated with the action. - **has_all_entities** (boolean) - Indicates if the action applies to all entities. - **has_all_statuses** (boolean) - Indicates if the action applies to all statuses. - **auto_return_linked_action** (boolean) - Specifies if auto-return is linked to this action. - **fields_counter** (integer) - A counter for fields related to the action. - **is_default** (boolean) - Indicates if this is the default action. - **is_returnable** (boolean) - Indicates if the action is returnable. - **is_auto_returnable** (boolean) - Indicates if the action is automatically returnable. - **allow_attachment_on_open** (boolean) - Allows attachment when the action is opened. - **allow_attachment_on_return** (boolean) - Allows attachment when the action is returned. - **perform_on_not_returned** (boolean) - Specifies action behavior when not returned. - **created_at** (string) - The timestamp when the action was created (ISO 8601 format). - **updated_at** (string) - The timestamp when the action was last updated (ISO 8601 format). - **ordering** (integer) - The order in which the action is displayed. - **track_gps** (boolean) - Indicates if GPS tracking is enabled for the action. - **return_name** (string) - The name displayed for the return action. - **change_return_name** (boolean) - Indicates if the return name can be changed. - **deactivate_depreciation** (boolean) - Deactivates depreciation for this action. - **blocked_by_reservation_action_ids** (array) - List of reservation action IDs that block this action. - **is_system** (boolean) - Indicates if the action is a system-defined action. - **feature_id** (integer) - The feature identifier associated with the action. - **is_creating_entity_objects** (boolean) - Indicates if the action creates entity objects. - **on_web_perform_group_action_before_scan_records** (string) - Behavior on web before scanning records. - **on_mobile_perform_group_action_before_scan_records** (string) - Behavior on mobile before scanning records. - **on_web_populating_variable_fields** (string) - Behavior on web for populating variable fields. - **on_mobile_populating_variable_fields** (string) - Behavior on mobile for populating variable fields. - **is_active** (boolean) - Indicates if the action is currently active. #### Response Example ```json { "actions": [ { "id": 238258, "name": "Check Out - R", "type": "ReservationAction", "key": "check_out_r", "account_id": 21040, "entity_id": 139256, "has_all_entities": true, "has_all_statuses": true, "auto_return_linked_action": false, "fields_counter": 9, "is_default": false, "is_returnable": true, "is_auto_returnable": false, "allow_attachment_on_open": false, "allow_attachment_on_return": true, "perform_on_not_returned": true, "created_at": "2021-05-25T13:52:57.000Z", "updated_at": "2022-05-10T15:09:02.000Z", "ordering": 0, "track_gps": true, "return_name": "Check In - R", "change_return_name": true, "deactivate_depreciation": false, "blocked_by_reservation_action_ids": [], "is_system": false, "feature_id": 0, "is_creating_entity_objects": false, "on_web_perform_group_action_before_scan_records": "scan_first", "on_mobile_perform_group_action_before_scan_records": "scan_first", "is_active": true }, { "id": 238305, "name": "DD Check Out", "type": "ReservationAction", "key": "dd_check_out", "account_id": 21040, "entity_id": 139257, "has_all_entities": true, "has_all_statuses": true, "auto_return_linked_action": false, "fields_counter": 18, "is_default": false, "is_returnable": true, "is_auto_returnable": false, "allow_attachment_on_open": false, "allow_attachment_on_return": true, "perform_on_not_returned": false, "created_at": "2021-05-25T13:53:02.000Z", "updated_at": "2021-05-25T13:53:02.000Z", "ordering": 0, "track_gps": true, "return_name": "DD Check In", "change_return_name": true, "deactivate_depreciation": false, "blocked_by_reservation_action_ids": [], "is_system": false, "feature_id": 0, "is_creating_entity_objects": false, "on_web_perform_group_action_before_scan_records": "scan_first", "on_mobile_perform_group_action_before_scan_records": "scan_first", "on_web_populating_variable_fields": "fill_after", "on_mobile_populating_variable_fields": "fill_after", "is_active": true } ] } ``` ``` -------------------------------- ### Get Users Source: https://team-asset-panda.readme.io/reference/use-cases-and-workflow Retrieves a list of all users within your Asset Panda account. This is useful for managing user permissions or assigning assets. ```APIDOC ## GET /v3/users ### Description Retrieves a list of all users in your Asset Panda account. Useful for managing users and permissions. ### Method GET ### Endpoint https://api.assetpanda.com/v3/users ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **users** (array) - A list of user objects, each containing 'id', 'name', 'email', etc. #### Response Example { "users": [ { "id": 1, "name": "Captain America", "email": "captain.america@superheroes.inc" }, { "id": 5, "name": "Wonder Woman", "email": "wonder.woman@superheroes.inc" } ] } ``` -------------------------------- ### Retrieve All Reports (Python) Source: https://team-asset-panda.readme.io/reference/reports-1 This Python snippet uses the `requests` library to fetch a list of all reports. It shows how to configure the GET request, set the appropriate headers for JSON acceptance and Bearer token authentication. ```Python import requests url = "https://api.assetpanda.com/v3/reports" headers = { "accept": "application/json", "Authorization": "Bearer YOUR_API_TOKEN" } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Get Linked Fields (cURL) Source: https://team-asset-panda.readme.io/reference/linked-objects Example of how to retrieve linked fields for an entity object using cURL. This request requires the entity object ID and an Authorization header. ```shell curl --request GET \ --url https://api.assetpanda.com/v3/entity_objects/id/linked_fields \ --header 'accept: application/json' ``` -------------------------------- ### Sample Payload for Creating Multiple Action Objects Source: https://team-asset-panda.readme.io/reference/post_v3-entity-objects-action-objects-id-create-multiple This is a sample JSON payload demonstrating the structure and parameters required to create multiple action objects. It includes object IDs, an action ID, and fields specific to the action. ```coffeescript { "object_ids": ["636e5f3d1ad40e33f3c7c0b4"], //object_id "id": "118589", //defines which action or action_id "action_fields": { "field_1": "krishna test", // fields you would write as part of the action taken "field_2": "342", "field_3": "2022-11-10", "field_4": "636e5f3d1ad40e33f3c7c0b4" } } ``` -------------------------------- ### Get Linked Fields (Python) Source: https://team-asset-panda.readme.io/reference/linked-objects Example of how to retrieve linked fields for an entity object using Python. This request requires the entity object ID and an Authorization header. It uses the 'requests' library for making HTTP requests. ```python import requests id = 'your_entity_object_id' token = 'your_authorization_token' url = f"https://api.assetpanda.com/v3/entity_objects/{id}/linked_fields" headers = { 'accept': 'application/json', 'authorization': token } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code} - {response.text}") ``` -------------------------------- ### Get Linked Fields (PHP) Source: https://team-asset-panda.readme.io/reference/linked-objects Example of how to retrieve linked fields for an entity object using PHP. This request requires the entity object ID and an Authorization header. It uses cURL functions for making HTTP requests. ```php ``` -------------------------------- ### POST /api/reports Source: https://team-asset-panda.readme.io/reference/post_v3-reports Creates a new report with specified configurations. This endpoint allows for detailed customization of the report, including filters, ordering, and fields to be included. ```APIDOC ## POST /api/reports ### Description Creates a new report with specified configurations. This endpoint allows for detailed customization of the report, including filters, ordering, and fields to be included. ### Method POST ### Endpoint /api/reports ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication #### Request Body - **report_type** (string) - Required - The type of report to create (e.g., "ActionReport"). - **report** (object) - Required - Configuration details for the report. - **name** (string) - Required - The name of the report. - **output** (string) - Required - The output format of the report (e.g., "csv"). - **size** (string) - Optional - The paper size for the report (e.g., "A4"). - **orientation** (string) - Optional - The orientation of the report (e.g., "landscape"). - **has_gridlines** (boolean) - Optional - Whether to include gridlines in the report. - **font_size** (integer) - Optional - The font size for the report. - **entity_id** (integer) - Required - The ID of the entity the report is associated with. - **entity_action_id** (integer) - Optional - The ID of the entity action. - **entity_action_show_all_object** (boolean) - Optional - Whether to show all objects for the entity action. - **action_object_list** (integer) - Optional - Identifier for the action object list. - **sum_currency** (boolean) - Optional - Whether to sum currency values. - **sum_number** (boolean) - Optional - Whether to sum numerical values. - **company_logo** (boolean) - Optional - Whether to include the company logo. - **reportable_id** (string) - Optional - The ID of the reportable item. - **default_image** (boolean) - Optional - Whether to use a default image. - **archived_record_options** (integer) - Optional - Options for archived records. - **report_filters_attributes** (object) - Optional - Attributes for filtering report data. - *key* (object) - Represents a filter configuration. - **field_id** (integer) - Required - The ID of the field to filter on. - **invert_query** (boolean) - Optional - Whether to invert the query logic. - **fix_value** (string or array) - Optional - The value(s) to filter by. - **form_ordering_fields_attributes** (object) - Optional - Attributes for ordering report fields. - *key* (object) - Represents an ordering configuration. - **field_id** (integer) - Required - The ID of the field to order by. - **order** (string) - Required - The order direction ('asc' or 'desc'). - **_destroy** (string) - Optional - Flag to indicate deletion. - **fields** (string) - Optional - A comma-separated string of field IDs to include in the report. ### Request Example ```json { "report_type": "ActionReport", "report": { "name": "Test API 3", "output": "csv", "size": "A4", "orientation": "landscape", "has_gridlines": true, "font_size": 13, "entity_id": 13876, "entity_action_id": 18427, "entity_action_show_all_object": true, "action_object_list": 1, "sum_currency": true, "sum_number": true, "company_logo": true, "reportable_id": "", "default_image": true, "archived_record_options": 0, "report_filters_attributes": { "0": { "field_id": 229723, "invert_query": false, "fix_value": [ "6877738a83782344c03ec2b9" ] }, "1": { "field_id": 228311, "invert_query": true, "fix_value": "H" } }, "form_ordering_fields_attributes": { "0": { "field_id": 228311, "order": "desc", "_destroy": "" }, "1": { "field_id": 228310, "order": "asc", "_destroy": "" } }, "fields": "228311,229723,229762" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of report creation. #### Response Example ```json { "message": "Report created successfully." } ``` ``` -------------------------------- ### Get Linked Fields (Ruby) Source: https://team-asset-panda.readme.io/reference/linked-objects Example of how to retrieve linked fields for an entity object using Ruby. This request requires the entity object ID and an Authorization header. It uses the 'net/http' library for making HTTP requests. ```ruby require 'uri' require 'net/http' id = 'your_entity_object_id' token = 'your_authorization_token' uri = URI("https://api.assetpanda.com/v3/entity_objects/#{id}/linked_fields") Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| request = Net::HTTP::Get.new(uri) request['accept'] = 'application/json' request['authorization'] = token response = http.request(request) puts response.body end ``` -------------------------------- ### Create Folder Source: https://team-asset-panda.readme.io/reference/attachments-1 Creates an attachments folder based on provided folder and attachment IDs. ```APIDOC ## POST /v3/attachment/folders/{folder_id} ### Description Create an attachments folder based on both folder and attachments IDs. ### Method POST ### Endpoint https://api.assetpanda.com/v3/attachment/folders/{folder_id} ### Parameters #### Path Parameters - **folder_id** (string) - required - Value of the folder(s) you want to create. #### Request Body - **attachment_ids** (string) - required - Value of the attachments you want to create. ### Request Example ```json { "attachment_ids": "string" } ``` ### Response #### Success Response (200) - **message** (string) - Description of the success response. #### Response Example ```json { "message": "Folder created successfully." } ``` ``` -------------------------------- ### Get Linked Fields (Node.js) Source: https://team-asset-panda.readme.io/reference/linked-objects Example of how to retrieve linked fields for an entity object using Node.js. This request requires the entity object ID and an Authorization header. It uses the 'got' library for making HTTP requests. ```javascript import got from 'got'; const id = 'your_entity_object_id'; const token = 'your_authorization_token'; (async () => { try { const response = await got(`https://api.assetpanda.com/v3/entity_objects/${id}/linked_fields`, { headers: { accept: 'application/json', authorization: token } }); console.log(response.body); } catch (error) { console.error(error); } })(); ``` -------------------------------- ### cURL Request to Retrieve Users Source: https://team-asset-panda.readme.io/reference/users-1 Example of how to make a GET request to the Asset Panda 'Retrieve Users' API endpoint using cURL. It specifies the URL and the expected response format (application/json). ```shell curl --request GET \ --url https://api.assetpanda.com/v3/users \ --header 'accept: application/json' ``` -------------------------------- ### Sample Response for Retrieve Actions Source: https://team-asset-panda.readme.io/reference/get_v3-actions This is a sample JSON response demonstrating the structure of data returned when retrieving all configured actions. It includes details such as action ID, name, type, associated account ID, and various configuration flags. ```coffeescript { "actions": [ { "id": 238258, "name": "Check Out - R", "type": "ReservationAction", "key": "check_out_r", "account_id": 21040, "entity_id": 139256, "has_all_entities": true, "has_all_statuses": true, "auto_return_linked_action": false, "fields_counter": 9, "is_default": false, "is_returnable": true, "is_auto_returnable": false, "allow_attachment_on_open": false, "allow_attachment_on_return": true, "perform_on_not_returned": true, "created_at": "2021-05-25T13:52:57.000Z", "updated_at": "2022-05-10T15:09:02.000Z", "ordering": 0, "track_gps": true, "return_name": "Check In - R", "change_return_name": true, "deactivate_depreciation": false, "blocked_by_reservation_action_ids": [], "is_system": false, "feature_id": 0, "is_creating_entity_objects": false, "on_web_perform_group_action_before_scan_records": "scan_first", "on_mobile_perform_group_action_before_scan_records": "scan_first", "is_active": true }, { "id": 238305, "name": "DD Check Out", "type": "ReservationAction", "key": "dd_check_out", "account_id": 21040, "entity_id": 139257, "has_all_entities": true, "has_all_statuses": true, "auto_return_linked_action": false, "fields_counter": 18, "is_default": false, "is_returnable": true, "is_auto_returnable": false, "allow_attachment_on_open": false, "allow_attachment_on_return": true, "perform_on_not_returned": false, "created_at": "2021-05-25T13:53:02.000Z", "updated_at": "2021-05-25T13:53:02.000Z", "ordering": 0, "track_gps": true, "return_name": "DD Check In", "change_return_name": true, "deactivate_depreciation": false, "blocked_by_reservation_action_ids": [], "is_system": false, "feature_id": 0, "is_creating_entity_objects": false, "on_web_perform_group_action_before_scan_records": "scan_first", "on_mobile_perform_group_action_before_scan_records": "scan_first", "on_web_populating_variable_fields": "fill_after", "on_mobile_populating_variable_fields": "fill_after", "is_active": true } ] } ``` -------------------------------- ### Retrieve Action Objects using PHP Source: https://team-asset-panda.readme.io/reference/action-objects-1 PHP implementation for retrieving action objects via the Asset Panda API. This example uses cURL functions to make the GET request, requiring the object_id and Authorization header for authentication. ```php // Placeholder for PHP code - Actual implementation would use cURL or a HTTP client library // Example structure: /* function get_action_objects($object_id, $auth_token) { $url = "https://api.assetpanda.com/v3/entity_objects/{$object_id}/action_objects"; $headers = array( 'Authorization: Bearer ' . $auth_token, 'Accept: application/json' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if (curl_errno($ch)) { echo 'Curl error: ' . curl_error($ch); } curl_close($ch); if ($http_code == 200) { return json_decode($response, true); } else { // Handle error return null; } } */ ``` -------------------------------- ### Create New Action Source: https://team-asset-panda.readme.io/reference/use-cases-and-workflow Creates a new action for a specific group, allowing you to track events like checking assets in or out, or assigning them to users. ```APIDOC ## POST /v3/groups/{group_id}/actions ### Description Creates a new action within a specified group. This is used to log significant events related to assets, such as check-outs or maintenance. ### Method POST ### Endpoint https://api.assetpanda.com/v3/groups/{group_id}/actions ### Parameters #### Path Parameters - **group_id** (integer) - Required - The ID of the group to which the action applies. #### Query Parameters None #### Request Body - **action_details** (object) - Required - An object containing the details of the action, including 'name' (e.g., "Checked Out") and potentially related 'object_id' and 'user_id'. ### Request Example ```json { "action_details": { "name": "Checked Out", "object_id": 101, "user_id": 5, "notes": "Checked out to Wonder Woman for a sales call." } } ``` ### Response #### Success Response (201) - **id** (integer) - The ID of the newly created action. - **message** (string) - Confirmation message. #### Response Example { "id": 50, "message": "Action created successfully." } ``` -------------------------------- ### OpenAPI Definition for Get Linked Fields Source: https://team-asset-panda.readme.io/reference/get_v3-entity-objects-id-linked-fields This JSON object defines the 'Get linked fields' endpoint for the V3 Asset Panda API. It specifies the HTTP method (GET), required parameters (Authorization header and entity ID), and the expected response structure. No external libraries are required to interpret this definition. ```json { "openapi": "3.0.0", "info": { "title": "V3-APIs", "version": "3.1" }, "servers": [ { "url": "https://api.assetpanda.com" } ], "tags": [ { "name": "Linked objects" } ], "paths": { "/v3/entity_objects/{id}/linked_fields": { "get": { "tags": [ "Linked objects" ], "summary": "Get linked fields", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" }, "example": "Bearer {{token}}" }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": {} } } } } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true } } ``` -------------------------------- ### Authentication API Source: https://team-asset-panda.readme.io/reference/authentication This section covers the authentication endpoints, including logging in and managing API keys. ```APIDOC ## GET / ### Description This endpoint is likely used for a health check or to retrieve basic information about the API. ### Method GET ### Endpoint / ### Parameters None ### Request Example ``` curl --request GET \ --url https://example.com/ ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the API is operational. #### Response Example ```json { "message": "API is operational" } ``` ``` -------------------------------- ### OpenAPI Definition for Get Linked Objects Source: https://team-asset-panda.readme.io/reference/get_v3-entity-objects-id-linked-objects-field-id This JSON snippet defines the OpenAPI 3.0.0 specification for the 'Get linked objects' endpoint. It includes the server URL, API version, request parameters (Authorization header, id, field_id), and expected successful response structure. No specific request body is defined for this GET operation. ```json { "openapi": "3.0.0", "info": { "title": "V3-APIs", "version": "3.1" }, "servers": [ { "url": "https://api.assetpanda.com" } ], "tags": [ { "name": "Linked objects" } ], "paths": { "/v3/entity_objects/{id}/linked_objects/{field_id}": { "get": { "tags": [ "Linked objects" ], "summary": "Get linked objects", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" }, "example": "Bearer {{token}}" }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "field_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": {} } } } } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true } } ``` -------------------------------- ### Get linked fields Source: https://team-asset-panda.readme.io/reference/get_v3-entity-objects-id-linked-fields Retrieves linked fields for a specific entity object. Requires authentication. ```APIDOC ## GET /v3/entity_objects/{id}/linked_fields ### Description Retrieves linked fields associated with a specific entity object using its ID. ### Method GET ### Endpoint https://api.assetpanda.com/v3/entity_objects/{id}/linked_fields ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the entity object. #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. Example: `Bearer {{token}}` ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **(object)** - The response contains information about the linked fields. The exact structure depends on the linked fields configuration. #### Response Example ```json { "example": "An empty JSON object is returned for a successful request, actual linked fields would be populated here based on configuration." } ``` ``` -------------------------------- ### cURL Request to Create Folder Source: https://team-asset-panda.readme.io/reference/attachments-1 This snippet demonstrates how to create an attachment folder using a cURL request. It specifies the POST method, the API endpoint, and includes necessary headers for content type and acceptance of JSON responses. The `folder_id` and `attachment_ids` are expected in the request body. ```shell curl --request POST \ --url https://api.assetpanda.com/v3/attachment/folders/folder_id \ --header 'accept: application/json' \ --header 'content-type: application/x-www-form-urlencoded' ``` -------------------------------- ### GET /v3/entity_objects/{id}/linked_objects/{field_id} Source: https://team-asset-panda.readme.io/reference/get_v3-entity-objects-id-linked-objects-field-id Retrieves linked objects for a specific entity and field. Requires authentication. ```APIDOC ## GET /v3/entity_objects/{id}/linked_objects/{field_id} ### Description Retrieves linked objects associated with a specific entity object and field. ### Method GET ### Endpoint `/v3/entity_objects/{id}/linked_objects/{field_id}` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the entity object. - **field_id** (string) - Required - The ID of the field associated with the linked objects. #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. Example: `Bearer {{token}}` ### Request Example ```json { "example": "Not applicable for GET request body" } ``` ### Response #### Success Response (200) - Successful response with linked object data (content details not specified in schema). #### Response Example ```json { "example": "Empty JSON object as per schema, actual response will contain linked object data." } ``` ``` -------------------------------- ### GET /v3/actions/{action_id}/group Source: https://team-asset-panda.readme.io/reference/get_v3-actions-action-id-group Retrieves all groups that contain a specific action ID. Requires authentication with a Bearer token. ```APIDOC ## GET /v3/actions/{action_id}/group ### Description Retrieves the groups that contain a specific action ID. ### Method GET ### Endpoint /v3/actions/{action_id}/group ### Parameters #### Path Parameters - **action_id** (integer) - Required - The value for the action you want to retrieve. #### Header Parameters - **Authorization** (string) - Required - Your Bearer token. Example: `Bearer {{token}}` ### Response #### Success Response (200) - Returns a string representing the group information (content type is text/plain). #### Response Example ``` "" ``` ``` -------------------------------- ### Sample Request: Retrieve User Templates Source: https://team-asset-panda.readme.io/reference/get_v3-users-templates This sample request demonstrates the expected JSON response when retrieving user templates. It includes the template ID, name, and an array of users assigned to each template. This data can be used to create new users with specific template assignments. ```coffeescript [ { "template_id": 30134, "template_name": "Manager", "template_users": [ { "id": 1748121, "name": "Apollo Panda" } ] }, { "template_id": 30135, "template_name": "Basic", "template_users": [] }, { "template_id": 30136, "template_name": "Admin", "template_users": [] } ] ``` -------------------------------- ### OpenAPI Definition for GET Action Group Source: https://team-asset-panda.readme.io/reference/get_v3-actions-action-id-group The OpenAPI 3.0.0 definition for the 'GET Action Group' endpoint. This JSON describes the API's structure, including the path, HTTP method, parameters (like action_id and Authorization header), and responses. It is used for generating interactive API documentation and client SDKs. ```json { "openapi": "3.0.0", "info": { "title": "V3-APIs", "version": "3.1" }, "servers": [ { "url": "https://api.assetpanda.com" } ], "tags": [ { "name": "Actions" } ], "paths": { "/v3/actions/{action_id}/group": { "get": { "tags": [ "Actions" ], "summary": "GET Action Group", "parameters": [ { "name": "Authorization", "in": "header", "required": true, "schema": { "type": "string" }, "example": "Bearer {{token}}" }, { "name": "action_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful response", "content": { "text/plain": { "schema": { "type": "string" }, "example": "" } } } } } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true } } ``` -------------------------------- ### Sample User Response (CoffeeScript) Source: https://team-asset-panda.readme.io/reference/get_v3-users Illustrates the structure of the response when retrieving a list of users. Each user object contains details such as ID, email, name, and account information. ```coffeescript [ { "id": 1632238, "email": "pandazen@assetpanda.com", "first_name": "apollo", "last_name": "panda", "account_id": 21040, "is_admin": false, "is_active": true, "template_rule_id": null, "integ_ad_sid": null }, { "id": 1773934, "email": "redpanda@assetpanda.com", "first_name": "Red", "last_name": "Panda", "account_id": 21040, "is_admin": false, "is_active": true, "template_rule_id": null, "integ_ad_sid": null }, ] ``` -------------------------------- ### Get Linked Fields Source: https://team-asset-panda.readme.io/reference/linked-objects Retrieves linked fields for a specified entity object. This endpoint allows you to fetch associated data points that are linked to a particular asset. ```APIDOC ## GET /v3/entity_objects/{id}/linked_fields ### Description Retrieves linked fields for a specified entity object. This endpoint allows you to fetch associated data points that are linked to a particular asset. ### Method GET ### Endpoint https://api.assetpanda.com/v3/entity_objects/{id}/linked_fields ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the entity object to retrieve linked fields for. #### Headers - **Authorization** (string) - Required - The authentication token for accessing the API. ### Request Example ```bash curl --request GET \ --url https://api.assetpanda.com/v3/entity_objects/id/linked_fields \ --header 'accept: application/json' ``` ### Response #### Success Response (200) - **[Response fields will be detailed here based on actual API response]** (object) - A JSON object containing the linked fields data. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Create New User Source: https://team-asset-panda.readme.io/reference/use-cases-and-workflow Creates a new user account within your Asset Panda account. This allows you to add new employees or administrators to the system. ```APIDOC ## POST /v3/users ### Description Creates a new user account in the Asset Panda system. Can be used to add new employees or administrators. ### Method POST ### Endpoint https://api.assetpanda.com/v3/users ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **user_details** (object) - Required - An object containing the details for the new user, including 'name', 'email', and 'role' (e.g., 'administrator'). Optionally, can include 'duplicate_from_user_id' to copy permissions. ### Request Example ```json { "user_details": { "name": "Wonder Woman", "email": "wonder.woman@superheroes.inc", "role": "administrator", "duplicate_from_user_id": 1 } } ``` ### Response #### Success Response (201) - **id** (integer) - The ID of the newly created user. - **message** (string) - Confirmation message. #### Response Example { "id": 6, "message": "User created successfully." } ```