qurplus/topdesk-asset-management-php-client


Keywords
php, rest, api, sdk, asset management, openapi, openapitools, openapi-generator, topdesk
License
Unlicense

Documentation

OpenAPIClient-php

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.12.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit http://www.topdesk.com

Requirements

PHP 7.2 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Topdesk\AssetManagement\Api\AssetLinksApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$source_id = 'source_id_example'; // string | The ID of the source asset

try {
    $result = $apiInstance->getLinkedAssets($source_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetLinksApi->getLinkedAssets: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://http:/tas/api

Class Method HTTP request Description
AssetLinksApi getLinkedAssets GET /assetmgmt/assetLinks Return linked assets.
AssetLinksApi link POST /assetmgmt/assetLinks Link asset to target asset.
AssetLinksApi possibleRelations GET /assetmgmt/assetLinks/possibleRelations Return the list of possible relations between source and target asset
AssetLinksApi unlink DELETE /assetmgmt/assetLinks/{relationId} Remove link between two assets
AssetManagementImportAPIApi archiveAsset POST /assetmgmt/assets/templateId/{templateId}/{assetId}/archive Archives an asset.
AssetManagementImportAPIApi createByImport POST /assetmgmt/assets/templateId/{templateId} Creates a new asset.
AssetManagementImportAPIApi getAllAssets GET /assetmgmt/import/assets Returns a list of all non-archived assets
AssetManagementImportAPIApi getAssets GET /assetmgmt/assets/templateId/{templateId} Returns a list of all assets of a given type.
AssetManagementImportAPIApi getCardTypeTemplates GET /assetmgmt/cardTypes Returns a list of all asset templates.
AssetManagementImportAPIApi getDropdownValues GET /assetmgmt/dropdowns/{dropdownId} Returns a list of all options for a given dropdown.
AssetManagementImportAPIApi getOrCreateDropdownValue POST /assetmgmt/dropdowns/{dropdownId} Retrieves or creates an option for a given dropdown.
AssetManagementImportAPIApi modifyByImport PATCH /assetmgmt/assets/templateId/{templateId}/{assetId} Updates an existing asset.
AssetManagementImportAPIApi replaceChild PUT /assetmgmt/import/assets/{assetId}/links/child Sets the children of an asset.
AssetManagementImportAPIApi replaceIncoming PUT /assetmgmt/import/assets/{assetId}/links/incoming/{linkTypeId} Sets an asset's dependencies according to a specific link type.
AssetManagementImportAPIApi replaceOutgoing PUT /assetmgmt/import/assets/{assetId}/links/outgoing/{linkTypeId} Sets an asset's provided links according to a specific link type.
AssetManagementImportAPIApi replaceParent PUT /assetmgmt/import/assets/{assetId}/links/parent Sets the parents of an asset.
AssetManagementImportAPIApi updateBranchLinks PUT /assetmgmt/assets/templateId/{templateId}/{assetId}/assignment/branches Assigns branches to an asset.
AssetManagementImportAPIApi updateLocationLinks PUT /assetmgmt/assets/templateId/{templateId}/{assetId}/assignment/locations Assigns locations to an asset.
AssetManagementImportAPIApi updatePersonGroupLinks PUT /assetmgmt/assets/templateId/{templateId}/{assetId}/assignment/personGroups Assigns person groups to an asset.
AssetManagementImportAPIApi updatePersonLinks PUT /assetmgmt/assets/templateId/{templateId}/{assetId}/assignment/persons Assigns persons to an asset.
AssetsApi archiveAsset POST /assetmgmt/assets/{assetId}/archive Archives an asset.
AssetsApi create POST /assetmgmt/assets Creates a new asset.
AssetsApi delete POST /assetmgmt/assets/delete Deletes several assets
AssetsApi getAssetById GET /assetmgmt/assets/{assetId} Retrieves an asset based on the given assetId.
AssetsApi getAssets GET /assetmgmt/assets Returns assets which meet the given criterias.
AssetsApi getBlankAsset GET /assetmgmt/assets/blank Retrieves a blank, not-yet-persisted asset based on the given templateId or templateName.
AssetsApi getGridFieldValues GET /assetmgmt/assets/getGridFieldValues Gets assets of grid field.
AssetsApi unarchiveAsset POST /assetmgmt/assets/{assetId}/unarchive Unarchives an asset.
AssetsApi update POST /assetmgmt/assets/{assetId} Updates an existing asset.
AssignmentsApi assign PUT /assetmgmt/assets/assignments Add assignment between location, person, branch, incident or persongroup and a single asset.
AssignmentsApi assign_0 PUT /assetmgmt/assets/{assetId}/assignments Add assignment between location, person, branch or persongroup and a single asset.
AssignmentsApi getAssignments GET /assetmgmt/assets/{assetId}/assignments Get assignments for asset.
AssignmentsApi removeMultipleAssignments POST /assetmgmt/assets/unlink/{type}/{targetId} Deletes links between the specified entity and a single asset.
AssignmentsApi unassign DELETE /assetmgmt/assets/{assetId}/assignments/{linkId} Remove an assigned branch, location, person or persongroup
CapabilitiesApi archiveCapability POST /assetmgmt/capabilities/{capabilityId}/archive Archives a capability.
CapabilitiesApi create POST /assetmgmt/capabilities Create a new capability.
CapabilitiesApi get GET /assetmgmt/capabilities Returns list of all capabilities.
CapabilitiesApi getCapability GET /assetmgmt/capabilities/{capabilityId} Returns the capability with the id specified in the path.
CapabilitiesApi unarchiveCapability POST /assetmgmt/capabilities/{capabilityId}/unarchive Unarchives a capability.
CapabilitiesApi update POST /assetmgmt/capabilities/{capabilityId} Update the name of an existing capability
FieldsApi get GET /assetmgmt/fields/{fieldId} Returns the field's definition.
TemplatesApi getAll GET /assetmgmt/templates Returns all templates.
UploadsApi callList GET /assetmgmt/uploads Retrieves list of uploaded blobs of the given selector, e.g. asset.
UploadsApi delete DELETE /assetmgmt/uploads/{uploadId} Removes an uploaded document.
UploadsApi upload POST /assetmgmt/uploads Uploads one or more blobs.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

info@topdesk.com