Skip to main content

"describeCodePackageHistory"

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

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

API actionJSON ADMIN APIjsonActiondescribeCodePackageHistorydescribeCodePackagesHistorydescribesCodePackageHistorydescribesCodePackagesHistorydescribe code package history
Table 1. Params property summaries

Property

Description

Default

Type

Limits (inclusive)

databaseName

specifies the name of the database

Defaults to the session's "defaultDatabaseName" property

string

ownerName

specifies the name of the owner

Defaults to the session's "defaultOwnerName" property

string

codeName

specifies the name of the code package

Required - No default value

string

codeFormat

specifies the encoding of the code in the code property

"utf8"

string

"utf8"

minCodeVersion

returns code packages starting on or after the specified version

First version

integer

maxCodeVersion

returns code packages up to and including the specified version

Current version

integer

skipRecords

specifies the number or results to skip

0

integer

maxRecords

specifies the maximum number or results to return

20

integer



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

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

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

"codeFormat" is an optional string that specifies the encoding of code in the code property. You must encode you 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.

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

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

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

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