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.
Request example
Minimal
{
"action": "describeCodePackageHistory",
"params": {
"databaseName": "faircom",
"ownerName": "admin",
"codeName": "convertTemperature",
"codeFormat": "utf8",
"minCodeVersion": 5,
"maxCodeVersion": 13,
"skipRecords": 100,
"maxRecords": 25
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response example
Minimal
{
"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"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
codeFormat |
The "codeFormat" property 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. |
Optional with default of "utf8"
|
string | "utf8" |
codeName |
The It is an error to set The package's unique identifier is the combination of |
Required - No default value | string | 1 to 64 bytes |
databaseName |
The You specify this property when you want to use a different database instead of the default. Your session's account must have the appropriate privileges to access the code package. This property is useful because objects, such as tables and code packages, can have the same name in multiple databases. This feature allows you to create multiple environments in the same server and reuse the same JSON actions in each environment. For example, you can create It is an error to set If no default database is specified during |
Defaults to the session's "defaultDatabaseName" property |
string | 1 to 64 bytes |
maxCodeVersion |
The "maxCodeVersion" property causes the server to return code packages up to and including the specified version. |
Optional with default of the current version | integer |
1 to 2147483647
|
maxRecords |
The "maxRecords" property specifies the maximum number of records to be returned. 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". |
Optional with default of 20 |
integer |
-1 to 65535
|
minCodeVersion |
The "minCodeVersion" property causes the server to return code packages starting with the specified version. |
Optional with default of the first version | integer |
1 to 2147483647
|
ownerName |
The You specify this property when you want to use a different account instead of the default. Your session's account must have the appropriate privileges to access the code package. This property is useful because objects, such as tables and code packages, can have the same name in the same database as long as different accounts own each object. This feature allows you to create duplicate objects for different users on the same server and reuse the same JSON actions on those objects. For example, an administrator can copy objects from a production environment to her account so she can troubleshoot an issue using the same JSON actions, JavaScript, and SQL code. It is an error to set If no default owner is specified during |
Optional with default of the session's "defaultOwnerName" property |
string | 1 to 64 bytes |
skipRecords |
The "skipRecords" property specifies the number of records to skip over when paginating the results. 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". |
Optional with default of 0
|
integer |
0 to 9223372036854775807
|