{"id":788,"date":"2023-06-30T10:40:14","date_gmt":"2023-06-30T10:40:14","guid":{"rendered":"https:\/\/doc.bim.fm\/index.php\/docs\/multi-api\/"},"modified":"2023-06-30T14:00:21","modified_gmt":"2023-06-30T14:00:21","slug":"api-2","status":"publish","type":"docs","link":"https:\/\/doc.bim.fm\/index.php\/docs\/api-2\/","title":{"rendered":"API"},"content":{"rendered":"\n<h2>Introduction<\/h2>\n\n\n\n<p>API est l&#8217;abr\u00e9viation de Application Programming Interface (interface de programmation d&#8217;applications). En termes simples, les API sont un ensemble de fonctions et de proc\u00e9dures qui permettent de cr\u00e9er des applications qui acc\u00e8dent aux donn\u00e9es et aux caract\u00e9ristiques d&#8217;autres applications, services ou syst\u00e8mes d&#8217;exploitation.<\/p>\n\n\n\n<p>Dans notre cas, vous pouvez utiliser notre API facilement gr\u00e2ce \u00e0 notre paquetage nugget disponible pour l&#8217;application .NET.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2><a href=\"https:\/\/doc.bim.fm\/index.php\/docs\/multi-api\/authentification\/\" data-type=\"docs\">Authentification<\/a><\/h2>\n\n\n\n<h2><a href=\"https:\/\/doc.bim.fm\/index.php\/docs\/multi-api\/verrouiller-le-fichier\/\" data-type=\"docs\">Verrouiller le fichier<\/a><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h2>Informations utiles sur les classes<\/h2>\n\n\n\n<h4>ResponseApi<\/h4>\n\n\n\n<p>Dans tous vos appels, le paquet Nugget vous enverra un objet ResponseApi<\/p>\n\n\n\n<p>La classe est d\u00e9finie comme suit :<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Attribut<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>ErrorCode<\/td><td>string<\/td><td>Code d&#8217;erreur envoy\u00e9 par le serveur. Si votre demande contient une erreur, cet attribut sera instanci\u00e9. Il contiendra toujours un nombre avec un index de l&#8217;Enum ErrorCode en dessous de ce tableau.<\/td><\/tr><tr><td>Status<\/td><td>int<\/td><td>Code d&#8217;\u00e9tat http<\/td><\/tr><tr><td>Detail<\/td><td>List<\/td><td>Liste des messages d&#8217;erreur<\/td><\/tr><tr><td>Result<\/td><td>T (depends of the Rqs)<\/td><td>R\u00e9sultat du mod\u00e8le Dto<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4>ErrorCode Enum<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Key<\/strong><\/td><td><strong>Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>-2<\/td><td>BAD_REQUEST<\/td><td><\/td><\/tr><tr><td>-1<\/td><td>PARAMETERS_ERROR<\/td><td><\/td><\/tr><tr><td>0<\/td><td>PERSISTENCE_EXCEPTION<\/td><td><\/td><\/tr><tr><td>1<\/td><td>INSTANCE_NOT_FOUND<\/td><td><\/td><\/tr><tr><td>2<\/td><td>USER_NOT_CREATE_ON_IDENTITY_SERVER<\/td><td><\/td><\/tr><tr><td>3<\/td><td>INVALID_GUID<\/td><td><\/td><\/tr><tr><td>4<\/td><td>USER_NOT_REGISTER<\/td><td><\/td><\/tr><tr><td>5<\/td><td>INSTANCE_ALREADY_EXIST<\/td><td><\/td><\/tr><tr><td>6<\/td><td>PERMISSION_DENY<\/td><td><\/td><\/tr><tr><td>7<\/td><td>EXPECTED_MULTIPART_REQUEST<\/td><td><\/td><\/tr><tr><td>8<\/td><td>FORM_DATA_PRESENT<\/td><td><\/td><\/tr><tr><td>9<\/td><td>UPLOADED_FILE_IS_EMPTY<\/td><td><\/td><\/tr><tr><td>10<\/td><td>FORMAT_EXCEPTION<\/td><td><\/td><\/tr><tr><td>11<\/td><td>ELASTIC_SEARCH_ERROR<\/td><td><\/td><\/tr><tr><td>12<\/td><td>IFC_UPDATE<\/td><td><\/td><\/tr><tr><td>13<\/td><td>IFC_GET<\/td><td><\/td><\/tr><tr><td>14<\/td><td>STORAGE_NOT_CONNECTED<\/td><td><\/td><\/tr><tr><td>15<\/td><td>STORAGE_FAIL_CREATE<\/td><td><\/td><\/tr><tr><td>16<\/td><td>STORAGE_SWIFT_API_ERROR<\/td><td><\/td><\/tr><tr><td>17<\/td><td>STORAGE_FILE_NOT_FOUND<\/td><td><\/td><\/tr><tr><td>18<\/td><td>INVALID_FORMAT_DATE<\/td><td><\/td><\/tr><tr><td>19<\/td><td>DATABASE_SCHEMA_NOT_VALIDATED<\/td><td><\/td><\/tr><tr><td>20<\/td><td>NHSESSION_ALREADY_EXIST<\/td><td><\/td><\/tr><tr><td>21<\/td><td>FILE_NOT_LOCK<\/td><td><\/td><\/tr><tr><td>22<\/td><td>FILE_ALREADY_LOCK<\/td><td><\/td><\/tr><tr><td>23<\/td><td>FILE_LOCKED<\/td><td><\/td><\/tr><tr><td>24<\/td><td>LOCK_CONFLICT<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"_links":{"self":[{"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/docs\/788"}],"collection":[{"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/comments?post=788"}],"version-history":[{"count":6,"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/docs\/788\/revisions"}],"predecessor-version":[{"id":986,"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/docs\/788\/revisions\/986"}],"next":[{"title":"Tableau de bord","link":"https:\/\/doc.bim.fm\/index.php\/docs\/tableau-de-bord\/","href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/docs\/294"}],"wp:attachment":[{"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/media?parent=788"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/doc.bim.fm\/index.php\/wp-json\/wp\/v2\/doc_tag?post=788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}