updateFunctionWebHooks
put
/ccadmin/v1/functionWebhooks
Update Function Web Hooks. Update existing WebHooks.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : updateFunctionWebHooks_request
{
"webHooks":[
{
"headers":null,
"secretKey":null,
"displayName":"atg.service.webhook.Resources->webHookDisplayName_publishEvent",
"serverType":"production",
"name":"calculateShipping",
"id":"production-calculateShipping",
"url":null
},
{
"headers":{
"header1":"value1"
},
"displayName":"Calculate Shipping - Publishing",
"serverType":"publishing",
"name":"calculateShipping",
"id":"publishing-calculateShipping",
"basicAuthentication":{
"admin":"admin123"
},
"url":"https://localhost:8080/calculateShipping"
}
]
}
- basicAuthentication
-
Type:
objectbasicAuthenticationAdditional Properties Allowed:Map of username and password - displayName
-
Type:
integerThe display name of the WebHook. - headers
-
Type:
objectheadersAdditional Properties Allowed:Map of header names and header values - id
-
Type:
integerRequired:trueWebHook identifier. - name
-
Type:
integerThe simple name of the WebHook. - secretKey
-
Type:
integerThe base64 encoded secret key of the WebHook. Will be null unless includeSecretKeys query parameter is true. A secret key is currently shared between WebHooks of the same name (like "calculateShipping"). - serverType
-
Type:
integerThe server type of the WebHook. - url
-
Type:
stringThe target URL for the function WebHook.
Nested Schema : basicAuthentication
Type:
objectMap of username and password
- password
-
Type:
stringRequired:trueThe password. - username
-
Type:
stringRequired:trueThe user name.
Nested Schema : headers
Type:
objectMap of header names and header values
- headerName
-
Type:
stringRequired:trueThe header name. - headerValue
-
Type:
stringRequired:trueThe header value.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateFunctionWebHooks_response
- basicAuthentication
-
Type:
objectbasicAuthenticationAdditional Properties Allowed:Map of username and password - displayName
-
Type:
integerThe display name of the WebHook. - headers
-
Type:
objectheadersAdditional Properties Allowed:Map of header names and header values - id
-
Type:
integerWebHook identifier. - name
-
Type:
integerThe simple name of the WebHook. - secretKey
-
Type:
integerThe base64 encoded secret key of the WebHook. Will be null unless includeSecretKeys query parameter is true. A secret key is currently shared between WebHooks of the same name (like "calculateShipping"). The secret key will have a non-null value only if the authentication method was previously chosen as secret key. - serverType
-
Type:
integerThe server type of the WebHook. - url
-
Type:
stringThe target URL for the function WebHook.
Nested Schema : basicAuthentication
Type:
objectMap of username and password
- password
-
Type:
stringThe password. - username
-
Type:
stringThe user name.
Nested Schema : headers
Type:
objectMap of header names and header values
- headerName
-
Type:
stringThe header name. - headerValue
-
Type:
stringThe header value.
Example application/json
[
{
"headers":null,
"secretKey":null,
"displayName":"Calculate Shipping - Production",
"serverType":"production",
"name":"calculateShipping",
"id":"production-calculateShipping",
"url":null
},
{
"headers":{
"header1":"value1"
},
"displayName":"Calculate Shipping - Publishing",
"serverType":"publishing",
"name":"calculateShipping",
"id":"publishing-calculateShipping",
"basicAuthentication":{
"admin":"admin123"
},
"url":"https://localhost:8080/calculateShipping"
}
]
Default Response
The error response
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{"webHooks": [
{
"headers": null,
"secretKey": null,
"displayName": "atg.service.webhook.Resources->webHookDisplayName_publishEvent",
"serverType": "production",
"name": "calculateShipping",
"id": "production-calculateShipping",
"url": null
},
{
"headers": {"header1": "value1"},
"displayName": "Calculate Shipping - Publishing",
"serverType": "publishing",
"name": "calculateShipping",
"id": "publishing-calculateShipping",
"basicAuthentication": {"admin": "admin123"},
"url": "https://localhost:8080/calculateShipping"
}
]}
Sample Response Payload returned by endpoint:
[
{
"headers": null,
"secretKey": null,
"displayName": "Calculate Shipping - Production",
"serverType": "production",
"name": "calculateShipping",
"id": "production-calculateShipping",
"url": null
},
{
"headers": {"header1": "value1"},
"displayName": "Calculate Shipping - Publishing",
"serverType": "publishing",
"name": "calculateShipping",
"id": "publishing-calculateShipping",
"basicAuthentication": {"admin": "admin123"},
"url": "https://localhost:8080/calculateShipping"
}
]