123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- {
- "get": {
- "tags": ["Projects"],
- "description": "Return a service hook bound to a project.",
- "operationId": "Retrieve a Service Hook",
- "parameters": [
- {
- "name": "organization_id_or_slug",
- "in": "path",
- "description": "The id or slug of the organization the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "project_id_or_slug",
- "in": "path",
- "description": "The id or slug of the project the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "hook_id",
- "in": "path",
- "description": "The GUID of the service hook.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Success",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "../../components/schemas/service-hook.json#/ServiceHook"
- },
- "example": {
- "dateCreated": "2018-11-06T21:20:08.143Z",
- "events": ["event.alert", "event.created"],
- "id": "4f9d73e63b7144ecb8944c41620a090b",
- "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
- "status": "active",
- "url": "https://empowerplant.io/sentry-hook"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden"
- },
- "404": {
- "description": "The requested resource does not exist"
- }
- },
- "security": [
- {
- "auth_token": ["project:read"]
- }
- ]
- },
- "put": {
- "tags": ["Projects"],
- "description": "Update a service hook.",
- "operationId": "Update a Service Hook",
- "parameters": [
- {
- "name": "organization_id_or_slug",
- "in": "path",
- "description": "The id or slug of the organization the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "project_id_or_slug",
- "in": "path",
- "description": "The id or slug of the project the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "hook_id",
- "in": "path",
- "description": "The GUID of the service hook.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "required": ["url", "events"],
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "description": "The URL for the webhook."
- },
- "events": {
- "type": "array",
- "description": "The events to subscribe to.",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "example": {
- "url": "https://empowerplant.io/sentry-hook",
- "events": ["event.alert", "event.created"]
- }
- }
- },
- "required": false
- },
- "responses": {
- "200": {
- "description": "Success",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "../../components/schemas/service-hook.json#/ServiceHook"
- },
- "example": {
- "dateCreated": "2018-11-06T21:20:08.143Z",
- "events": ["event.alert", "event.created"],
- "id": "4f9d73e63b7144ecb8944c41620a090b",
- "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
- "status": "active",
- "url": "https://empowerplant.io/sentry-hook"
- }
- }
- }
- },
- "400": {
- "description": "Bad Input"
- },
- "403": {
- "description": "Forbidden"
- },
- "404": {
- "description": "The requested resource does not exist"
- }
- },
- "security": [
- {
- "auth_token": ["project:write"]
- }
- ]
- },
- "delete": {
- "tags": ["Projects"],
- "description": "Remove a service hook.",
- "operationId": "Remove a Service Hook",
- "parameters": [
- {
- "name": "organization_id_or_slug",
- "in": "path",
- "description": "The id or slug of the organization the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "project_id_or_slug",
- "in": "path",
- "description": "The id or slug of the project the client keys belong to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "hook_id",
- "in": "path",
- "description": "The GUID of the service hook.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Success"
- },
- "403": {
- "description": "Forbidden"
- },
- "404": {
- "description": "The requested resource does not exist"
- }
- },
- "security": [
- {
- "auth_token": ["project:admin"]
- }
- ]
- }
- }
|