en:server_api
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:server_api [2026/06/03 08:47] – administrator | en:server_api [2026/06/03 09:55] (current) – [API URL] administrator | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | |||
| This article describe how to use API to exchange data with iGarment System. Please note that iGarment API infra structure can only work with Unicode (UTF8) data, thus only support if your company is using iGarment version 5 or above. | This article describe how to use API to exchange data with iGarment System. Please note that iGarment API infra structure can only work with Unicode (UTF8) data, thus only support if your company is using iGarment version 5 or above. | ||
| - | The exchange data is either JSON or XJSON depending on the HTTP Content-Type header. It is either application/ | + | The exchange data is either JSON or XJSON depending on the HTTP Content-Type header. It is either application/ |
| We use JSON Schema to specify our document, if you want to learn more about JSON Schema, you may like to visit the following sites: | We use JSON Schema to specify our document, if you want to learn more about JSON Schema, you may like to visit the following sites: | ||
| Line 15: | Line 14: | ||
| '' | '' | ||
| - | |||
| ===== API URL ===== | ===== API URL ===== | ||
| Line 25: | Line 23: | ||
| https:// | https:// | ||
| + | **Authentication method** | ||
| + | To use iGarment API, you need to obtain a API KEY from your account manager and put the domain (database name) and the api-key in the Authorization Header of each HTTP request. Note that Authorization Header needs to be encoded in Base64. | ||
| + | Example, let said you want to send an api request for the domain ' | ||
| + | |||
| + | keyinfo = base64.b64encode(b' | ||
| + | headers = {' | ||
| + | | ||
| (Example in Apifox) | (Example in Apifox) | ||
| - | + | var cryptoJs = require(" | |
| + | |||
| + | const igx_key = ' | ||
| + | const keyArray = cryptoJs.enc.Utf8.parse(igx_key); | ||
| + | pm.environment.set(" | ||
| + | | ||
| ===== Error ===== | ===== Error ===== | ||
| Line 54: | Line 63: | ||
| ===== API Specification by catagory ===== | ===== API Specification by catagory ===== | ||
| - | Database Query API (url: ~/db) | + | * [[db_api|Database Query API]] |
| - | Document API (url: ~/jdoc) | + | |
| + | * [[doc_api|Document API]] | ||
en/server_api.1780476458.txt.gzip · Last modified: by administrator
