Get a hook by ID
hook_id*stringThe ID of the hook.
hook_type*stringThe type of the hook.
"incoming""outgoing"Accept*stringapplication/json
Content-Type*stringapplication/json
Ok
application/json- response
id*stringThe UUID of the given hook
name*stringThe name entered by the user (or auto-generated by Devopness) to uniquely identify the hook
type*HookTypeThe type of hook (incoming or outgoing)
"in""out"action_type*ActionType"check_provisioned""configure""delete""deploy""get_status""provision""reload""remove""restart""rotate_key""start""stop"url*|URL that triggers incoming hooks
target_url*|URL that outgoing hooks make a request to
is_auto_generated*booleanIndicates if the record was auto_generated by Devopness itself
requires_secret*booleanTells if requests to this hook must only be accepted when a HTTP header is sent with a message authentication code (HMAC) generated based on the secret provided by Devopness and shared by user with external sources
verify_ssl*booleanIndicates if the Devopness must be verify the SSL certificate of the request
active*booleanDetermines if the hook is currently active
project_id*integerThe ID of the project
environment_id*integerThe ID of the environment
pipeline_id*|The ID of the pipeline executed by this hook
resource_type*ResourceTypeType of an infrastructure resource managed through a Devopness environment.
"application""credential""cronjob""daemon""deployment""network""network-rule""server""service""ssh-key""ssl-certificate""subnet""virtual-host"resource_id*integerThe hooks' resource ID
settings*|trigger_when*secret*stringThe signing secret for incoming hooks. Devopness generates one when the caller omits it; a caller-supplied secret is returned as-is. The clear value is returned only once, in the create response, and cannot be retrieved again after that.
secret_algorithm*|The cryptographic hash function to be used by Devopness when validating digitally signed incoming requests for hooks that require secret validation
secret_header_name*|The name of the HTTP request header from which the request digital signature should be extracted
secret_signature_has_algorithm_prefix*|Whether the signature header value includes the algorithm prefix, for example sha256=<hex>. When false, the header contains only the raw hex HMAC.
created_by_user*|nullcreated_at*stringThe date and time when the record was created
updated_at*stringThe date and time when the record was last updated
curl -X GET 'https://api.devopness.com/hooks/incoming/2ab973e1-9528-4d67-aff0-209d74975830' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <your_api_token>' \ -H 'Content-Type: application/json'{ "id": "f1a61a4e-4d08-11eb-9481-0242ac130004", "name": "my-app deploy", "type": "in", "action_type": "deploy", "url": "http://localhost/hooks/incoming/0a2f9b84-e9bb-4fef-b146-51847bb9e569", "target_url": "https://fake-url-test.com/hook/12345", "is_auto_generated": false, "requires_secret": true, "verify_ssl": true, "active": true, "project_id": 34985723, "environment_id": 579085, "pipeline_id": 289542, "resource_type": "application", "resource_id": 9056412, "settings": { "variables": [ { "name": "environment_id", "path": "data.environment.id", "type": "integer", "required": false, "default_value": null } ] }, "trigger_when": { "events": [ "action.status_changed", "action.queued", "action.started", "action.completed", "action.failed" ], "conditions": [ { "name": "Only trigger incoming hook on PRs of a given pull request author", "type": "request_body", "path": "sender.login", "accepted_values": [ "some-one" ] } ] }, "secret": "*****", "secret_algorithm": "sha256", "secret_header_name": "X-Custom-Header", "secret_signature_has_algorithm_prefix": true, "created_by_user": { "id": 1, "name": "string", "email": "user@example.com", "url_slug": "someone", "language": "en", "active": true, "created_at": "2019-09-25T15:50:48.000000Z", "updated_at": "2019-09-25T13:52:04.000000Z" }, "created_at": "2022-09-26T15:30:31.000000Z", "updated_at": "2022-09-26T15:30:58.000000Z"}