Skip to main content

"describeCodePackageHistory" (jsonAction)

Return historical information about the specified code packages

The "describeCodePackageHistory" action 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.

Links: Concepts | Tutorials | FAQs

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"
}

The "describeCodePackageHistory" action retrieves historical versions of code packages, including code and metadata. Optional parameters like "minCodeVersion," "maxCodeVersion," "skipRecords," and "maxRecords" allow for version filtering and result pagination. The request requires "codeName" and accepts optional "databaseName" and "ownerName." "codeFormat" defaults to "utf8." Response data is paginated using "skipRecords" and "maxRecords," with default "maxRecords" set to 20. "codeName" is required, while "databaseName" and "ownerName" default to session properties. "maxCodeVersion" defaults to the current version, and "minCodeVersion" to the first version.

API action
JSON ADMIN API
jsonAction
describeCodePackageHistory
describeCodePackagesHistory
describesCodePackageHistory
describesCodePackagesHistory
describe code package history
codepackage
code package history
old code package
previous code package
deprecated code package
code versioning
get code history
version history
jsonAction API
view previous code package
historical code
code history
code package management
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".