Viaboo.com media API documentation.

/general/entityMediaPanel.php - returns entityMedia manager

Input parameters:
  • entity : ViabooAPI entity name 'poi' | 'geo' ☆
  • idEntity : ViabooAPI idEntity ☆
  • accessToken : ViabooAPI accessToken
Output:
  • HTML Page

/general/entityMediaList.php - returns entityMedia list

Input parameters:
  • entity : ViabooAPI entity name 'poi' | 'geo' ☆
  • idEntity : ViabooAPI idEntity ☆
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data

/general/entityMediaInsert.php - insert new Media to database

Input parameters:
  • entity : ViabooAPI entity name 'poi' | 'geo' ☆
  • idEntity : ViabooAPI idEntity ☆
  • mediaInfo : JSON
                  {
                    "sourceFileUrl" : string,        // source file location
                    "type" : string,                 // "image" | "video" | "audio"
                    "source" : string,
                    "author" : string,
                    "licence" : string,
                    "oryginalFileName" : string,                
                    "userAccepted" : string,         // "yes" | "no"
                    "titleEn" : string,
                    "descriptionEn" : string,
                    "imageWidth" : int,
                    "imageHeight" : int,
                    "group" : string,
                    "order" : int
                  }
                  
  • accessToken : ViabooAPI accessToken


  • You can sent all params as serialized data too... In this case mediaInfo should not be (inside) serialized!
Output:
  • JSON data

/general/entityMediaUpdate.php - update media in database

Input parameters:
  • idMedia : ViabooAPI idMedia ☆
  • mediaInfo : JSON
                  {
                    "type" : string, // "image" | "video" | "audio"
                    "source" : string,
                    "author" : string,
                    "licence" : string,
                    "meta" : [
                      {
                        "name" : string ☆,
                        "language" : string ☆,
                        "value" : string,
                      },
                      ( ... )                    
                    ],
                    "entity" : [
                      {
                        "entity" : string ☆,
                        "idEntity" : string ☆,
                        "order" : int,
                        "group" : string
                      },
                      (...)
                    ]
                    
                  }
                  
  • accessToken : ViabooAPI accessToken


  • You can sent all params as serialized data too... In this case mediaInfo should not be (inside) serialized!
Output:
  • JSON data

/general/entityMediaDelete.php - delete media from entity or database

Input parameters:

By entity and idEntity:
  • accessToken : ViabooAPI accessToken
  • entity : ViabooAPI entity name 'poi' | 'geo' ☆
  • idEntity : ViabooAPI idEntity ☆
  • idMedia : ViabooAPI idMedia ☆
  • deleteMode : delete mode:
                'entity-relation' - delete relation to entity.
                'entity-relation-and-db' - delete relation to entity and media and mediaMeta if there is olny one entity connected to it.
                
By idMedia:
  • accessToken : ViabooAPI accessToken
  • idMedia : ViabooAPI idMedia ☆
  • deleteMode : delete mode:
                'force-all' - delete all media data and all connentions to entities.
                
Output:
  • JSON data

/general/entityMediaImageFirst.php - returns first image for entity

Input parameters:
  • entity : ViabooAPI entity name 'poi' | 'geo' ☆
  • idEntity : ViabooAPI idEntity ☆
  • type : 'thumb' | 'full' - default is thumb (320x200 cropped)
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data

/general/geoDetails.php - returns geo list and all geo data to build full path to top of geo tree.

Input parameters:
  • idGeoList : ( optional to searchText ) JSON ViabooAPI idGeo list array ☆
  • searchText : ( optional to idGeoList ) string ☆
  • languages : JSON array language code list eg. 'pl', 'de' ,'en' ... ☆
  • returnGeoIndex : optional (string) yes | no - returns array index as idGeo
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data

/general/geoDescendants.php - returns descendants items for selected idGeo .

Input parameters:
  • idGeo : (int) ViabooAPI idGeo ☆
  • depth : (int) 0 - all ; 1 - only children, 2 - children and grandchildren ..., n - any selected depth ☆
  • languages : JSON array language code list eg. 'pl', 'de' ,'en' ... ☆
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data

/general/geoMerge.php - merge two geo ( primaryGeoId, secondaryGeoId ) entities to one. Replaces all secondaryGeoId to primaryGeoId.

Input parameters:
  • idGeoPrimary : ViabooAPI idGeo list array ☆
  • idGeoSecondary : ViabooAPI idGeo list array ☆
  • accessToken : ViabooAPI accessToken
Output:
  • JSON operation status

/general/stageDetails.php - returns trip stage informations.

Input parameters:
  • idTrip : (int) ViabooAPI idTrip ☆
  • stageNo : (int) stage number ☆
  • languages : JSON array language code list eg. 'pl', 'de' ,'en' ... ☆
  • mode : (string) dataOnly | html ( default is dataOnly )
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data

/general/tripStagesSetAutoAttributes.php (DEPRECATED) - update all trip stages autoamitic attributes.

Input parameters:
  • idTrip : (int) ViabooAPI idTrip ☆
  • accessToken : ViabooAPI accessToken
Output:
  • JSON data