Update bundle
Updates a bundle.
An update is allowed only if the prototypes of the JavaScript functions in the request are a superset of those in the bundle. The name of the bundle can't be updated.
The role performing this operation must have the CapCodeWriter
capability.
See Access control for more information about how
capabilities are used to control access to operations.
Request
Path parameters
bundle
- string required*The name of a bundle.
Query parameters
custom_audit
- stringCustom audit information to be included in the audit log.
Request body
Details of the bundle including the code that defines the functions as properties of the exports object. Name can't be updated.
- application/json
description
- stringThe description of a model.
code
- stringA base64 encoded self-contained JavaScript code snippet.
{
"name": "example_bundle",
"description": "An example bundle that exports a validator, normalizer, transformer, and action",
"code": "U2FtcGxlIGNvZGU="
}
Possible responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 410
- 500
- 503
The request is successful.
- application/json
description
- stringThe description of a model.
code
- stringA base64 encoded self-contained JavaScript code snippet.
{
"name": "example_bundle",
"description": "An example bundle that exports a validator, normalizer, transformer, and action",
"exports": {
"validators": [
{
"name": "is_positive",
"type": "validator",
"description": "A validator that returns true if its argument is positive.",
"dependencies": {
"properties": []
}
}
],
"normalizers": [
{
"name": "to_lower",
"type": "normalizer",
"description": "A normalizer that formats a string to lowercase without any dependencies."
}
],
"transformers": [
{
"name": "to_name_with_title",
"type": "transformer",
"description": "A transformer that accepts a full name and returns it prepended with a title.",
"dependencies": {
"properties": [
"gender",
"marital_status"
]
}
}
],
"actions": [
{
"name": "decrypt_and_send",
"type": "action",
"description": "An action that decrypts an object and sends it to a compliant third-party service."
}
]
},
"code": "U2FtcGxlIGNvZGU=",
"creation_time": "2022-12-02T02:02:14.398599Z"
}
The request is invalid.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1001",
"message": "The access reason is missing.",
"context": {
"reason": null
}
}
Authentication credentials are incorrect or missing.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1005",
"message": "The request is unauthorized.",
"context": {}
}
The caller doesn't have the required access rights.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1007",
"message": "The operation is forbidden due to missing capabilities.",
"context": {
"username": "WebServer"
}
}
The bundle is not found.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1004",
"message": "The bundle is not found.",
"context": {}
}
The operation is not allowed.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1026",
"message": "The operation is not allowed in in-memory mode.",
"context": {}
}
A conflict occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV3218",
"message": "Concurrent conflicting updates to the same object.",
"context": {}
}
Access to a resource that is no longer available occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1033",
"message": "The resource is gone.",
"context": {}
}
An error occurs on the server.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1000",
"message": "Something went wrong",
"context": {}
}
The service is unavailable.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1009",
"message": "The operation timed out on the server.",
"context": {}
}
Path parameters
Query parameters
Request body
Code examples