Skip to content
  • Auto
  • Light
  • Dark
Get Started

Test

Test
client.webhooks.test(stringid, WebhookTestParamsparams?, RequestOptionsoptions?): webhookWebhookWebhookTestResponse
post/api/v1/webhooks/{id}/test

Invokes the c1.api.webhooks.v1.WebhooksService.Test method.

Parameters
idstring

The id field.

paramsbodyunknownWebhookTestParams
Hide ParametersShow Parameters
bodyunknown
optional

The WebhooksServiceTestRequest message.

Returns
WebhookTestResponse

The WebhooksServiceTestResponse message.

Hide ParametersShow Parameters
webhookidstringattemptsnumbercompletedAtstringcreatedAtstringexpiresAtstringlastAttemptedAtstringsourceSourcespecSpecstateunionupdatedAtstringwebhookIdstringWebhook
optional

The WebhookInstance message.

Hide ParametersShow Parameters
idstring
optional

The id field.

attemptsnumber
optional

The attempts field.

formatint32
completedAtstring
optional
formatdate-time
createdAtstring
optional
formatdate-time
expiresAtstring
optional
formatdate-time
lastAttemptedAtstring
optional
formatdate-time
sourceapprovalStepunionpolicyPostActionunionprovisionStepuniontestunknownworkflowStepunionSource
optional

The WebhookSource message.

This message contains a oneof named source. Only a single field of the following list may be set at a time:

  • test
  • policyPostAction
  • approvalStep
  • provisionStep
  • workflowStep
Hide ParametersShow Parameters
approvalStepunion
optional
ticketIdstringApprovalStep | null

The WebhookSourceApprovalStep message.

Hide ParametersShow Parameters
ticketIdstring
optional

The ticketId field.

policyPostActionunion
optional
ticketIdstringPolicyPostAction | null

The WebhookSourcePolicyPostAction message.

Hide ParametersShow Parameters
ticketIdstring
optional

The ticketId field.

provisionStepunion
optional
ticketIdstringProvisionStep | null

The WebhookSourceProvisionStep message.

Hide ParametersShow Parameters
ticketIdstring
optional

The ticketId field.

testunknown
optional

The WebhookSourceTest message.

workflowStepunion
optional
workflowExecutionIdstringworkflowStepIdstringWorkflowStep | null

The WebhookSourceWorkflowStep message.

Hide ParametersShow Parameters
workflowExecutionIdstring
optional

The workflowExecutionId field.

formatint64
workflowStepIdstring
optional

The workflowStepId field.

specdestinationstringSpec
optional

The WebhookSpec message.

Hide ParametersShow Parameters
destinationstring
optional

The destination field.

stateunion
optional
"WEBHOOK_STATE_UNSPECIFIED" | "WEBHOOK_STATE_PENDING" | "WEBHOOK_STATE_RUNNING" | 5 more

The state field.

Hide ParametersShow Parameters
"WEBHOOK_STATE_UNSPECIFIED"
"WEBHOOK_STATE_PENDING"
"WEBHOOK_STATE_RUNNING"
"WEBHOOK_STATE_ERROR"
"WEBHOOK_STATE_WAITING_CALLBACK"
"WEBHOOK_STATE_PROCESS_RESPONSE"
"WEBHOOK_STATE_SUCCESS"
"WEBHOOK_STATE_FATAL_ERROR"
updatedAtstring
optional
formatdate-time
webhookIdstring
optional

The webhookId field.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const response = await client.webhooks.test('id');

console.log(response.webhook);
200 Example
{
  "webhook": {
    "id": "id",
    "attempts": 0,
    "source": {
      "approvalStep": {
        "ticketId": "ticketId"
      },
      "policyPostAction": {
        "ticketId": "ticketId"
      },
      "provisionStep": {
        "ticketId": "ticketId"
      },
      "test": {},
      "workflowStep": {
        "workflowExecutionId": "workflowExecutionId",
        "workflowStepId": "workflowStepId"
      }
    },
    "spec": {
      "destination": "destination"
    },
    "state": "WEBHOOK_STATE_UNSPECIFIED",
    "webhookId": "webhookId"
  }
}