Utilisation du contrôleur de partage (API)

De Wiki1000
(Différences entre les versions)
(Changement du mode de restitution)
(Changement du mode de restitution)
 
(Une révision intermédiaire par un utilisateur est masquée)
Ligne 95 : Ligne 95 :
 
</pre>
 
</pre>
  
{tip|Utilisez "" ou "*" pour passer en restitution sur toutes les sociétés}}
+
{{tip|Utilisez "" ou "*" pour passer en restitution sur toutes les sociétés}}
 +
 
 +
<pre>
 +
POST https://.../sdata/TdbfSharingController/changemoderestitution
 +
{
 +
"iModeRestitution":true,
 +
"iSocieties":"*"
 +
}
 +
 
 +
200OK
 +
{
 +
    "aReason": "",
 +
    "result": true
 +
}
 +
</pre>
  
 
===Changement de la famille de restitution===
 
===Changement de la famille de restitution===

Version actuelle en date du 20 octobre 2021 à 16:55

Sommaire

Introduction

Le contrôleur de partage permet d'obtenir les informations de partage associés à l'utilisateur du jeton d'authentification.

Tip-20px.png Tip : Le contrôleur de partage ne retourne que les sociétés utilisables par l'utilisateur.

Interrogation du contexte de partage

GET https://.../sdata/TdbfSharingController
200 OK
{
    "$url": "http://localhost:8080/sdata/repository/TdbfSharingController",
    "stamp": "00000000",
    "Caption": "",
    "CurrentFamilly": {},
    "CurrentSociety": {
        "$key": "FFFFFFFFFFFFEEEE0003C57300000007",
        "$url": "http://localhost:8080/sdata/repository/TdbfShareSocietyView('FFFFFFFFFFFFEEEE0003C57300000007')"
    },
    "CurrentUser": "sage",
    "FamillyViewList": [
        {
            "$key": "FFFFFFFFFFFFEEEE0004C5730000000C",
            "Caption": "S1 & S2  Editions",
            "PerimetreRestitution": {
                "$key": "1B28EFFFF1C3000200F20000000300CA",
                "$url": "http://localhost:8080/sdata/repository/TdbfPerimetreRestitution('1B28EFFFF1C3000200F20000000300CA')"
            }
        },
        ....
    ],
    "Filter": "",
    "FilteredCount": 0,
    "FilteredStatus": "0 société(s) filtré(s)",
    "ModeRestitution": true,
    "ModeRestitutionAllSocieties": false,
    "ShareEnable": true,
    "ShowActive": true,
    "ShowInactive": false,
    "SocietyViewList": [
        {
            "$key": "FFFFFFFFFFFFEEEE0003C57300000007",
            "Caption": "S1",
            "Active": true,
            "Checked": true,
            "Company": {
                "$key": "1B28EFFFF1C3000200F1000000030009",
                "$url": "http://localhost:8080/sdata/repository/TitObject('1B28EFFFF1C3000200F1000000030009')"
            },
            "CompanyName": "Société S1",
            "PerimeterName": "S1",
            "PerimetrePartage": {
                "$key": "1B28EFFFF1C30002000300000003000B",
                "$url": "http://localhost:8080/sdata/repository/TdbfPerimetrePartage('1B28EFFFF1C30002000300000003000B')"
            },
            "Status": {
                "value": "Production",
                "title": "Production"
            },
            "Visible": true
        },
        ....
    ],
    "UserHasSuperRights": true
}

Changement de la société courante

POST https://.../sdata/TdbfSharingController/changesociety
{
"iName":"S2"
}

200OK
{
    "aReason": "",
    "result": true
}

Changement du mode de restitution

POST https://.../sdata/TdbfSharingController/changemoderestitution
{
"iModeRestitution":true,
"iSocieties":"S1,S3"
}

200OK
{
    "aReason": "",
    "result": true
}
Tip-20px.png Tip : Utilisez "" ou "*" pour passer en restitution sur toutes les sociétés
POST https://.../sdata/TdbfSharingController/changemoderestitution
{
"iModeRestitution":true,
"iSocieties":"*"
}

200OK
{
    "aReason": "",
    "result": true
}

Changement de la famille de restitution

POST https://.../sdata/TdbfSharingController/changefamilly
{
"iName":"S1 & S2  Editions"
}

200OK
{
    "aReason": "",
    "result": true
}




Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Outils personnels