Containeur (API)
De Wiki1000
(Différences entre les versions)
(Une révision intermédiaire par un utilisateur est masquée) | |||
Ligne 1 : | Ligne 1 : | ||
− | Les | + | Les containers peuvent être accédés en HTTP via l'API [[SData]] |
{|class="wikitable" | {|class="wikitable" | ||
Ligne 7 : | Ligne 7 : | ||
!HTTP | !HTTP | ||
|- | |- | ||
− | |Liste des | + | |Liste des containers |
|xml, json | |xml, json | ||
|GET | |GET | ||
|- | |- | ||
− | |Propriété de | + | |Propriété de container |
|xml, json | |xml, json | ||
|GET | |GET | ||
|- | |- | ||
− | |Liste des documents d'un | + | |Liste des documents d'un container |
|xml, json | |xml, json | ||
|GET | |GET | ||
Ligne 34 : | Ligne 34 : | ||
Exemples : | Exemples : | ||
− | '''Liste des | + | '''Liste des containers :''' |
<pre> | <pre> | ||
Ligne 54 : | Ligne 54 : | ||
</pre> | </pre> | ||
− | '''Liste des documents d'un | + | '''Liste des documents d'un container:''' |
<pre> | <pre> | ||
GET URL:https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/documents | GET URL:https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/documents | ||
Ligne 112 : | Ligne 112 : | ||
DELETE https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/document?name=facs-FC ETS000003.pdf | DELETE https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/document?name=facs-FC ETS000003.pdf | ||
</pre> | </pre> | ||
− | |||
− | |||
[[Category:SData]] | [[Category:SData]] | ||
+ | [[Category:Container]] |
Version actuelle en date du 10 mars 2020 à 16:44
Les containers peuvent être accédés en HTTP via l'API SData
Opération | Support | HTTP |
---|---|---|
Liste des containers | xml, json | GET |
Propriété de container | xml, json | GET |
Liste des documents d'un container | xml, json | GET |
Obtenir un document | xml | GET |
Ajouter un document | xml | POST |
Supprimer un document | xml,json | DELETE |
Exemples :
Liste des containers :
GET URL:https://xx/myservice/server/sdata/l1000/admin/-/containers OK :200 Request Header Host = xx Request Header Accept = application/xml Request Header Accept-Charset = ISO-8859-1,utf-8;q=0.7,*;q=0.7 Request Header Accept-Language = en-us,en;q=0.5 Response Connection=close Response Header Connection = close Response Header Content-Type = application/atom+xml; charset=UTF-8 Response Header Content-Length = 20322 Response Header Date = Thu, 11 Jan 2018 14:14:30 GMT Response Header Last-Modified = Sat, 30 Dec 1899 00:00:00 GMT // // Content is container list in format depending of request's Accept //
Liste des documents d'un container:
GET URL:https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/documents OK :200 Request Header Host = xx Request Header Accept = application/xml Request Header Accept-Charset = ISO-8859-1,utf-8;q=0.7,*;q=0.7 Request Header Accept-Language = en-us,en;q=0.5 Response Connection=close Response CacheControl= Response Header Connection = close Response Header Content-Type = application/atom+xml; charset=UTF-8 Response Header Content-Length = 4879017 Response Header Date = Thu, 11 Jan 2018 14:16:54 GMT Response Header Last-Modified = Sat, 30 Dec 1899 00:00:00 GMT // // Response is document list in format depending of request's Accept //
Obtenir un document (download) :
GET URL:https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/document?name=FAC000001_3B0B57614C0D40BEBC46E37D2B25.pdf OK :200 Request Header Host = xx Request Header Accept = application/octet-stream Request Header Accept-Charset = ISO-8859-1,utf-8;q=0.7,*;q=0.7 Request Header Accept-Language = en-us,en;q=0.5 Response Connection=close Response CacheControl= Response Header Connection = close Response Header Content-Type = application/pdf; charset=ISO-8859-1 Response Header Content-Length = 17378 Response Header Date = Thu, 11 Jan 2018 14:28:18 GMT Response Header Last-Modified = Sat, 30 Dec 1899 00:00:00 GMT // // Request Accept must be application/octet-stream // Response is document in octet-stream // Response Content-Type is set depending of document /
Ajouter un document (upload) :
POST : URL:https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/$service/upload Request Content-Type = application/octet-stream Request Content-Disposition = attachment; filename="facs-FC ETS000003.pdf" // // Content-Type is required // Content-Disposition is required // Request content is the binary encoded data //
Supprimer un document :
DELETE https://xx/myservice/server/sdata/l1000/admin/-/container(000000000000000000AE0000281B0009)/document?name=facs-FC ETS000003.pdf