Skip to main content

"listCodePackageHistory"

JSON ADMIN "listCodePackageHistory" action returns a list of historical code packages that match all specified filters

The "listCodePackageHistory" action returns a list of code packages from the code package history that match all the specified filters.

Each returned item contains all code package properties except the "code" property. This action helps the user find previous versions of a code package. If you want to retrieve the source code, use the "describeCodePackageHistory" action.

Request examples

{ 
  "api": "admin",
  "action": "listCodePackageHistory",
  "params": {    "databaseName": "faircom",
    "ownerName": "admin",
    "partialName": "convert",
    "codeTypeFilter": [ "transform", "expression" ],
    "statusFilter": [
      "developing",
      "deleted",
      "inactive",
      "deprecated",
      "testing",
      "active"
    ],
    "includeDeactivatedCode": true,
    "minCodeVersion": 5,
    "maxCodeVersion": 13,
    "commentFilter": "words, phrases, NEAR, full-text search",
    "descriptionFilter": "words, phrases, NEAR, full-text search",
    "metadataFilter": "words, phrases, NEAR, full-text search",
    "skipRecords": 100,
    "maxRecords": 25
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{ 
  "api": "admin",
  "action": "listCodePackageHistory",
  "params": {},
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{ 
  "api": "admin",
  "action": "listCodePackageHistory",
  "params": {
    "partialName": "convertTemperature"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{ 
  "api": "admin",
  "action": "listCodePackageHistory",
  "params": {
    "partialName": "convertTemperature",
    "minCodeVersion": 1,
    "maxCodeVersion": 2
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

Response

Includes all information about matching code packages except for the "code" property.

Includes the "codeId" and "codeName" properties. "codeId" is the unique numeric identifier of a code package. It is used internally by the server to reference code package records.

Use the listCodePackageHistory API action to return a list of code packages from the code package history that match all the specified filters

API actionJSON ADMIN APIjsonActionlistCodePackageHistorylistCodePackagesHistorylistsCodePackageHistorylistsCodePackagesHistorylist 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

partialName

returns code packages with names that match its value

""

string

codeTypeFilter

returns code packages with a code type that matches one of the values in the array

[]

array

statusFilter

returns code packages with statuses that match one of the values in the array

[]

array

"developing"
"deleted"
"inactive"
"deprecated"
"testing"
"active"

includeDeactivatedCode

specifies whether or not the results include deactivated code packages

null

Boolean

true
false

minCodeVersion

returns code packages starting on or after the specified version

First version

integer

maxCodeVersion

returns code packages up to an including the specified version

Current version

integer

descriptionFilter

returns code packages with descriptions that match the full-text search in "descriptionFilter"

null

string

metadataFilter

returns code packages with metadata that match the full-text search in the "metadataFilter"

null

string

commentFilter

returns code packages with comments that match the full-text search in "commentFilter"

null

string

skipRecords

specifies the number of results to skip

0

integer

maxRecords

specifies the maximum number of 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".

"partialName" is an optional query filter that returns code packages with code names that match the value of "partialName". The match starts at the name's beginning, making it a "starts with" match instead of a "substring" match. If the partial name is empty, null, or omitted, it matches all names.

"codeTypeFilter" is an optional query filter with an array of code types. If the array is empty, null, or omitted, it matches all code types; otherwise, it returns code packages with a code type that matches one of the array's values.

"statusFilter" is an optional query filter consisting of an array of status values. If the array is empty, null, or omitted, it matches all status values; otherwise, it returns code packages only when their status matches one of the values in the array. If "includeDeactivatedCode" is set to true or false, it overrides conflicting status codes.

"includeDeactivatedCode" is an optional query filter that is a Boolean value. It defaults to null. The results include activated and deactivated code packages if this value is null or omitted. If set to true, the results only include deactivated code packages. If set to false, the results only include activated code packages.

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

"commentFilter" is an optional query filter that is a string value. It defaults to null. If this value is not null or omitted, the results only include code packages with comments that match the full-text search specified in the "commentFilter" property. See Full-text filter expressions.

"descriptionFilter" is an optional string value that defaults to null. If the value is not null or omitted, the results only include code packages with descriptions that match the full-text search specified in the "descriptionFilter" property. See Full-text filter expressions.

"metadataFilter" is an optional string value that defaults to null. If the value is not null or omitted, the results only include code packages with metadata that match the full-text search specified in the "metadataFilter" property. See Full-text filter expressions. A code package's "metadata" property contains a JSON object with user-defined key-value pairs.

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