Custom webhook JSON payload format and examples
The required payload format is the same as described in the Perforce TeamHub API V1 Event object.
The following example shows a payload that P4 DAM sends to the external service you are using.
[
{
"api_status": 200,
"api_timestamp": "2023-06-27T07:36:50Z",
"id": "649a918e7e3cf97ba280d0f6",
"created_at": "2023-06-27T07:36:46Z",
"updated_at": "2023-06-27T07:36:46Z",
"subject": { ...details of user who triggered the event... },
"operation": "created",
"target": "push",
"progress": 100,
"objects": {
"project": { ...project details... },
"repository": { ...collection details... },
"commits": [
{
"api_status": 200,
"api_timestamp": "2023-06-27T07:36:51Z",
"id": "2366",
"author": "admin",
"email": "admin@company.com",
"description": "description of changes",
"timestamp": "2023-06-27T07:36:41Z",
"rev": null,
"repository": {
"id": "images",
"uuid": "2a1c3f8a-c5c9-4898-91c5-8cc236127e5d"
},
"project": {
"id": "space_jam",
"uuid": "168a1155-96f5-4b47-8b20-96898e4a0fa5"
}
}
],
"last_commit": "2366",
"commit_count": 1,
"files": {
"added": [
"//space_jam_stream/images/mainline/city.jpeg"
],
"modified": [
"//space_jam_stream/images/mainline/ship.jpeg"
],
"deleted": [
"//space_jam_stream/images/mainline/car.jpeg"
],
"renamed": [
{
"from": {
"path": "//space_jam_stream/images/mainline/original.jpeg",
"rev": "27"
},
"to": {
"path": "//space_jam_stream/images/mainline/renamed.jpeg",
"rev": "1"
}
}
]
},
"ref": null,
"bookmarks": [
],
"code_reviews": [
]
},
"timestamp": "2023-06-27T07:36:46Z"
}
]