Rule Pack Api Install

Rule Pack Api Install
Install a stored Rule Pack review

Installs the stored review in one transaction after verifying the stored files again. Changes Rule rows only: no Policy is marked unpublished and nothing is published. Requires the ADMIN role.

Request
URI
POST
https://{api_host}/api/v1/rules/pack/install
COPY
Request Body

The stored review to install: its reviewId and artifactSha256, and confirmRetirement when the install retires Rules.

RulePackInstallRequest of type(s) application/json
Required  

Show optional properties

{
    "reviewId": "string",
    "artifactSha256": "string"
}
{
    "reviewId": "00000000-0000-4000-8000-000000000051",
    "artifactSha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    "confirmRetirement": false
}
string As uuid As uuid
reviewId
Required  

As the review response returned it

string As ^[0-9a-f]{64}$
artifactSha256
Required  

The review response artifactSha256

boolean
confirmRetirement
Optional

Confirms a pack whose review showed retirementNeedsConfirmation; absent means false

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The result of the install

Returns RulePackInstallResultDto of type(s) application/json
{
    "packSequence": 2,
    "packVersion": "1.1.0",
    "status": "INSTALLED",
    "added": 1,
    "updated": 1,
    "unchanged": 12,
    "retired": 0
}
integer As int64 As int64
packSequence
Required  

Sequence number of the pack, from its manifest

string
packVersion
Required  

Version text of the pack, from its manifest

string
status
Required  

ALREADY_INSTALLED means the ledger already records this exact pack: nothing changed and every count is 0.

  • INSTALLED: The pack was applied by this request; the counts are this install's
  • ALREADY_INSTALLED: The ledger already records this exact pack: nothing was written and every count is 0
Enumeration: INSTALLED, ALREADY_INSTALLED
integer As int32 As int32
added
Required  

Number of Built-in Rules the install added; 0 when ALREADY_INSTALLED

integer As int32 As int32
updated
Required  

Number of Built-in Rules the install updated; 0 when ALREADY_INSTALLED

integer As int32 As int32
unchanged
Required  

Number of pack entries identical to the stored rule and not written; 0 when ALREADY_INSTALLED

integer As int32 As int32
retired
Required  

Number of Built-in Rules the install retired; 0 when ALREADY_INSTALLED


400

400 Bad Request: MALFORMED_REQUEST or VALIDATION_FAILED

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: FORBIDDEN or CSRF_ERROR. CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


409

409 Conflict: REVIEW_EXPIRED (no stored review with this reviewId), REVIEW_MISMATCH or RETIREMENT_NEEDS_CONFIRMATION

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


413

413 Content Too Large: PACK_TOO_LARGE

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


415

415 Unsupported Media Type: UNSUPPORTED_MEDIA_TYPE

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


422

422 Unprocessable Content: the stored pack no longer verifies (a PACK_* code), or PACK_ENTRY_INVALID with the import code as reason

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


503

503 Service Unavailable: TRUST_PROFILE_INVALID or CONSOLE_VERSION_UNKNOWN

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"reviewId":"string","artifactSha256":"string"}' https://{api_host}/api/v1/rules/pack/install