当前位置:网站首页>Chapter 21 Source Code File REST API Reference (3)

Chapter 21 Source Code File REST API Reference (3)

2022-08-10 03:31:00 yaoxin521123

第二十一章 源代码文件 REST API 参考(三)

GetDocNames

This method returns a list of source code filenames.可选的 cattype Constrains the type of source code file.

URL

GET http://server:port/api/atelier/v1/namespace/docnames

GET http://server:port/api/atelier/v1/namespace/docnames/cat

GET http://server:port/api/atelier/v1/namespace/docnames/cat/type

其中

  • cat Specifies the category code:CLS = class; RTN = routine; CSP = CSP 文件; OTH = other.默认为 *.
  • type Specifies the source code file type.可以是 * Wildcard or file type.对于 CLS,类型必须是 *.对于 RTN,类型可以是 mac、int、inc、bas 、mvi 或 mvb.对于 CSP,type 可以是 jscss A list of other file types,以逗号分隔.默认为 *.

URL Parameters

  • URL 参数 'generated=1' Specifies that the generated source code files should be included.
  • URL 参数 'filter' Provides one that can be used to match names SQL 过滤器.

JSON Messages

Here is what is returned,An array of source code file descriptors:

{
  "status": {
    "errors": [],
    "summary": ""
  },
  "console": [],
  "result": {
    "content": [
      {
        "name": "%Api.DocDB.cls",
        "cat": "CLS",
        "ts": "2016-08-03 20:01:42.000",
        "upd": true,
        "db": "IRISLIB",
        "gen": false
      },
      ...
      {
        "name": "EnsProfile.mac",
        "cat": "RTN",
        "ts": "2003-09-19 13:53:31.000",
        "upd": true,
        "db": "INVENTORYR",
        "gen": false
      },
      ...
      {
        "name": "xyz.mac",
        "cat": "RTN",
        "ts": "2016-08-11 15:05:02.167",
        "upd": false,
        "db": "INVENTORYR",
        "gen": false
      }
    ]
  }
}

HTTP 返回码

  • HTTP 200 如果正常.
  • HTTP 500 如果发生意外错误(详细信息将在状态错误数组中).

GetModifiedDocNames

This method returns a list of source code files that have been modified since the database had the specified hash value.它以 JSON Pass the database keys and hash list as an array.The hash value is used to determine if there have been any changes in the database defined by that key.通常,First call this with an empty array API 作为传入的 JSON 消息.This will return the names of all source code files in the namespace along with the database key and hash for each file.Then you can publish dbnamedbhash to discover which source code files have been modified on the server since the last call.

Publish a list of source code files to check,如以下示例所示:

[ { "dbname" : "USER",
    "dbhash" : "KWAGbOdnRblPzANaiv1Oiu0BZLI" 
}, ... ]

URL

POST http://server:port/api/atelier/v1/namespace/modified/type

其中:

  • type - Specify the source code file type as * or three-letter code、ls、mac、int、inc、bas 或 mvi.默认为 *.
    This call requires headers Content-Type application/json.

JSON Messages

Here is what is returned,An array of source code file descriptors:

[ { "dbname" : "USER", 
    "dbhash" : "Qx1zuNaulq3b_1yR9ahZAfjkc-",
    "crhash" : "47763751EC",
    "docs": [{
            "name": "User.NewClass1.cls",
            "ts": "2016-01-04 14:00:04.000",
            "gen": false,
            "depl": false
            }, ... ]
   }, ... ]

如果在指定的 dbhash The source code files were removed afterwards,then returns the file in a list,and set the timestamp to an empty string:

"ts": ""

If the database is included due to the mapping and the mapping is dropped,则 dbhashcrhash 都将返回“000”值,并且 docs Returned as an empty array.

HTTP 返回码

  • HTTP 200 如果正常.
  • If the post is empty or the type is not CLS,则 HTTP 400.
  • If the content type is not application/json,则为 HTTP 415.
  • HTTP 500 如果发生意外错误(详细信息将在状态错误数组中).
原网站

版权声明
本文为[yaoxin521123]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208100202026841.html