Skip to content

Latest commit

 

History

History
355 lines (235 loc) · 9.17 KB

AdminApi.md

File metadata and controls

355 lines (235 loc) · 9.17 KB

AdminApi

All URIs are relative to http://http:/v1

Method HTTP request Description
adminFreePassDelete DELETE /admin/free-pass Revokes an existing free pass
adminFreePassPut PUT /admin/free-pass Creates a free pass to an article
adminFreePassesGet GET /admin/free-passes Lists all free passes
adminSearchPost POST /admin/search Search for users
adminTransferPassiveSubscribersListidPost POST /admin/transfer-passive-subscribers/{listid} Transfers passive customers from Kayak to Mailchimp
adminUserPost POST /admin/user Create a new user with admin options.
adminUserUuidDelete DELETE /admin/user/{uuid} Delete user

adminFreePassDelete

adminFreePassDelete(body, authUser, authorization)

Revokes an existing free pass

Marks a free pass as being revoked so that it can't be used anymore. Currently, revoked free passes can't be reinstated through Persona API (though it's possible to do so with an SQL query).

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
String body = "body_example"; // String | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    apiInstance.adminFreePassDelete(body, authUser, authorization);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminFreePassDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body String
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: Not defined

adminFreePassPut

String adminFreePassPut(body, authUser, authorization)

Creates a free pass to an article

Free passes can be used to temporarily bypass the paywall for individual articles.

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
FreePassInput body = new FreePassInput(); // FreePassInput | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    String result = apiInstance.adminFreePassPut(body, authUser, authorization);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminFreePassPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body FreePassInput
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

String

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

adminFreePassesGet

List<FreePass> adminFreePassesGet(authUser, authorization)

Lists all free passes

This end point returns the list of all free passes, including those that have been expired or revoked.

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    List<FreePass> result = apiInstance.adminFreePassesGet(authUser, authorization);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminFreePassesGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

List<FreePass>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

adminSearchPost

List<SearchResult> adminSearchPost(body, authUser, authorization)

Search for users

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
SearchQuery body = new SearchQuery(); // SearchQuery | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    List<SearchResult> result = apiInstance.adminSearchPost(body, authUser, authorization);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminSearchPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body SearchQuery
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

List<SearchResult>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

adminTransferPassiveSubscribersListidPost

Object adminTransferPassiveSubscribersListidPost(listid, authUser, authorization)

Transfers passive customers from Kayak to Mailchimp

Passive subscribers/members/customers are users who don't have active entitlements and haven't opted out from email marketing. For the given list (audience) ID, this endpoint transfers the list of passive subscribers from Kayak to Mailchimp (via Faro).

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
String listid = null; // String | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    Object result = apiInstance.adminTransferPassiveSubscribersListidPost(listid, authUser, authorization);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminTransferPassiveSubscribersListidPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
listid String [default to null]
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

adminUserPost

LoginResponse adminUserPost(body, authUser, authorization)

Create a new user with admin options.

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
AdminNewUser body = new AdminNewUser(); // AdminNewUser | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    LoginResponse result = apiInstance.adminUserPost(body, authUser, authorization);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminUserPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AdminNewUser
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

LoginResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

adminUserUuidDelete

adminUserUuidDelete(uuid, authUser, authorization)

Delete user

Example

// Import classes:
//import org.openapitools.client.api.AdminApi;

AdminApi apiInstance = new AdminApi();
UUID uuid = null; // UUID | 
UUID authUser = null; // UUID | 
String authorization = null; // String | 
try {
    apiInstance.adminUserUuidDelete(uuid, authUser, authorization);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#adminUserUuidDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
uuid UUID [default to null]
authUser UUID [optional] [default to null]
authorization String [optional] [default to null]

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined