Skip to content

Latest commit

 

History

History
377 lines (298 loc) · 13.9 KB

WebhookApi.md

File metadata and controls

377 lines (298 loc) · 13.9 KB

WebhookApi

All URIs are relative to https://app-us.turnitin.com/api/v1

Method HTTP request Description
deleteWebhook DELETE /webhooks/{id} Delete Webhook endpoint
getWebhook GET /webhooks/{id} Get Webhook endpoint info
updateWebhook PATCH /webhooks/{id} Update Webhook endpoint info
webhooksGet GET /webhooks List registered Webhook endpoints
webhooksPost POST /webhooks Register a Webhook endpoint

deleteWebhook

deleteWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id)

Delete Webhook endpoint

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.WebhookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    WebhookApi apiInstance = new WebhookApi(defaultClient);
    String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
    String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
    String id = "id_example"; // String | 
    try {
      apiInstance.deleteWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookApi#deleteWebhook");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xTurnitinIntegrationName String a human readable string representing the type of integration being used
xTurnitinIntegrationVersion String the version of the integration platform being used
id String

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Success -
429 Too many requests have been made in a short amount of time, please wait for a bit a try again. -
0 An Error Occurred -

getWebhook

Webhook getWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id)

Get Webhook endpoint info

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.WebhookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    WebhookApi apiInstance = new WebhookApi(defaultClient);
    String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
    String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
    String id = "id_example"; // String | 
    try {
      Webhook result = apiInstance.getWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookApi#getWebhook");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xTurnitinIntegrationName String a human readable string representing the type of integration being used
xTurnitinIntegrationVersion String the version of the integration platform being used
id String

Return type

Webhook

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success -
429 Too many requests have been made in a short amount of time, please wait for a bit a try again. -
0 An Error Occurred -

updateWebhook

Webhook updateWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, data)

Update Webhook endpoint info

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.WebhookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    WebhookApi apiInstance = new WebhookApi(defaultClient);
    String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
    String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
    String id = "id_example"; // String | 
    WebhookPathRequest data = new WebhookPathRequest(); // WebhookPathRequest | 
    try {
      Webhook result = apiInstance.updateWebhook(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, data);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookApi#updateWebhook");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xTurnitinIntegrationName String a human readable string representing the type of integration being used
xTurnitinIntegrationVersion String the version of the integration platform being used
id String
data WebhookPathRequest

Return type

Webhook

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success -
429 Too many requests have been made in a short amount of time, please wait for a bit a try again. -
0 An Error Occurred -

webhooksGet

List<Webhook> webhooksGet(xTurnitinIntegrationName, xTurnitinIntegrationVersion)

List registered Webhook endpoints

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.WebhookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    WebhookApi apiInstance = new WebhookApi(defaultClient);
    String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
    String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
    try {
      List<Webhook> result = apiInstance.webhooksGet(xTurnitinIntegrationName, xTurnitinIntegrationVersion);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookApi#webhooksGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xTurnitinIntegrationName String a human readable string representing the type of integration being used
xTurnitinIntegrationVersion String the version of the integration platform being used

Return type

List<Webhook>

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success -
429 Too many requests have been made in a short amount of time, please wait for a bit a try again. -
0 An Error Occurred -

webhooksPost

Webhook webhooksPost(xTurnitinIntegrationName, xTurnitinIntegrationVersion, data)

Register a Webhook endpoint

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.WebhookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    WebhookApi apiInstance = new WebhookApi(defaultClient);
    String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
    String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
    WebhookWithSecret data = new WebhookWithSecret(); // WebhookWithSecret | 
    try {
      Webhook result = apiInstance.webhooksPost(xTurnitinIntegrationName, xTurnitinIntegrationVersion, data);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookApi#webhooksPost");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xTurnitinIntegrationName String a human readable string representing the type of integration being used
xTurnitinIntegrationVersion String the version of the integration platform being used
data WebhookWithSecret

Return type

Webhook

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Success -
429 Too many requests have been made in a short amount of time, please wait for a bit a try again. -
0 An Error Occurred -