Update datasource
PATCH
/v1/admin/datasources/{id}
const url = 'https://localhost:8080/v1/admin/datasources/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"config_fields":[{"clear":true,"key":"example","value":"example"}],"name":"example","scan_policy":"example","secret_refs":{"backend":"example","mappings":{"additionalProperty":"example"},"reference":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://localhost:8080/v1/admin/datasources/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "config_fields": [ { "clear": true, "key": "example", "value": "example" } ], "name": "example", "scan_policy": "example", "secret_refs": { "backend": "example", "mappings": { "additionalProperty": "example" }, "reference": "example" } }'Updates datasource metadata, config fields, or secret references
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Datasource ID
Request Body
Section titled “Request Body”Datasource update payload
Media typeapplication/json
object
config_fields
Array<object>
object
clear
boolean
key
required
string
value
string
name
string
scan_policy
string
secret_refs
object
backend
string
mappings
object
key
additional properties
string
reference
string
Example generated
{ "config_fields": [ { "clear": true, "key": "example", "value": "example" } ], "name": "example", "scan_policy": "example", "secret_refs": { "backend": "example", "mappings": { "additionalProperty": "example" }, "reference": "example" }}Responses
Section titled “Responses”OK
Media typeapplication/json
object
config_fields
Array<object>
object
has_value
boolean
key
string
value
string
created_at
string
id
string
is_disabled
boolean
name
string
scan_policy
string
secret_refs
object
backend
string
mappings
object
key
additional properties
string
reference
string
type
string
updated_at
string
Example generated
{ "config_fields": [ { "has_value": true, "key": "example", "value": "example" } ], "created_at": "example", "id": "example", "is_disabled": true, "name": "example", "scan_policy": "example", "secret_refs": { "backend": "example", "mappings": { "additionalProperty": "example" }, "reference": "example" }, "type": "example", "updated_at": "example"}Bad Request
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Unauthorized
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Forbidden
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Not Found
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}