projects

Creates a new hook in a given repository.

post/v1/{+parent}/hooks

Request

  • Base URL: https://securesourcemanager.googleapis.com
  • URL: https://securesourcemanager.googleapis.com/v1/{+parent}/hooks
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/securesourcemanager.read-write) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/securesourcemanager.read-write)

Path parameters

parentstring required

Required. The repository in which to create the hook. Values are of the form projects/{project_number}/locations/{location_id}/repositories/{repository_id}

Query parameters

hookIdstring

Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Request body

createTimestring google-datetime

Output only. Create timestamp.

disabledboolean

Optional. Determines if the hook disabled or not. Set to true to stop sending traffic.

eventsstring[]

Optional. The events that trigger hook on.

namestring

Identifier. A unique identifier for a Hook. The name should be of the format: projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}

sensitiveQueryStringstring

Optional. The sensitive query string to be appended to the target URI.

serviceAccountAuthboolean

Optional. Determines if the hook uses the Repository Service Account to generate an OIDC ID Token for webhook authentication.

targetUristring

Required. The target URI to which the payloads will be delivered.

uidstring

Output only. Unique identifier of the hook.

updateTimestring google-datetime

Output only. Update timestamp.

Response

Successful response

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/securesourcemanager.read-write was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/securesourcemanager.read-write was removed from the endpoint's security scheme Oauth2c

    • info

      added the new optional request property

    • info

      added the new PULL_REQUEST_COMMENT enum value to the request property /