• Datei via API hochladen und Workplace anhängen.

    Entwicklung
    2
    2
    0 Votes
    2 Posts
    521 Views
    Michael HuhnM
    @leno2206 das Problem bei Dateien ist, die müssen als Base64 kodiert sein . Datei Objekt erstellen und eine Datei hochladen: { "id": 1, "version": "2.0", "method": "cmdb.object.create", "params": { "type": "C__OBJTYPE__FILE", "title": "UserImage", "categories": { "C__CATS__FILE_VERSIONS": [ { "file_physical": "UserImage.png", "file_content": "BASE64=", "file_title": "UserImage.png" } ] }, "apikey": "key", "language": "en" } } Dann hab ich hier noch ein Beispiel für das Zuweisen einer Datei zu einem Objekt: { "id": 1, "version": "2.0", "method": "cmdb.category.save", "params": { "object": 1123375323, "category": "C__CATG__FILE", "data": { "file": 1123375614, "link": null, "description": null }, "apikey": "key", "language": "en" } } Ps. wenn ich versuche die Datei hochzuladen und direkt zuzuweisen, bekomme ich einen 500er. AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: isys_application::getUploadFilePath(): Argument #1 ($fileName) must be of type string, null given, Dazu erstelle ich einen Bug Report { "id": 1, "version": "2.0", "method": "cmdb.object.create", "params": { "type": "C__OBJTYPE__FILE", "title": "UserImage", "categories": { "C__CATS__FILE_VERSIONS": [ { "file_physical": "UserImage.png", "file_content": "BASE64=", "file_title": "UserImage.png" } ], "C__CATS__FILE_OBJECTS": [ { "assigned_objects": 9 } ] }, "apikey": "key", "language": "en" } }
  • Problems creating person objects

    Development
    3
    0 Votes
    3 Posts
    805 Views
    Michael HuhnM
    And here are the corrected categories { "method": "cmdb.object.create", "params": { "categories": { "C__CATS__PERSON_LOGIN": [ { "disable_login": 1, "username": "logonname" } ], "C__CATS__PERSON_MASTER": [ { "assigned_organization": 31, "phone_company": "+049 3641 111 111", "mail_address": "firstname.lastname@domain.com", "last_name": "lastname", "first_name": "firstname" } ] }, "title": "firstname lastname", "apikey": "apikey", "type": "C__OBJTYPE__PERSON" }, "id": 343653293, "jsonrpc": "2.0" } You can find the Constants here -> https://kb.i-doit.com/en/i-doit-pro-add-ons/api/index.html#attribute-documentation
  • Name of an object in a Relation

    Operating
    3
    4
    0 Votes
    3 Posts
    780 Views
    O
    @qhoang Hello. Yes! I want to see all relations for the object in the same row. So I should update to 1.17.2 version?
  • PHP update von 8.0 auf 8.1

    Allgemein
    4
    0 Votes
    4 Posts
    998 Views
    StefanP74S
    Hallo @Detlev-Runge-0, hmmmmm ... ich habe erst jetzt gelesen, dass du noch auf Debian 10 bist. oa. Anleitung funktioniert unter Debian 11 einwandfrei. LG