Skip to main content

"describeCodePackageHistory" (jsonAction)

JSON ADMIN "describeCodePackageHistory" action returns historical information about the specified code packages

The "describeCodePackageHistory" action returns historical information about the specified code package names. It returns historical versions of the code package including code and metadata.

You can use the optional "minCodeVersion" and "maxCodeVersion" properties to limit the versions returned.

You can use the optional "skipRecords" and "maxRecords" properties to paginate the results.

Request example

{ 
  "api": "admin",
  "action": "describeCodePackageHistory",
  "params": {
    "databaseName": "faircom",
    "ownerName": "admin",
    "codeName": "convertTemperature",
    "codeFormat": "utf8",
    "minCodeVersion": 5,
    "maxCodeVersion": 13,
    "skipRecords": 100,
    "maxRecords": 25
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "result": {
    "data": []
  },
  "debugInfo": {
    "request": {
      "api": "admin",
      "action": "describeCodePackageHistory",
      "params": {
        "databaseName": "faircom",
        "ownerName": "admin",
        "codeName": "convertTemperature",
        "codeFormat": "utf8",
        "minCodeVersion": 5,
        "maxCodeVersion": 13,
        "skipRecords": 100,
        "maxRecords": 25
      },
      "debug": "max",
      "authToken": "replaceWithAuthTokenFromCreateSession"
    }
  },
  "errorCode": 0,
  "errorMessage": "",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

Use the describeCodePackageHistory API action to return historical information about the specified code package names

API actionJSON ADMIN APIjsonActiondescribeCodePackageHistorydescribeCodePackagesHistorydescribesCodePackageHistorydescribesCodePackagesHistorydescribe code package historycodepackage
Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

codeFormat

(optional) specifies the encoding of the code in the code property

"utf8"

string

"utf8"

codeName

specifies the name of the code package

Required - No default value

string

databaseName

(optional) specifies the name of the database

Defaults to the session's "defaultDatabaseName" property

string

maxCodeVersion

(optional) returns code packages up to and including the specified version

Current version

integer

maxRecords

(optional) specifies the maximum number or results to return

20

integer

minCodeVersion

(optional) returns code packages starting on or after the specified version

First version

integer

ownerName

(optional) specifies the name of the owner

Defaults to the session's "defaultOwnerName" property

string

skipRecords

(optional) specifies the number or results to skip

0

integer



"codeFormat" is an optional string that specifies the encoding of code in the code property. You must encode your code to embed it in a JSON string. "codeFormat" currently only supports the "utf8" encoding, requiring you to use JSON rules to escape problem characters in your code with the \ backslash character, such as \n.

"codeName" is a required string containing the user-defined name for the code package. The package's unique identifier is the combination of "databaseName", "ownerName", and "codeName".

"databaseName" is an optional string specifying the database name of the code package. It defaults to the session's "defaultDatabaseName" property when omitted or set to null. The package's unique identifier is the combination of "databaseName", "ownerName", and "codeName".

"maxCodeVersion" is an optional integer and defaults to the current version of the code package. If specified, the server returns code packages up to and including the specified version.

"maxRecords" is an optional string value that defaults to 20. It is used with "skipRecords" to paginate the results. If the value is not null or omitted, the server returns the maximum number of results specified by "maxRecords".

"minCodeVersion" is an optional integer that defaults to the code package's first version. If specified, the server returns code packages starting with the specified version.

"ownerName" is an optional string specifying the account name that owns the code package. It defaults to the session's "defaultOwnerName" property when omitted or set to null. The package's unique identifier is the combination of "databaseName", "ownerName", and "codeName".

"skipRecords" is an optional string value that defaults to 0. It is used with "maxRecords" to paginate the results. If the value is not null or omitted, the server returns results from the beginning. If it is > 0, the server skips over the specified number of records and returns results starting from that point up until it returns the maximum number of results as defined by "maxRecords".

Would you like to provide feedback?