LearnDash REST API

Assignments

Update an assignment

Partially updates an existing assignment. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-assignment/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-assignment/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssignmentsApi;

import java.io.File;
import java.util.*;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.createLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#createLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Assignment ID
final UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2AssignmentById: $e\n');
}

import org.openapitools.client.api.AssignmentsApi;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.createLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#createLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
AssignmentsApi *apiInstance = [[AssignmentsApi alloc] init];
Integer *id = 56; // Assignment ID (default to null)
UpdateLdlmsV2AssignmentByIdRequest *updateLdlmsV2AssignmentByIdRequest = ; //  (optional)

// Update an assignment
[apiInstance createLdlmsV2AssignmentByIdWith:id
    updateLdlmsV2AssignmentByIdRequest:updateLdlmsV2AssignmentByIdRequest
              completionHandler: ^(LDLMS_v2_Assignment output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.AssignmentsApi()
var id = 56; // {Integer} Assignment ID
var opts = {
  'updateLdlmsV2AssignmentByIdRequest':  // {UpdateLdlmsV2AssignmentByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2AssignmentById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2AssignmentByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AssignmentsApi();
            var id = 56;  // Integer | Assignment ID (default to null)
            var updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest |  (optional) 

            try {
                // Update an assignment
                LDLMS_v2_Assignment result = apiInstance.createLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssignmentsApi.createLdlmsV2AssignmentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssignmentsApi();
$id = 56; // Integer | Assignment ID
$updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2AssignmentById($id, $updateLdlmsV2AssignmentByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssignmentsApi->createLdlmsV2AssignmentById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssignmentsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssignmentsApi->new();
my $id = 56; # Integer | Assignment ID
my $updateLdlmsV2AssignmentByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2AssignmentByIdRequest->new(); # UpdateLdlmsV2AssignmentByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2AssignmentById(id => $id, updateLdlmsV2AssignmentByIdRequest => $updateLdlmsV2AssignmentByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssignmentsApi->createLdlmsV2AssignmentById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AssignmentsApi()
id = 56 # Integer | Assignment ID (default to null)
updateLdlmsV2AssignmentByIdRequest =  # UpdateLdlmsV2AssignmentByIdRequest |  (optional)

try:
    # Update an assignment
    api_response = api_instance.create_ldlms_v2_assignment_by_id(id, updateLdlmsV2AssignmentByIdRequest=updateLdlmsV2AssignmentByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssignmentsApi->createLdlmsV2AssignmentById: %s\n" % e)
extern crate AssignmentsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest

    let mut context = AssignmentsApi::Context::default();
    let result = client.createLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Assignment ID
Required
Request body

Responses


Get a specific assignment

Returns a specific assignment by ID. Returns the complete assignment data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-assignment/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-assignment/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssignmentsApi;

import java.io.File;
import java.util.*;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID

        try {
            LDLMS_v2_Assignment result = apiInstance.getLdlmsV2AssignmentById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#getLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Assignment ID

try {
    final result = await api_instance.getLdlmsV2AssignmentById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2AssignmentById: $e\n');
}

import org.openapitools.client.api.AssignmentsApi;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID

        try {
            LDLMS_v2_Assignment result = apiInstance.getLdlmsV2AssignmentById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#getLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
AssignmentsApi *apiInstance = [[AssignmentsApi alloc] init];
Integer *id = 56; // Assignment ID (default to null)

// Get a specific assignment
[apiInstance getLdlmsV2AssignmentByIdWith:id
              completionHandler: ^(LDLMS_v2_Assignment output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.AssignmentsApi()
var id = 56; // {Integer} Assignment ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2AssignmentById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2AssignmentByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AssignmentsApi();
            var id = 56;  // Integer | Assignment ID (default to null)

            try {
                // Get a specific assignment
                LDLMS_v2_Assignment result = apiInstance.getLdlmsV2AssignmentById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssignmentsApi.getLdlmsV2AssignmentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssignmentsApi();
$id = 56; // Integer | Assignment ID

try {
    $result = $api_instance->getLdlmsV2AssignmentById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssignmentsApi->getLdlmsV2AssignmentById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssignmentsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssignmentsApi->new();
my $id = 56; # Integer | Assignment ID

eval {
    my $result = $api_instance->getLdlmsV2AssignmentById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssignmentsApi->getLdlmsV2AssignmentById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AssignmentsApi()
id = 56 # Integer | Assignment ID (default to null)

try:
    # Get a specific assignment
    api_response = api_instance.get_ldlms_v2_assignment_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssignmentsApi->getLdlmsV2AssignmentById: %s\n" % e)
extern crate AssignmentsApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = AssignmentsApi::Context::default();
    let result = client.getLdlmsV2AssignmentById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Assignment ID
Required

Responses


Get assignments

Returns a list of assignments. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/sfwd-assignment

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-assignment?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&search_semantics=searchSemantics_example&offset=56&order=desc&orderby=date&search_columns=[]&slug=&status=["any"]&course=56&lesson=0&topic=0&approved_status=approved"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssignmentsApi;

import java.io.File;
import java.util.*;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AssignmentsApi apiInstance = new AssignmentsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Filter by Course ID
        Integer lesson = 0; // Integer | Filter by Lesson ID
        Integer topic = 0; // Integer | Filter by Topic ID
        String approvedStatus = approved; // String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

        try {
            array[LDLMS_v2_Assignment] result = apiInstance.listLdlmsV2Assignment(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, approvedStatus);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#listLdlmsV2Assignment");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final Integer course = new Integer(); // Integer | Filter by Course ID
final Integer lesson = new Integer(); // Integer | Filter by Lesson ID
final Integer topic = new Integer(); // Integer | Filter by Topic ID
final String approvedStatus = new String(); // String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

try {
    final result = await api_instance.listLdlmsV2Assignment(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, approvedStatus);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Assignment: $e\n');
}

import org.openapitools.client.api.AssignmentsApi;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        AssignmentsApi apiInstance = new AssignmentsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Filter by Course ID
        Integer lesson = 0; // Integer | Filter by Lesson ID
        Integer topic = 0; // Integer | Filter by Topic ID
        String approvedStatus = approved; // String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

        try {
            array[LDLMS_v2_Assignment] result = apiInstance.listLdlmsV2Assignment(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, approvedStatus);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#listLdlmsV2Assignment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
AssignmentsApi *apiInstance = [[AssignmentsApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = desc; // Order sort attribute ascending or descending. (optional) (default to desc)
String *orderby = date; // Sort collection by post attribute. (optional) (default to date)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["any"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["any"])
Integer *course = 56; // Filter by Course ID (optional) (default to null)
Integer *lesson = 0; // Filter by Lesson ID (optional) (default to 0)
Integer *topic = 0; // Filter by Topic ID (optional) (default to 0)
String *approvedStatus = approved; // Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments. (optional) (default to )

// Get assignments
[apiInstance listLdlmsV2AssignmentWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    course:course
    lesson:lesson
    topic:topic
    approvedStatus:approvedStatus
              completionHandler: ^(array[LDLMS_v2_Assignment] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.AssignmentsApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': desc, // {String} Order sort attribute ascending or descending.
  'orderby': date, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["any"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'course': 56, // {Integer} Filter by Course ID
  'lesson': 0, // {Integer} Filter by Lesson ID
  'topic': 0, // {Integer} Filter by Topic ID
  'approvedStatus': approved // {String} Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Assignment(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2AssignmentExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AssignmentsApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = desc;  // String | Order sort attribute ascending or descending. (optional)  (default to desc)
            var orderby = date;  // String | Sort collection by post attribute. (optional)  (default to date)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["any"])
            var course = 56;  // Integer | Filter by Course ID (optional)  (default to null)
            var lesson = 0;  // Integer | Filter by Lesson ID (optional)  (default to 0)
            var topic = 0;  // Integer | Filter by Topic ID (optional)  (default to 0)
            var approvedStatus = approved;  // String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments. (optional)  (default to )

            try {
                // Get assignments
                array[LDLMS_v2_Assignment] result = apiInstance.listLdlmsV2Assignment(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, approvedStatus);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssignmentsApi.listLdlmsV2Assignment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssignmentsApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = desc; // String | Order sort attribute ascending or descending.
$orderby = date; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
$course = 56; // Integer | Filter by Course ID
$lesson = 0; // Integer | Filter by Lesson ID
$topic = 0; // Integer | Filter by Topic ID
$approvedStatus = approved; // String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

try {
    $result = $api_instance->listLdlmsV2Assignment($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $course, $lesson, $topic, $approvedStatus);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssignmentsApi->listLdlmsV2Assignment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssignmentsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssignmentsApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = desc; # String | Order sort attribute ascending or descending.
my $orderby = date; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["any"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $course = 56; # Integer | Filter by Course ID
my $lesson = 0; # Integer | Filter by Lesson ID
my $topic = 0; # Integer | Filter by Topic ID
my $approvedStatus = approved; # String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

eval {
    my $result = $api_instance->listLdlmsV2Assignment(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, course => $course, lesson => $lesson, topic => $topic, approvedStatus => $approvedStatus);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssignmentsApi->listLdlmsV2Assignment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AssignmentsApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = desc # String | Order sort attribute ascending or descending. (optional) (default to desc)
orderby = date # String | Sort collection by post attribute. (optional) (default to date)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["any"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["any"])
course = 56 # Integer | Filter by Course ID (optional) (default to null)
lesson = 0 # Integer | Filter by Lesson ID (optional) (default to 0)
topic = 0 # Integer | Filter by Topic ID (optional) (default to 0)
approvedStatus = approved # String | Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments. (optional) (default to )

try:
    # Get assignments
    api_response = api_instance.list_ldlms_v2_assignment(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, course=course, lesson=lesson, topic=topic, approvedStatus=approvedStatus)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssignmentsApi->listLdlmsV2Assignment: %s\n" % e)
extern crate AssignmentsApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = desc; // String
    let orderby = date; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["any"]; // array[String]
    let course = 56; // Integer
    let lesson = 0; // Integer
    let topic = 0; // Integer
    let approvedStatus = approved; // String

    let mut context = AssignmentsApi::Context::default();
    let result = client.listLdlmsV2Assignment(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, approvedStatus, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
course
Integer
Filter by Course ID
lesson
Integer
Filter by Lesson ID
topic
Integer
Filter by Topic ID
approved_status
String
Filter by Assignment Approved Status. "approved" will show only approved assignments, "not_approved" will show only not approved assignments, "" will show all assignments.

Responses


Update an assignment

Partially updates an existing assignment. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-assignment/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-assignment/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssignmentsApi;

import java.io.File;
import java.util.*;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.patchLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#patchLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Assignment ID
final UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2AssignmentById: $e\n');
}

import org.openapitools.client.api.AssignmentsApi;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.patchLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#patchLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
AssignmentsApi *apiInstance = [[AssignmentsApi alloc] init];
Integer *id = 56; // Assignment ID (default to null)
UpdateLdlmsV2AssignmentByIdRequest *updateLdlmsV2AssignmentByIdRequest = ; //  (optional)

// Update an assignment
[apiInstance patchLdlmsV2AssignmentByIdWith:id
    updateLdlmsV2AssignmentByIdRequest:updateLdlmsV2AssignmentByIdRequest
              completionHandler: ^(LDLMS_v2_Assignment output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.AssignmentsApi()
var id = 56; // {Integer} Assignment ID
var opts = {
  'updateLdlmsV2AssignmentByIdRequest':  // {UpdateLdlmsV2AssignmentByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2AssignmentById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2AssignmentByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AssignmentsApi();
            var id = 56;  // Integer | Assignment ID (default to null)
            var updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest |  (optional) 

            try {
                // Update an assignment
                LDLMS_v2_Assignment result = apiInstance.patchLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssignmentsApi.patchLdlmsV2AssignmentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssignmentsApi();
$id = 56; // Integer | Assignment ID
$updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2AssignmentById($id, $updateLdlmsV2AssignmentByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssignmentsApi->patchLdlmsV2AssignmentById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssignmentsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssignmentsApi->new();
my $id = 56; # Integer | Assignment ID
my $updateLdlmsV2AssignmentByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2AssignmentByIdRequest->new(); # UpdateLdlmsV2AssignmentByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2AssignmentById(id => $id, updateLdlmsV2AssignmentByIdRequest => $updateLdlmsV2AssignmentByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssignmentsApi->patchLdlmsV2AssignmentById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AssignmentsApi()
id = 56 # Integer | Assignment ID (default to null)
updateLdlmsV2AssignmentByIdRequest =  # UpdateLdlmsV2AssignmentByIdRequest |  (optional)

try:
    # Update an assignment
    api_response = api_instance.patch_ldlms_v2_assignment_by_id(id, updateLdlmsV2AssignmentByIdRequest=updateLdlmsV2AssignmentByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssignmentsApi->patchLdlmsV2AssignmentById: %s\n" % e)
extern crate AssignmentsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest

    let mut context = AssignmentsApi::Context::default();
    let result = client.patchLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Assignment ID
Required
Request body

Responses


Update an assignment

Updates an existing assignment. Requires the complete assignment data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-assignment/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-assignment/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssignmentsApi;

import java.io.File;
import java.util.*;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.updateLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#updateLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Assignment ID
final UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2AssignmentById: $e\n');
}

import org.openapitools.client.api.AssignmentsApi;

public class AssignmentsApiExample {
    public static void main(String[] args) {
        AssignmentsApi apiInstance = new AssignmentsApi();
        Integer id = 56; // Integer | Assignment ID
        UpdateLdlmsV2AssignmentByIdRequest updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

        try {
            LDLMS_v2_Assignment result = apiInstance.updateLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentsApi#updateLdlmsV2AssignmentById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
AssignmentsApi *apiInstance = [[AssignmentsApi alloc] init];
Integer *id = 56; // Assignment ID (default to null)
UpdateLdlmsV2AssignmentByIdRequest *updateLdlmsV2AssignmentByIdRequest = ; //  (optional)

// Update an assignment
[apiInstance updateLdlmsV2AssignmentByIdWith:id
    updateLdlmsV2AssignmentByIdRequest:updateLdlmsV2AssignmentByIdRequest
              completionHandler: ^(LDLMS_v2_Assignment output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.AssignmentsApi()
var id = 56; // {Integer} Assignment ID
var opts = {
  'updateLdlmsV2AssignmentByIdRequest':  // {UpdateLdlmsV2AssignmentByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2AssignmentById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2AssignmentByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AssignmentsApi();
            var id = 56;  // Integer | Assignment ID (default to null)
            var updateLdlmsV2AssignmentByIdRequest = new UpdateLdlmsV2AssignmentByIdRequest(); // UpdateLdlmsV2AssignmentByIdRequest |  (optional) 

            try {
                // Update an assignment
                LDLMS_v2_Assignment result = apiInstance.updateLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AssignmentsApi.updateLdlmsV2AssignmentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssignmentsApi();
$id = 56; // Integer | Assignment ID
$updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2AssignmentById($id, $updateLdlmsV2AssignmentByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssignmentsApi->updateLdlmsV2AssignmentById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssignmentsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssignmentsApi->new();
my $id = 56; # Integer | Assignment ID
my $updateLdlmsV2AssignmentByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2AssignmentByIdRequest->new(); # UpdateLdlmsV2AssignmentByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2AssignmentById(id => $id, updateLdlmsV2AssignmentByIdRequest => $updateLdlmsV2AssignmentByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssignmentsApi->updateLdlmsV2AssignmentById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AssignmentsApi()
id = 56 # Integer | Assignment ID (default to null)
updateLdlmsV2AssignmentByIdRequest =  # UpdateLdlmsV2AssignmentByIdRequest |  (optional)

try:
    # Update an assignment
    api_response = api_instance.update_ldlms_v2_assignment_by_id(id, updateLdlmsV2AssignmentByIdRequest=updateLdlmsV2AssignmentByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssignmentsApi->updateLdlmsV2AssignmentById: %s\n" % e)
extern crate AssignmentsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2AssignmentByIdRequest = ; // UpdateLdlmsV2AssignmentByIdRequest

    let mut context = AssignmentsApi::Context::default();
    let result = client.updateLdlmsV2AssignmentById(id, updateLdlmsV2AssignmentByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Assignment ID
Required
Request body

Responses


Commerce Paypal

Handle PayPal webhook event

Handles PayPal webhook notifications for payment events.


/learndash/v1/learndash/v1/commerce/paypal/webhook

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/webhook" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalApi;

import java.io.File;
import java.util.*;

public class CommercePaypalApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CommercePaypalApi apiInstance = new CommercePaypalApi();
        Object body = Object; // Object | 

        try {
            create_learndash_v1_commerce_paypal_webhook_200_response result = apiInstance.createLearndashV1CommercePaypalWebhook(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalApi#createLearndashV1CommercePaypalWebhook");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Object body = new Object(); // Object | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalWebhook(body);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalWebhook: $e\n');
}

import org.openapitools.client.api.CommercePaypalApi;

public class CommercePaypalApiExample {
    public static void main(String[] args) {
        CommercePaypalApi apiInstance = new CommercePaypalApi();
        Object body = Object; // Object | 

        try {
            create_learndash_v1_commerce_paypal_webhook_200_response result = apiInstance.createLearndashV1CommercePaypalWebhook(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalApi#createLearndashV1CommercePaypalWebhook");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CommercePaypalApi *apiInstance = [[CommercePaypalApi alloc] init];
Object *body = Object; //  (optional)

// Handle PayPal webhook event
[apiInstance createLearndashV1CommercePaypalWebhookWith:body
              completionHandler: ^(create_learndash_v1_commerce_paypal_webhook_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalApi()
var opts = {
  'body': Object // {Object} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalWebhook(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalWebhookExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CommercePaypalApi();
            var body = Object;  // Object |  (optional) 

            try {
                // Handle PayPal webhook event
                create_learndash_v1_commerce_paypal_webhook_200_response result = apiInstance.createLearndashV1CommercePaypalWebhook(body);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalApi.createLearndashV1CommercePaypalWebhook: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalApi();
$body = Object; // Object | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalWebhook($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalApi->createLearndashV1CommercePaypalWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalApi->new();
my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalWebhook(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalApi->createLearndashV1CommercePaypalWebhook: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalApi()
body = Object # Object |  (optional)

try:
    # Handle PayPal webhook event
    api_response = api_instance.create_learndash_v1_commerce_paypal_webhook(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalApi->createLearndashV1CommercePaypalWebhook: %s\n" % e)
extern crate CommercePaypalApi;

pub fn main() {
    let body = Object; // Object

    let mut context = CommercePaypalApi::Context::default();
    let result = client.createLearndashV1CommercePaypalWebhook(body, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Commerce Paypal Onboarding

Create PayPal Access Token

Creates the PayPal Access Token using shared_id and auth_code.


/learndash/v1/learndash/v1/commerce/paypal/onboarding/access_token

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/onboarding/access_token?shared_id=sharedId_example&auth_code=authCode_example&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalOnboardingApi;

import java.io.File;
import java.util.*;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        String sharedId = sharedId_example; // String | The shared ID from PayPal onboarding.
        String authCode = authCode_example; // String | The authorization code from PayPal onboarding.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest createLearndashV1CommercePaypalOnboardingAccessTokenRequest = ; // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_onboarding_access_token_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingAccessToken(sharedId, authCode, isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#createLearndashV1CommercePaypalOnboardingAccessToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String sharedId = new String(); // String | The shared ID from PayPal onboarding.
final String authCode = new String(); // String | The authorization code from PayPal onboarding.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest createLearndashV1CommercePaypalOnboardingAccessTokenRequest = new CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest(); // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalOnboardingAccessToken(sharedId, authCode, isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalOnboardingAccessToken: $e\n');
}

import org.openapitools.client.api.CommercePaypalOnboardingApi;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        String sharedId = sharedId_example; // String | The shared ID from PayPal onboarding.
        String authCode = authCode_example; // String | The authorization code from PayPal onboarding.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest createLearndashV1CommercePaypalOnboardingAccessTokenRequest = ; // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_onboarding_access_token_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingAccessToken(sharedId, authCode, isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#createLearndashV1CommercePaypalOnboardingAccessToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalOnboardingApi *apiInstance = [[CommercePaypalOnboardingApi alloc] init];
String *sharedId = sharedId_example; // The shared ID from PayPal onboarding. (optional) (default to null)
String *authCode = authCode_example; // The authorization code from PayPal onboarding. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest *createLearndashV1CommercePaypalOnboardingAccessTokenRequest = ; //  (optional)

// Create PayPal Access Token
[apiInstance createLearndashV1CommercePaypalOnboardingAccessTokenWith:sharedId
    authCode:authCode
    isSandbox:isSandbox
    createLearndashV1CommercePaypalOnboardingAccessTokenRequest:createLearndashV1CommercePaypalOnboardingAccessTokenRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_onboarding_access_token_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalOnboardingApi()
var opts = {
  'sharedId': sharedId_example, // {String} The shared ID from PayPal onboarding.
  'authCode': authCode_example, // {String} The authorization code from PayPal onboarding.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalOnboardingAccessTokenRequest':  // {CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalOnboardingAccessToken(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalOnboardingAccessTokenExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalOnboardingApi();
            var sharedId = sharedId_example;  // String | The shared ID from PayPal onboarding. (optional)  (default to null)
            var authCode = authCode_example;  // String | The authorization code from PayPal onboarding. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalOnboardingAccessTokenRequest = new CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest(); // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest |  (optional) 

            try {
                // Create PayPal Access Token
                create_learndash_v1_commerce_paypal_onboarding_access_token_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingAccessToken(sharedId, authCode, isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalOnboardingApi.createLearndashV1CommercePaypalOnboardingAccessToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalOnboardingApi();
$sharedId = sharedId_example; // String | The shared ID from PayPal onboarding.
$authCode = authCode_example; // String | The authorization code from PayPal onboarding.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalOnboardingAccessTokenRequest = ; // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalOnboardingAccessToken($sharedId, $authCode, $isSandbox, $createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingAccessToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalOnboardingApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalOnboardingApi->new();
my $sharedId = sharedId_example; # String | The shared ID from PayPal onboarding.
my $authCode = authCode_example; # String | The authorization code from PayPal onboarding.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalOnboardingAccessTokenRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest->new(); # CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalOnboardingAccessToken(sharedId => $sharedId, authCode => $authCode, isSandbox => $isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest => $createLearndashV1CommercePaypalOnboardingAccessTokenRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingAccessToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalOnboardingApi()
sharedId = sharedId_example # String | The shared ID from PayPal onboarding. (optional) (default to null)
authCode = authCode_example # String | The authorization code from PayPal onboarding. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalOnboardingAccessTokenRequest =  # CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest |  (optional)

try:
    # Create PayPal Access Token
    api_response = api_instance.create_learndash_v1_commerce_paypal_onboarding_access_token(sharedId=sharedId, authCode=authCode, isSandbox=isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest=createLearndashV1CommercePaypalOnboardingAccessTokenRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingAccessToken: %s\n" % e)
extern crate CommercePaypalOnboardingApi;

pub fn main() {
    let sharedId = sharedId_example; // String
    let authCode = authCode_example; // String
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalOnboardingAccessTokenRequest = ; // CreateLearndashV1CommercePaypalOnboardingAccessTokenRequest

    let mut context = CommercePaypalOnboardingApi::Context::default();
    let result = client.createLearndashV1CommercePaypalOnboardingAccessToken(sharedId, authCode, isSandbox, createLearndashV1CommercePaypalOnboardingAccessTokenRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
shared_id
String
The shared ID from PayPal onboarding.
auth_code
String
The authorization code from PayPal onboarding.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Reconnect PayPal Connection

Reconnects and refreshes the PayPal payment connection and webhooks.


/learndash/v1/learndash/v1/commerce/paypal/onboarding/reconnect

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/onboarding/reconnect?is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalOnboardingApi;

import java.io.File;
import java.util.*;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalOnboardingReconnectRequest createLearndashV1CommercePaypalOnboardingReconnectRequest = ; // CreateLearndashV1CommercePaypalOnboardingReconnectRequest | 

        try {
            create_learndash_v1_commerce_paypal_onboarding_reconnect_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingReconnect(isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#createLearndashV1CommercePaypalOnboardingReconnect");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalOnboardingReconnectRequest createLearndashV1CommercePaypalOnboardingReconnectRequest = new CreateLearndashV1CommercePaypalOnboardingReconnectRequest(); // CreateLearndashV1CommercePaypalOnboardingReconnectRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalOnboardingReconnect(isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalOnboardingReconnect: $e\n');
}

import org.openapitools.client.api.CommercePaypalOnboardingApi;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalOnboardingReconnectRequest createLearndashV1CommercePaypalOnboardingReconnectRequest = ; // CreateLearndashV1CommercePaypalOnboardingReconnectRequest | 

        try {
            create_learndash_v1_commerce_paypal_onboarding_reconnect_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingReconnect(isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#createLearndashV1CommercePaypalOnboardingReconnect");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalOnboardingApi *apiInstance = [[CommercePaypalOnboardingApi alloc] init];
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalOnboardingReconnectRequest *createLearndashV1CommercePaypalOnboardingReconnectRequest = ; //  (optional)

// Reconnect PayPal Connection
[apiInstance createLearndashV1CommercePaypalOnboardingReconnectWith:isSandbox
    createLearndashV1CommercePaypalOnboardingReconnectRequest:createLearndashV1CommercePaypalOnboardingReconnectRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_onboarding_reconnect_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalOnboardingApi()
var opts = {
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalOnboardingReconnectRequest':  // {CreateLearndashV1CommercePaypalOnboardingReconnectRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalOnboardingReconnect(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalOnboardingReconnectExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalOnboardingApi();
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalOnboardingReconnectRequest = new CreateLearndashV1CommercePaypalOnboardingReconnectRequest(); // CreateLearndashV1CommercePaypalOnboardingReconnectRequest |  (optional) 

            try {
                // Reconnect PayPal Connection
                create_learndash_v1_commerce_paypal_onboarding_reconnect_200_response result = apiInstance.createLearndashV1CommercePaypalOnboardingReconnect(isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalOnboardingApi.createLearndashV1CommercePaypalOnboardingReconnect: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalOnboardingApi();
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalOnboardingReconnectRequest = ; // CreateLearndashV1CommercePaypalOnboardingReconnectRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalOnboardingReconnect($isSandbox, $createLearndashV1CommercePaypalOnboardingReconnectRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingReconnect: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalOnboardingApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalOnboardingApi->new();
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalOnboardingReconnectRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalOnboardingReconnectRequest->new(); # CreateLearndashV1CommercePaypalOnboardingReconnectRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalOnboardingReconnect(isSandbox => $isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest => $createLearndashV1CommercePaypalOnboardingReconnectRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingReconnect: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalOnboardingApi()
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalOnboardingReconnectRequest =  # CreateLearndashV1CommercePaypalOnboardingReconnectRequest |  (optional)

try:
    # Reconnect PayPal Connection
    api_response = api_instance.create_learndash_v1_commerce_paypal_onboarding_reconnect(isSandbox=isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest=createLearndashV1CommercePaypalOnboardingReconnectRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalOnboardingApi->createLearndashV1CommercePaypalOnboardingReconnect: %s\n" % e)
extern crate CommercePaypalOnboardingApi;

pub fn main() {
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalOnboardingReconnectRequest = ; // CreateLearndashV1CommercePaypalOnboardingReconnectRequest

    let mut context = CommercePaypalOnboardingApi::Context::default();
    let result = client.createLearndashV1CommercePaypalOnboardingReconnect(isSandbox, createLearndashV1CommercePaypalOnboardingReconnectRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Disconnect PayPal Checkout

Disconnects PayPal Checkout by clearing all stored tokens and data.


/learndash/v1/learndash/v1/commerce/paypal/onboarding/disconnect

Usage and SDK Samples

curl -X DELETE \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/onboarding/disconnect?confirm_disconnect=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalOnboardingApi;

import java.io.File;
import java.util.*;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        Boolean confirmDisconnect = false; // Boolean | Whether to confirm the disconnect.

        try {
            delete_learndash_v1_commerce_paypal_onboarding_disconnect_200_response result = apiInstance.deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#deleteLearndashV1CommercePaypalOnboardingDisconnect");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean confirmDisconnect = new Boolean(); // Boolean | Whether to confirm the disconnect.

try {
    final result = await api_instance.deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLearndashV1CommercePaypalOnboardingDisconnect: $e\n');
}

import org.openapitools.client.api.CommercePaypalOnboardingApi;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        Boolean confirmDisconnect = false; // Boolean | Whether to confirm the disconnect.

        try {
            delete_learndash_v1_commerce_paypal_onboarding_disconnect_200_response result = apiInstance.deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#deleteLearndashV1CommercePaypalOnboardingDisconnect");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalOnboardingApi *apiInstance = [[CommercePaypalOnboardingApi alloc] init];
Boolean *confirmDisconnect = false; // Whether to confirm the disconnect. (optional) (default to false)

// Disconnect PayPal Checkout
[apiInstance deleteLearndashV1CommercePaypalOnboardingDisconnectWith:confirmDisconnect
              completionHandler: ^(delete_learndash_v1_commerce_paypal_onboarding_disconnect_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalOnboardingApi()
var opts = {
  'confirmDisconnect': false // {Boolean} Whether to confirm the disconnect.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLearndashV1CommercePaypalOnboardingDisconnect(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLearndashV1CommercePaypalOnboardingDisconnectExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalOnboardingApi();
            var confirmDisconnect = false;  // Boolean | Whether to confirm the disconnect. (optional)  (default to false)

            try {
                // Disconnect PayPal Checkout
                delete_learndash_v1_commerce_paypal_onboarding_disconnect_200_response result = apiInstance.deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalOnboardingApi.deleteLearndashV1CommercePaypalOnboardingDisconnect: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalOnboardingApi();
$confirmDisconnect = false; // Boolean | Whether to confirm the disconnect.

try {
    $result = $api_instance->deleteLearndashV1CommercePaypalOnboardingDisconnect($confirmDisconnect);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalOnboardingApi->deleteLearndashV1CommercePaypalOnboardingDisconnect: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalOnboardingApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalOnboardingApi->new();
my $confirmDisconnect = false; # Boolean | Whether to confirm the disconnect.

eval {
    my $result = $api_instance->deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect => $confirmDisconnect);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalOnboardingApi->deleteLearndashV1CommercePaypalOnboardingDisconnect: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalOnboardingApi()
confirmDisconnect = false # Boolean | Whether to confirm the disconnect. (optional) (default to false)

try:
    # Disconnect PayPal Checkout
    api_response = api_instance.delete_learndash_v1_commerce_paypal_onboarding_disconnect(confirmDisconnect=confirmDisconnect)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalOnboardingApi->deleteLearndashV1CommercePaypalOnboardingDisconnect: %s\n" % e)
extern crate CommercePaypalOnboardingApi;

pub fn main() {
    let confirmDisconnect = false; // Boolean

    let mut context = CommercePaypalOnboardingApi::Context::default();
    let result = client.deleteLearndashV1CommercePaypalOnboardingDisconnect(confirmDisconnect, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
confirm_disconnect
Boolean
Whether to confirm the disconnect.

Responses


Retrieve PayPal Seller signup URL

Retrieves the PayPal Seller signup URL for the current user.


/learndash/v1/learndash/v1/commerce/paypal/onboarding/signup_url

Usage and SDK Samples

curl -X GET \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/onboarding/signup_url?account_country=US&is_sandbox=false&is_setup_wizard=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalOnboardingApi;

import java.io.File;
import java.util.*;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        String accountCountry = US; // String | The country code of the account to sign up.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        Boolean isSetupWizard = false; // Boolean | Whether the request is from the setup wizard.

        try {
            list_learndash_v1_commerce_paypal_onboarding_signup_url_200_response result = apiInstance.listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry, isSandbox, isSetupWizard);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#listLearndashV1CommercePaypalOnboardingSignupUrl");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String accountCountry = new String(); // String | The country code of the account to sign up.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final Boolean isSetupWizard = new Boolean(); // Boolean | Whether the request is from the setup wizard.

try {
    final result = await api_instance.listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry, isSandbox, isSetupWizard);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLearndashV1CommercePaypalOnboardingSignupUrl: $e\n');
}

import org.openapitools.client.api.CommercePaypalOnboardingApi;

public class CommercePaypalOnboardingApiExample {
    public static void main(String[] args) {
        CommercePaypalOnboardingApi apiInstance = new CommercePaypalOnboardingApi();
        String accountCountry = US; // String | The country code of the account to sign up.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        Boolean isSetupWizard = false; // Boolean | Whether the request is from the setup wizard.

        try {
            list_learndash_v1_commerce_paypal_onboarding_signup_url_200_response result = apiInstance.listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry, isSandbox, isSetupWizard);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalOnboardingApi#listLearndashV1CommercePaypalOnboardingSignupUrl");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalOnboardingApi *apiInstance = [[CommercePaypalOnboardingApi alloc] init];
String *accountCountry = US; // The country code of the account to sign up. (optional) (default to US)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
Boolean *isSetupWizard = false; // Whether the request is from the setup wizard. (optional) (default to false)

// Retrieve PayPal Seller signup URL
[apiInstance listLearndashV1CommercePaypalOnboardingSignupUrlWith:accountCountry
    isSandbox:isSandbox
    isSetupWizard:isSetupWizard
              completionHandler: ^(list_learndash_v1_commerce_paypal_onboarding_signup_url_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalOnboardingApi()
var opts = {
  'accountCountry': US, // {String} The country code of the account to sign up.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'isSetupWizard': false // {Boolean} Whether the request is from the setup wizard.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLearndashV1CommercePaypalOnboardingSignupUrl(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLearndashV1CommercePaypalOnboardingSignupUrlExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalOnboardingApi();
            var accountCountry = US;  // String | The country code of the account to sign up. (optional)  (default to US)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var isSetupWizard = false;  // Boolean | Whether the request is from the setup wizard. (optional)  (default to false)

            try {
                // Retrieve PayPal Seller signup URL
                list_learndash_v1_commerce_paypal_onboarding_signup_url_200_response result = apiInstance.listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry, isSandbox, isSetupWizard);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalOnboardingApi.listLearndashV1CommercePaypalOnboardingSignupUrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalOnboardingApi();
$accountCountry = US; // String | The country code of the account to sign up.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$isSetupWizard = false; // Boolean | Whether the request is from the setup wizard.

try {
    $result = $api_instance->listLearndashV1CommercePaypalOnboardingSignupUrl($accountCountry, $isSandbox, $isSetupWizard);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalOnboardingApi->listLearndashV1CommercePaypalOnboardingSignupUrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalOnboardingApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalOnboardingApi->new();
my $accountCountry = US; # String | The country code of the account to sign up.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $isSetupWizard = false; # Boolean | Whether the request is from the setup wizard.

eval {
    my $result = $api_instance->listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry => $accountCountry, isSandbox => $isSandbox, isSetupWizard => $isSetupWizard);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalOnboardingApi->listLearndashV1CommercePaypalOnboardingSignupUrl: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalOnboardingApi()
accountCountry = US # String | The country code of the account to sign up. (optional) (default to US)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
isSetupWizard = false # Boolean | Whether the request is from the setup wizard. (optional) (default to false)

try:
    # Retrieve PayPal Seller signup URL
    api_response = api_instance.list_learndash_v1_commerce_paypal_onboarding_signup_url(accountCountry=accountCountry, isSandbox=isSandbox, isSetupWizard=isSetupWizard)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalOnboardingApi->listLearndashV1CommercePaypalOnboardingSignupUrl: %s\n" % e)
extern crate CommercePaypalOnboardingApi;

pub fn main() {
    let accountCountry = US; // String
    let isSandbox = false; // Boolean
    let isSetupWizard = false; // Boolean

    let mut context = CommercePaypalOnboardingApi::Context::default();
    let result = client.listLearndashV1CommercePaypalOnboardingSignupUrl(accountCountry, isSandbox, isSetupWizard, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
account_country
String
The country code of the account to sign up.
is_sandbox
Boolean
Whether to use the sandbox environment.
is_setup_wizard
Boolean
Whether the request is from the setup wizard.

Responses


Commerce Paypal Payments

Cancels a PayPal order

Cancels a PayPal order.


/learndash/v1/learndash/v1/commerce/paypal/payments/cancel

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/cancel?order_id=orderId_example&user_id=56&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to cancel.
        Integer userId = 56; // Integer | The user ID to cancel the PayPal order for.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsCancelRequest createLearndashV1CommercePaypalPaymentsCancelRequest = ; // CreateLearndashV1CommercePaypalPaymentsCancelRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_cancel_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCancel(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsCancel");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String orderId = new String(); // String | The PayPal order ID to cancel.
final Integer userId = new Integer(); // Integer | The user ID to cancel the PayPal order for.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsCancelRequest createLearndashV1CommercePaypalPaymentsCancelRequest = new CreateLearndashV1CommercePaypalPaymentsCancelRequest(); // CreateLearndashV1CommercePaypalPaymentsCancelRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsCancel(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsCancel: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to cancel.
        Integer userId = 56; // Integer | The user ID to cancel the PayPal order for.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsCancelRequest createLearndashV1CommercePaypalPaymentsCancelRequest = ; // CreateLearndashV1CommercePaypalPaymentsCancelRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_cancel_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCancel(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsCancel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
String *orderId = orderId_example; // The PayPal order ID to cancel. (optional) (default to null)
Integer *userId = 56; // The user ID to cancel the PayPal order for. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsCancelRequest *createLearndashV1CommercePaypalPaymentsCancelRequest = ; //  (optional)

// Cancels a PayPal order
[apiInstance createLearndashV1CommercePaypalPaymentsCancelWith:orderId
    userId:userId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsCancelRequest:createLearndashV1CommercePaypalPaymentsCancelRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_cancel_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'orderId': orderId_example, // {String} The PayPal order ID to cancel.
  'userId': 56, // {Integer} The user ID to cancel the PayPal order for.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsCancelRequest':  // {CreateLearndashV1CommercePaypalPaymentsCancelRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsCancel(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsCancelExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var orderId = orderId_example;  // String | The PayPal order ID to cancel. (optional)  (default to null)
            var userId = 56;  // Integer | The user ID to cancel the PayPal order for. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsCancelRequest = new CreateLearndashV1CommercePaypalPaymentsCancelRequest(); // CreateLearndashV1CommercePaypalPaymentsCancelRequest |  (optional) 

            try {
                // Cancels a PayPal order
                create_learndash_v1_commerce_paypal_payments_cancel_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCancel(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsCancel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$orderId = orderId_example; // String | The PayPal order ID to cancel.
$userId = 56; // Integer | The user ID to cancel the PayPal order for.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsCancelRequest = ; // CreateLearndashV1CommercePaypalPaymentsCancelRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsCancel($orderId, $userId, $isSandbox, $createLearndashV1CommercePaypalPaymentsCancelRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCancel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $orderId = orderId_example; # String | The PayPal order ID to cancel.
my $userId = 56; # Integer | The user ID to cancel the PayPal order for.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsCancelRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsCancelRequest->new(); # CreateLearndashV1CommercePaypalPaymentsCancelRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsCancel(orderId => $orderId, userId => $userId, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest => $createLearndashV1CommercePaypalPaymentsCancelRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCancel: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
orderId = orderId_example # String | The PayPal order ID to cancel. (optional) (default to null)
userId = 56 # Integer | The user ID to cancel the PayPal order for. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsCancelRequest =  # CreateLearndashV1CommercePaypalPaymentsCancelRequest |  (optional)

try:
    # Cancels a PayPal order
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_cancel(orderId=orderId, userId=userId, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest=createLearndashV1CommercePaypalPaymentsCancelRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCancel: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let orderId = orderId_example; // String
    let userId = 56; // Integer
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsCancelRequest = ; // CreateLearndashV1CommercePaypalPaymentsCancelRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsCancel(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsCancelRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
order_id
String
The PayPal order ID to cancel.
user_id
Integer
The user ID to cancel the PayPal order for.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Capture a PayPal order

Captures a PayPal order to complete the payment.


/learndash/v1/learndash/v1/commerce/paypal/payments/capture

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/capture?order_id=orderId_example&payer_id=&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to capture.
        String payerId = ; // String | The PayPal payer ID.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsCaptureRequest createLearndashV1CommercePaypalPaymentsCaptureRequest = ; // CreateLearndashV1CommercePaypalPaymentsCaptureRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_capture_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCapture(orderId, payerId, isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsCapture");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String orderId = new String(); // String | The PayPal order ID to capture.
final String payerId = new String(); // String | The PayPal payer ID.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsCaptureRequest createLearndashV1CommercePaypalPaymentsCaptureRequest = new CreateLearndashV1CommercePaypalPaymentsCaptureRequest(); // CreateLearndashV1CommercePaypalPaymentsCaptureRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsCapture(orderId, payerId, isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsCapture: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to capture.
        String payerId = ; // String | The PayPal payer ID.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsCaptureRequest createLearndashV1CommercePaypalPaymentsCaptureRequest = ; // CreateLearndashV1CommercePaypalPaymentsCaptureRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_capture_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCapture(orderId, payerId, isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsCapture");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
String *orderId = orderId_example; // The PayPal order ID to capture. (optional) (default to null)
String *payerId = ; // The PayPal payer ID. (optional) (default to )
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsCaptureRequest *createLearndashV1CommercePaypalPaymentsCaptureRequest = ; //  (optional)

// Capture a PayPal order
[apiInstance createLearndashV1CommercePaypalPaymentsCaptureWith:orderId
    payerId:payerId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsCaptureRequest:createLearndashV1CommercePaypalPaymentsCaptureRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_capture_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'orderId': orderId_example, // {String} The PayPal order ID to capture.
  'payerId': , // {String} The PayPal payer ID.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsCaptureRequest':  // {CreateLearndashV1CommercePaypalPaymentsCaptureRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsCapture(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsCaptureExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var orderId = orderId_example;  // String | The PayPal order ID to capture. (optional)  (default to null)
            var payerId = ;  // String | The PayPal payer ID. (optional)  (default to )
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsCaptureRequest = new CreateLearndashV1CommercePaypalPaymentsCaptureRequest(); // CreateLearndashV1CommercePaypalPaymentsCaptureRequest |  (optional) 

            try {
                // Capture a PayPal order
                create_learndash_v1_commerce_paypal_payments_capture_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsCapture(orderId, payerId, isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsCapture: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$orderId = orderId_example; // String | The PayPal order ID to capture.
$payerId = ; // String | The PayPal payer ID.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsCaptureRequest = ; // CreateLearndashV1CommercePaypalPaymentsCaptureRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsCapture($orderId, $payerId, $isSandbox, $createLearndashV1CommercePaypalPaymentsCaptureRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCapture: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $orderId = orderId_example; # String | The PayPal order ID to capture.
my $payerId = ; # String | The PayPal payer ID.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsCaptureRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsCaptureRequest->new(); # CreateLearndashV1CommercePaypalPaymentsCaptureRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsCapture(orderId => $orderId, payerId => $payerId, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest => $createLearndashV1CommercePaypalPaymentsCaptureRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCapture: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
orderId = orderId_example # String | The PayPal order ID to capture. (optional) (default to null)
payerId =  # String | The PayPal payer ID. (optional) (default to )
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsCaptureRequest =  # CreateLearndashV1CommercePaypalPaymentsCaptureRequest |  (optional)

try:
    # Capture a PayPal order
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_capture(orderId=orderId, payerId=payerId, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest=createLearndashV1CommercePaypalPaymentsCaptureRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsCapture: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let orderId = orderId_example; // String
    let payerId = ; // String
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsCaptureRequest = ; // CreateLearndashV1CommercePaypalPaymentsCaptureRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsCapture(orderId, payerId, isSandbox, createLearndashV1CommercePaypalPaymentsCaptureRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
order_id
String
The PayPal order ID to capture.
payer_id
String
The PayPal payer ID.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Confirm a PayPal order

Confirms a PayPal order and returns the redirect URL.


/learndash/v1/learndash/v1/commerce/paypal/payments/confirm

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/confirm?order_id=orderId_example&user_id=56&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to confirm.
        Integer userId = 56; // Integer | The PayPal user ID for the payment confirmation.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsConfirmRequest createLearndashV1CommercePaypalPaymentsConfirmRequest = ; // CreateLearndashV1CommercePaypalPaymentsConfirmRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_confirm_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsConfirm(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsConfirm");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String orderId = new String(); // String | The PayPal order ID to confirm.
final Integer userId = new Integer(); // Integer | The PayPal user ID for the payment confirmation.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsConfirmRequest createLearndashV1CommercePaypalPaymentsConfirmRequest = new CreateLearndashV1CommercePaypalPaymentsConfirmRequest(); // CreateLearndashV1CommercePaypalPaymentsConfirmRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsConfirm(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsConfirm: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String orderId = orderId_example; // String | The PayPal order ID to confirm.
        Integer userId = 56; // Integer | The PayPal user ID for the payment confirmation.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsConfirmRequest createLearndashV1CommercePaypalPaymentsConfirmRequest = ; // CreateLearndashV1CommercePaypalPaymentsConfirmRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_confirm_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsConfirm(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsConfirm");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
String *orderId = orderId_example; // The PayPal order ID to confirm. (optional) (default to null)
Integer *userId = 56; // The PayPal user ID for the payment confirmation. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsConfirmRequest *createLearndashV1CommercePaypalPaymentsConfirmRequest = ; //  (optional)

// Confirm a PayPal order
[apiInstance createLearndashV1CommercePaypalPaymentsConfirmWith:orderId
    userId:userId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsConfirmRequest:createLearndashV1CommercePaypalPaymentsConfirmRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_confirm_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'orderId': orderId_example, // {String} The PayPal order ID to confirm.
  'userId': 56, // {Integer} The PayPal user ID for the payment confirmation.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsConfirmRequest':  // {CreateLearndashV1CommercePaypalPaymentsConfirmRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsConfirm(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsConfirmExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var orderId = orderId_example;  // String | The PayPal order ID to confirm. (optional)  (default to null)
            var userId = 56;  // Integer | The PayPal user ID for the payment confirmation. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsConfirmRequest = new CreateLearndashV1CommercePaypalPaymentsConfirmRequest(); // CreateLearndashV1CommercePaypalPaymentsConfirmRequest |  (optional) 

            try {
                // Confirm a PayPal order
                create_learndash_v1_commerce_paypal_payments_confirm_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsConfirm(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsConfirm: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$orderId = orderId_example; // String | The PayPal order ID to confirm.
$userId = 56; // Integer | The PayPal user ID for the payment confirmation.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsConfirmRequest = ; // CreateLearndashV1CommercePaypalPaymentsConfirmRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsConfirm($orderId, $userId, $isSandbox, $createLearndashV1CommercePaypalPaymentsConfirmRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsConfirm: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $orderId = orderId_example; # String | The PayPal order ID to confirm.
my $userId = 56; # Integer | The PayPal user ID for the payment confirmation.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsConfirmRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsConfirmRequest->new(); # CreateLearndashV1CommercePaypalPaymentsConfirmRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsConfirm(orderId => $orderId, userId => $userId, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest => $createLearndashV1CommercePaypalPaymentsConfirmRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsConfirm: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
orderId = orderId_example # String | The PayPal order ID to confirm. (optional) (default to null)
userId = 56 # Integer | The PayPal user ID for the payment confirmation. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsConfirmRequest =  # CreateLearndashV1CommercePaypalPaymentsConfirmRequest |  (optional)

try:
    # Confirm a PayPal order
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_confirm(orderId=orderId, userId=userId, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest=createLearndashV1CommercePaypalPaymentsConfirmRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsConfirm: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let orderId = orderId_example; // String
    let userId = 56; // Integer
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsConfirmRequest = ; // CreateLearndashV1CommercePaypalPaymentsConfirmRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsConfirm(orderId, userId, isSandbox, createLearndashV1CommercePaypalPaymentsConfirmRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
order_id
String
The PayPal order ID to confirm.
user_id
Integer
The PayPal user ID for the payment confirmation.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Create PayPal order

Creates a new PayPal order for payment processing.


/learndash/v1/learndash/v1/commerce/paypal/payments/order

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/order?products=&user_id=56&use_card_fields=false&save_payment_method=false&customer_id=&vault_id=&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        array[Integer] products = ; // array[Integer] | Array of product IDs to purchase.
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean useCardFields = false; // Boolean | Whether to use the card fields.
        Boolean savePaymentMethod = false; // Boolean | Whether to save the payment method for future use.
        String customerId = ; // String | The PayPal customer ID to use for the payment.
        String vaultId = ; // String | The PayPal vault ID to use for the payment.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsOrderRequest createLearndashV1CommercePaypalPaymentsOrderRequest = ; // CreateLearndashV1CommercePaypalPaymentsOrderRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_order_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsOrder(products, userId, useCardFields, savePaymentMethod, customerId, vaultId, isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[Integer] products = new array[Integer](); // array[Integer] | Array of product IDs to purchase.
final Integer userId = new Integer(); // Integer | User ID of the customer.
final Boolean useCardFields = new Boolean(); // Boolean | Whether to use the card fields.
final Boolean savePaymentMethod = new Boolean(); // Boolean | Whether to save the payment method for future use.
final String customerId = new String(); // String | The PayPal customer ID to use for the payment.
final String vaultId = new String(); // String | The PayPal vault ID to use for the payment.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsOrderRequest createLearndashV1CommercePaypalPaymentsOrderRequest = new CreateLearndashV1CommercePaypalPaymentsOrderRequest(); // CreateLearndashV1CommercePaypalPaymentsOrderRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsOrder(products, userId, useCardFields, savePaymentMethod, customerId, vaultId, isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsOrder: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        array[Integer] products = ; // array[Integer] | Array of product IDs to purchase.
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean useCardFields = false; // Boolean | Whether to use the card fields.
        Boolean savePaymentMethod = false; // Boolean | Whether to save the payment method for future use.
        String customerId = ; // String | The PayPal customer ID to use for the payment.
        String vaultId = ; // String | The PayPal vault ID to use for the payment.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsOrderRequest createLearndashV1CommercePaypalPaymentsOrderRequest = ; // CreateLearndashV1CommercePaypalPaymentsOrderRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_order_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsOrder(products, userId, useCardFields, savePaymentMethod, customerId, vaultId, isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
array[Integer] *products = ; // Array of product IDs to purchase. (optional) (default to null)
Integer *userId = 56; // User ID of the customer. (optional) (default to null)
Boolean *useCardFields = false; // Whether to use the card fields. (optional) (default to false)
Boolean *savePaymentMethod = false; // Whether to save the payment method for future use. (optional) (default to false)
String *customerId = ; // The PayPal customer ID to use for the payment. (optional) (default to )
String *vaultId = ; // The PayPal vault ID to use for the payment. (optional) (default to )
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsOrderRequest *createLearndashV1CommercePaypalPaymentsOrderRequest = ; //  (optional)

// Create PayPal order
[apiInstance createLearndashV1CommercePaypalPaymentsOrderWith:products
    userId:userId
    useCardFields:useCardFields
    savePaymentMethod:savePaymentMethod
    customerId:customerId
    vaultId:vaultId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsOrderRequest:createLearndashV1CommercePaypalPaymentsOrderRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_order_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'products': , // {array[Integer]} Array of product IDs to purchase.
  'userId': 56, // {Integer} User ID of the customer.
  'useCardFields': false, // {Boolean} Whether to use the card fields.
  'savePaymentMethod': false, // {Boolean} Whether to save the payment method for future use.
  'customerId': , // {String} The PayPal customer ID to use for the payment.
  'vaultId': , // {String} The PayPal vault ID to use for the payment.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsOrderRequest':  // {CreateLearndashV1CommercePaypalPaymentsOrderRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsOrder(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsOrderExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var products = new array[Integer](); // array[Integer] | Array of product IDs to purchase. (optional)  (default to null)
            var userId = 56;  // Integer | User ID of the customer. (optional)  (default to null)
            var useCardFields = false;  // Boolean | Whether to use the card fields. (optional)  (default to false)
            var savePaymentMethod = false;  // Boolean | Whether to save the payment method for future use. (optional)  (default to false)
            var customerId = ;  // String | The PayPal customer ID to use for the payment. (optional)  (default to )
            var vaultId = ;  // String | The PayPal vault ID to use for the payment. (optional)  (default to )
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsOrderRequest = new CreateLearndashV1CommercePaypalPaymentsOrderRequest(); // CreateLearndashV1CommercePaypalPaymentsOrderRequest |  (optional) 

            try {
                // Create PayPal order
                create_learndash_v1_commerce_paypal_payments_order_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsOrder(products, userId, useCardFields, savePaymentMethod, customerId, vaultId, isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$products = ; // array[Integer] | Array of product IDs to purchase.
$userId = 56; // Integer | User ID of the customer.
$useCardFields = false; // Boolean | Whether to use the card fields.
$savePaymentMethod = false; // Boolean | Whether to save the payment method for future use.
$customerId = ; // String | The PayPal customer ID to use for the payment.
$vaultId = ; // String | The PayPal vault ID to use for the payment.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsOrderRequest = ; // CreateLearndashV1CommercePaypalPaymentsOrderRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsOrder($products, $userId, $useCardFields, $savePaymentMethod, $customerId, $vaultId, $isSandbox, $createLearndashV1CommercePaypalPaymentsOrderRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $products = []; # array[Integer] | Array of product IDs to purchase.
my $userId = 56; # Integer | User ID of the customer.
my $useCardFields = false; # Boolean | Whether to use the card fields.
my $savePaymentMethod = false; # Boolean | Whether to save the payment method for future use.
my $customerId = ; # String | The PayPal customer ID to use for the payment.
my $vaultId = ; # String | The PayPal vault ID to use for the payment.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsOrderRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsOrderRequest->new(); # CreateLearndashV1CommercePaypalPaymentsOrderRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsOrder(products => $products, userId => $userId, useCardFields => $useCardFields, savePaymentMethod => $savePaymentMethod, customerId => $customerId, vaultId => $vaultId, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest => $createLearndashV1CommercePaypalPaymentsOrderRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
products =  # array[Integer] | Array of product IDs to purchase. (optional) (default to null)
userId = 56 # Integer | User ID of the customer. (optional) (default to null)
useCardFields = false # Boolean | Whether to use the card fields. (optional) (default to false)
savePaymentMethod = false # Boolean | Whether to save the payment method for future use. (optional) (default to false)
customerId =  # String | The PayPal customer ID to use for the payment. (optional) (default to )
vaultId =  # String | The PayPal vault ID to use for the payment. (optional) (default to )
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsOrderRequest =  # CreateLearndashV1CommercePaypalPaymentsOrderRequest |  (optional)

try:
    # Create PayPal order
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_order(products=products, userId=userId, useCardFields=useCardFields, savePaymentMethod=savePaymentMethod, customerId=customerId, vaultId=vaultId, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest=createLearndashV1CommercePaypalPaymentsOrderRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsOrder: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let products = ; // array[Integer]
    let userId = 56; // Integer
    let useCardFields = false; // Boolean
    let savePaymentMethod = false; // Boolean
    let customerId = ; // String
    let vaultId = ; // String
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsOrderRequest = ; // CreateLearndashV1CommercePaypalPaymentsOrderRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsOrder(products, userId, useCardFields, savePaymentMethod, customerId, vaultId, isSandbox, createLearndashV1CommercePaypalPaymentsOrderRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
products
array[Integer]
Array of product IDs to purchase.
user_id
Integer
User ID of the customer.
use_card_fields
Boolean
Whether to use the card fields.
save_payment_method
Boolean
Whether to save the payment method for future use.
customer_id
String
The PayPal customer ID to use for the payment.
vault_id
String
The PayPal vault ID to use for the payment.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Create PayPal Payment Token

Creates a new PayPal payment token for vaulting payment methods.


/learndash/v1/learndash/v1/commerce/paypal/payments/payment-token

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/payment-token?token_id=tokenId_example&user_id=56&product_id=0&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String tokenId = tokenId_example; // String | The PayPal setup token ID.
        Integer userId = 56; // Integer | User ID to associate the payment token with.
        Integer productId = 0; // Integer | Product ID for the payment.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId, userId, productId, isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsPaymentToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tokenId = new String(); // String | The PayPal setup token ID.
final Integer userId = new Integer(); // Integer | User ID to associate the payment token with.
final Integer productId = new Integer(); // Integer | Product ID for the payment.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = new CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest(); // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId, userId, productId, isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsPaymentToken: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        String tokenId = tokenId_example; // String | The PayPal setup token ID.
        Integer userId = 56; // Integer | User ID to associate the payment token with.
        Integer productId = 0; // Integer | Product ID for the payment.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId, userId, productId, isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsPaymentToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
String *tokenId = tokenId_example; // The PayPal setup token ID. (optional) (default to null)
Integer *userId = 56; // User ID to associate the payment token with. (optional) (default to null)
Integer *productId = 0; // Product ID for the payment. (optional) (default to 0)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest *createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = ; //  (optional)

// Create PayPal Payment Token
[apiInstance createLearndashV1CommercePaypalPaymentsPaymentTokenWith:tokenId
    userId:userId
    productId:productId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsPaymentTokenRequest:createLearndashV1CommercePaypalPaymentsPaymentTokenRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_payment_token_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'tokenId': tokenId_example, // {String} The PayPal setup token ID.
  'userId': 56, // {Integer} User ID to associate the payment token with.
  'productId': 0, // {Integer} Product ID for the payment.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsPaymentTokenRequest':  // {CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsPaymentToken(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsPaymentTokenExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var tokenId = tokenId_example;  // String | The PayPal setup token ID. (optional)  (default to null)
            var userId = 56;  // Integer | User ID to associate the payment token with. (optional)  (default to null)
            var productId = 0;  // Integer | Product ID for the payment. (optional)  (default to 0)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = new CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest(); // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest |  (optional) 

            try {
                // Create PayPal Payment Token
                create_learndash_v1_commerce_paypal_payments_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId, userId, productId, isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsPaymentToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$tokenId = tokenId_example; // String | The PayPal setup token ID.
$userId = 56; // Integer | User ID to associate the payment token with.
$productId = 0; // Integer | Product ID for the payment.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsPaymentToken($tokenId, $userId, $productId, $isSandbox, $createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsPaymentToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $tokenId = tokenId_example; # String | The PayPal setup token ID.
my $userId = 56; # Integer | User ID to associate the payment token with.
my $productId = 0; # Integer | Product ID for the payment.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest->new(); # CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId => $tokenId, userId => $userId, productId => $productId, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest => $createLearndashV1CommercePaypalPaymentsPaymentTokenRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsPaymentToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
tokenId = tokenId_example # String | The PayPal setup token ID. (optional) (default to null)
userId = 56 # Integer | User ID to associate the payment token with. (optional) (default to null)
productId = 0 # Integer | Product ID for the payment. (optional) (default to 0)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsPaymentTokenRequest =  # CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest |  (optional)

try:
    # Create PayPal Payment Token
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_payment_token(tokenId=tokenId, userId=userId, productId=productId, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest=createLearndashV1CommercePaypalPaymentsPaymentTokenRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsPaymentToken: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let tokenId = tokenId_example; // String
    let userId = 56; // Integer
    let productId = 0; // Integer
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsPaymentTokenRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsPaymentToken(tokenId, userId, productId, isSandbox, createLearndashV1CommercePaypalPaymentsPaymentTokenRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
token_id
String
The PayPal setup token ID.
user_id
Integer
User ID to associate the payment token with.
product_id
Integer
Product ID for the payment.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Create PayPal Setup Token

Creates a new PayPal setup token for recurring payments with free trials.


/learndash/v1/learndash/v1/commerce/paypal/payments/setup-token

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/setup-token?product_id=0&user_id=56&use_card_fields=false&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer productId = 0; // Integer | Product ID for the setup token.
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean useCardFields = false; // Boolean | Whether to use the card fields.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest createLearndashV1CommercePaypalPaymentsSetupTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsSetupToken(productId, userId, useCardFields, isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsSetupToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer productId = new Integer(); // Integer | Product ID for the setup token.
final Integer userId = new Integer(); // Integer | User ID of the customer.
final Boolean useCardFields = new Boolean(); // Boolean | Whether to use the card fields.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest createLearndashV1CommercePaypalPaymentsSetupTokenRequest = new CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest(); // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsSetupToken(productId, userId, useCardFields, isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsSetupToken: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer productId = 0; // Integer | Product ID for the setup token.
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean useCardFields = false; // Boolean | Whether to use the card fields.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest createLearndashV1CommercePaypalPaymentsSetupTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsSetupToken(productId, userId, useCardFields, isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsSetupToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
Integer *productId = 0; // Product ID for the setup token. (optional) (default to 0)
Integer *userId = 56; // User ID of the customer. (optional) (default to null)
Boolean *useCardFields = false; // Whether to use the card fields. (optional) (default to false)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest *createLearndashV1CommercePaypalPaymentsSetupTokenRequest = ; //  (optional)

// Create PayPal Setup Token
[apiInstance createLearndashV1CommercePaypalPaymentsSetupTokenWith:productId
    userId:userId
    useCardFields:useCardFields
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsSetupTokenRequest:createLearndashV1CommercePaypalPaymentsSetupTokenRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_setup_token_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'productId': 0, // {Integer} Product ID for the setup token.
  'userId': 56, // {Integer} User ID of the customer.
  'useCardFields': false, // {Boolean} Whether to use the card fields.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsSetupTokenRequest':  // {CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsSetupToken(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsSetupTokenExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var productId = 0;  // Integer | Product ID for the setup token. (optional)  (default to 0)
            var userId = 56;  // Integer | User ID of the customer. (optional)  (default to null)
            var useCardFields = false;  // Boolean | Whether to use the card fields. (optional)  (default to false)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsSetupTokenRequest = new CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest(); // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest |  (optional) 

            try {
                // Create PayPal Setup Token
                create_learndash_v1_commerce_paypal_payments_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsSetupToken(productId, userId, useCardFields, isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsSetupToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$productId = 0; // Integer | Product ID for the setup token.
$userId = 56; // Integer | User ID of the customer.
$useCardFields = false; // Boolean | Whether to use the card fields.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsSetupTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsSetupToken($productId, $userId, $useCardFields, $isSandbox, $createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsSetupToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $productId = 0; # Integer | Product ID for the setup token.
my $userId = 56; # Integer | User ID of the customer.
my $useCardFields = false; # Boolean | Whether to use the card fields.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsSetupTokenRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest->new(); # CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsSetupToken(productId => $productId, userId => $userId, useCardFields => $useCardFields, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest => $createLearndashV1CommercePaypalPaymentsSetupTokenRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsSetupToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
productId = 0 # Integer | Product ID for the setup token. (optional) (default to 0)
userId = 56 # Integer | User ID of the customer. (optional) (default to null)
useCardFields = false # Boolean | Whether to use the card fields. (optional) (default to false)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsSetupTokenRequest =  # CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest |  (optional)

try:
    # Create PayPal Setup Token
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_setup_token(productId=productId, userId=userId, useCardFields=useCardFields, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest=createLearndashV1CommercePaypalPaymentsSetupTokenRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsSetupToken: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let productId = 0; // Integer
    let userId = 56; // Integer
    let useCardFields = false; // Boolean
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsSetupTokenRequest = ; // CreateLearndashV1CommercePaypalPaymentsSetupTokenRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsSetupToken(productId, userId, useCardFields, isSandbox, createLearndashV1CommercePaypalPaymentsSetupTokenRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
product_id
Integer
Product ID for the setup token.
user_id
Integer
User ID of the customer.
use_card_fields
Boolean
Whether to use the card fields.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Start a free trial

Starts a free trial for a user.


/learndash/v1/learndash/v1/commerce/paypal/payments/start-trial

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/start-trial?user_id=56&product_id=56&token_id=tokenId_example&customer_id=customerId_example&type=type_example&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer userId = 56; // Integer | The user ID for the trial.
        Integer productId = 56; // Integer | The product ID for the trial.
        String tokenId = tokenId_example; // String | The PayPal token ID.
        String customerId = customerId_example; // String | The PayPal customer ID.
        String type = type_example; // String | The payment type.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsStartTrialRequest createLearndashV1CommercePaypalPaymentsStartTrialRequest = ; // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_start_trial_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsStartTrial(userId, productId, tokenId, customerId, type, isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsStartTrial");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer userId = new Integer(); // Integer | The user ID for the trial.
final Integer productId = new Integer(); // Integer | The product ID for the trial.
final String tokenId = new String(); // String | The PayPal token ID.
final String customerId = new String(); // String | The PayPal customer ID.
final String type = new String(); // String | The payment type.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalPaymentsStartTrialRequest createLearndashV1CommercePaypalPaymentsStartTrialRequest = new CreateLearndashV1CommercePaypalPaymentsStartTrialRequest(); // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalPaymentsStartTrial(userId, productId, tokenId, customerId, type, isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalPaymentsStartTrial: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer userId = 56; // Integer | The user ID for the trial.
        Integer productId = 56; // Integer | The product ID for the trial.
        String tokenId = tokenId_example; // String | The PayPal token ID.
        String customerId = customerId_example; // String | The PayPal customer ID.
        String type = type_example; // String | The payment type.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalPaymentsStartTrialRequest createLearndashV1CommercePaypalPaymentsStartTrialRequest = ; // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest | 

        try {
            create_learndash_v1_commerce_paypal_payments_start_trial_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsStartTrial(userId, productId, tokenId, customerId, type, isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#createLearndashV1CommercePaypalPaymentsStartTrial");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
Integer *userId = 56; // The user ID for the trial. (optional) (default to null)
Integer *productId = 56; // The product ID for the trial. (optional) (default to null)
String *tokenId = tokenId_example; // The PayPal token ID. (optional) (default to null)
String *customerId = customerId_example; // The PayPal customer ID. (optional) (default to null)
String *type = type_example; // The payment type. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalPaymentsStartTrialRequest *createLearndashV1CommercePaypalPaymentsStartTrialRequest = ; //  (optional)

// Start a free trial
[apiInstance createLearndashV1CommercePaypalPaymentsStartTrialWith:userId
    productId:productId
    tokenId:tokenId
    customerId:customerId
    type:type
    isSandbox:isSandbox
    createLearndashV1CommercePaypalPaymentsStartTrialRequest:createLearndashV1CommercePaypalPaymentsStartTrialRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_payments_start_trial_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'userId': 56, // {Integer} The user ID for the trial.
  'productId': 56, // {Integer} The product ID for the trial.
  'tokenId': tokenId_example, // {String} The PayPal token ID.
  'customerId': customerId_example, // {String} The PayPal customer ID.
  'type': type_example, // {String} The payment type.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalPaymentsStartTrialRequest':  // {CreateLearndashV1CommercePaypalPaymentsStartTrialRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalPaymentsStartTrial(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalPaymentsStartTrialExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var userId = 56;  // Integer | The user ID for the trial. (optional)  (default to null)
            var productId = 56;  // Integer | The product ID for the trial. (optional)  (default to null)
            var tokenId = tokenId_example;  // String | The PayPal token ID. (optional)  (default to null)
            var customerId = customerId_example;  // String | The PayPal customer ID. (optional)  (default to null)
            var type = type_example;  // String | The payment type. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalPaymentsStartTrialRequest = new CreateLearndashV1CommercePaypalPaymentsStartTrialRequest(); // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest |  (optional) 

            try {
                // Start a free trial
                create_learndash_v1_commerce_paypal_payments_start_trial_200_response result = apiInstance.createLearndashV1CommercePaypalPaymentsStartTrial(userId, productId, tokenId, customerId, type, isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.createLearndashV1CommercePaypalPaymentsStartTrial: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$userId = 56; // Integer | The user ID for the trial.
$productId = 56; // Integer | The product ID for the trial.
$tokenId = tokenId_example; // String | The PayPal token ID.
$customerId = customerId_example; // String | The PayPal customer ID.
$type = type_example; // String | The payment type.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalPaymentsStartTrialRequest = ; // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalPaymentsStartTrial($userId, $productId, $tokenId, $customerId, $type, $isSandbox, $createLearndashV1CommercePaypalPaymentsStartTrialRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsStartTrial: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $userId = 56; # Integer | The user ID for the trial.
my $productId = 56; # Integer | The product ID for the trial.
my $tokenId = tokenId_example; # String | The PayPal token ID.
my $customerId = customerId_example; # String | The PayPal customer ID.
my $type = type_example; # String | The payment type.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalPaymentsStartTrialRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalPaymentsStartTrialRequest->new(); # CreateLearndashV1CommercePaypalPaymentsStartTrialRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalPaymentsStartTrial(userId => $userId, productId => $productId, tokenId => $tokenId, customerId => $customerId, type => $type, isSandbox => $isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest => $createLearndashV1CommercePaypalPaymentsStartTrialRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsStartTrial: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
userId = 56 # Integer | The user ID for the trial. (optional) (default to null)
productId = 56 # Integer | The product ID for the trial. (optional) (default to null)
tokenId = tokenId_example # String | The PayPal token ID. (optional) (default to null)
customerId = customerId_example # String | The PayPal customer ID. (optional) (default to null)
type = type_example # String | The payment type. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalPaymentsStartTrialRequest =  # CreateLearndashV1CommercePaypalPaymentsStartTrialRequest |  (optional)

try:
    # Start a free trial
    api_response = api_instance.create_learndash_v1_commerce_paypal_payments_start_trial(userId=userId, productId=productId, tokenId=tokenId, customerId=customerId, type=type, isSandbox=isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest=createLearndashV1CommercePaypalPaymentsStartTrialRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->createLearndashV1CommercePaypalPaymentsStartTrial: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let userId = 56; // Integer
    let productId = 56; // Integer
    let tokenId = tokenId_example; // String
    let customerId = customerId_example; // String
    let type = type_example; // String
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalPaymentsStartTrialRequest = ; // CreateLearndashV1CommercePaypalPaymentsStartTrialRequest

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.createLearndashV1CommercePaypalPaymentsStartTrial(userId, productId, tokenId, customerId, type, isSandbox, createLearndashV1CommercePaypalPaymentsStartTrialRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
user_id
Integer
The user ID for the trial.
product_id
Integer
The product ID for the trial.
token_id
String
The PayPal token ID.
customer_id
String
The PayPal customer ID.
type
String
The payment type.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


List PayPal payment cards

Retrieves the list of saved payment cards for a user.


/learndash/v1/learndash/v1/commerce/paypal/payments/cards

Usage and SDK Samples

curl -X GET \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal/payments/cards?user_id=56&customer_id=customerId_example&is_sandbox=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalPaymentsApi;

import java.io.File;
import java.util.*;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer userId = 56; // Integer | User ID to retrieve cards for.
        String customerId = customerId_example; // String | PayPal customer ID to validate against the user.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.

        try {
            list_learndash_v1_commerce_paypal_payments_cards_200_response result = apiInstance.listLearndashV1CommercePaypalPaymentsCards(userId, customerId, isSandbox);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#listLearndashV1CommercePaypalPaymentsCards");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer userId = new Integer(); // Integer | User ID to retrieve cards for.
final String customerId = new String(); // String | PayPal customer ID to validate against the user.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.

try {
    final result = await api_instance.listLearndashV1CommercePaypalPaymentsCards(userId, customerId, isSandbox);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLearndashV1CommercePaypalPaymentsCards: $e\n');
}

import org.openapitools.client.api.CommercePaypalPaymentsApi;

public class CommercePaypalPaymentsApiExample {
    public static void main(String[] args) {
        CommercePaypalPaymentsApi apiInstance = new CommercePaypalPaymentsApi();
        Integer userId = 56; // Integer | User ID to retrieve cards for.
        String customerId = customerId_example; // String | PayPal customer ID to validate against the user.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.

        try {
            list_learndash_v1_commerce_paypal_payments_cards_200_response result = apiInstance.listLearndashV1CommercePaypalPaymentsCards(userId, customerId, isSandbox);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalPaymentsApi#listLearndashV1CommercePaypalPaymentsCards");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalPaymentsApi *apiInstance = [[CommercePaypalPaymentsApi alloc] init];
Integer *userId = 56; // User ID to retrieve cards for. (optional) (default to null)
String *customerId = customerId_example; // PayPal customer ID to validate against the user. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)

// List PayPal payment cards
[apiInstance listLearndashV1CommercePaypalPaymentsCardsWith:userId
    customerId:customerId
    isSandbox:isSandbox
              completionHandler: ^(list_learndash_v1_commerce_paypal_payments_cards_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalPaymentsApi()
var opts = {
  'userId': 56, // {Integer} User ID to retrieve cards for.
  'customerId': customerId_example, // {String} PayPal customer ID to validate against the user.
  'isSandbox': false // {Boolean} Whether to use the sandbox environment.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLearndashV1CommercePaypalPaymentsCards(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLearndashV1CommercePaypalPaymentsCardsExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalPaymentsApi();
            var userId = 56;  // Integer | User ID to retrieve cards for. (optional)  (default to null)
            var customerId = customerId_example;  // String | PayPal customer ID to validate against the user. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)

            try {
                // List PayPal payment cards
                list_learndash_v1_commerce_paypal_payments_cards_200_response result = apiInstance.listLearndashV1CommercePaypalPaymentsCards(userId, customerId, isSandbox);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalPaymentsApi.listLearndashV1CommercePaypalPaymentsCards: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalPaymentsApi();
$userId = 56; // Integer | User ID to retrieve cards for.
$customerId = customerId_example; // String | PayPal customer ID to validate against the user.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.

try {
    $result = $api_instance->listLearndashV1CommercePaypalPaymentsCards($userId, $customerId, $isSandbox);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalPaymentsApi->listLearndashV1CommercePaypalPaymentsCards: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalPaymentsApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalPaymentsApi->new();
my $userId = 56; # Integer | User ID to retrieve cards for.
my $customerId = customerId_example; # String | PayPal customer ID to validate against the user.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.

eval {
    my $result = $api_instance->listLearndashV1CommercePaypalPaymentsCards(userId => $userId, customerId => $customerId, isSandbox => $isSandbox);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalPaymentsApi->listLearndashV1CommercePaypalPaymentsCards: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalPaymentsApi()
userId = 56 # Integer | User ID to retrieve cards for. (optional) (default to null)
customerId = customerId_example # String | PayPal customer ID to validate against the user. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)

try:
    # List PayPal payment cards
    api_response = api_instance.list_learndash_v1_commerce_paypal_payments_cards(userId=userId, customerId=customerId, isSandbox=isSandbox)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalPaymentsApi->listLearndashV1CommercePaypalPaymentsCards: %s\n" % e)
extern crate CommercePaypalPaymentsApi;

pub fn main() {
    let userId = 56; // Integer
    let customerId = customerId_example; // String
    let isSandbox = false; // Boolean

    let mut context = CommercePaypalPaymentsApi::Context::default();
    let result = client.listLearndashV1CommercePaypalPaymentsCards(userId, customerId, isSandbox, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
user_id
Integer
User ID to retrieve cards for.
customer_id
String
PayPal customer ID to validate against the user.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Commerce Paypal Standard Migration

Create PayPal Payment Token for Migration

Creates a new PayPal payment token and schedules migration from PayPal Standard to PayPal Checkout.


/learndash/v1/learndash/v1/commerce/paypal-standard/migration/payment-token

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal-standard/migration/payment-token?token_id=tokenId_example&user_id=56&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalStandardMigrationApi;

import java.io.File;
import java.util.*;

public class CommercePaypalStandardMigrationApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalStandardMigrationApi apiInstance = new CommercePaypalStandardMigrationApi();
        String tokenId = tokenId_example; // String | The PayPal setup token ID.
        Integer userId = 56; // Integer | User ID to associate the payment token with.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_standard_migration_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId, userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalStandardMigrationApi#createLearndashV1CommercePaypalStandardMigrationPaymentToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tokenId = new String(); // String | The PayPal setup token ID.
final Integer userId = new Integer(); // Integer | User ID to associate the payment token with.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = new CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest(); // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId, userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalStandardMigrationPaymentToken: $e\n');
}

import org.openapitools.client.api.CommercePaypalStandardMigrationApi;

public class CommercePaypalStandardMigrationApiExample {
    public static void main(String[] args) {
        CommercePaypalStandardMigrationApi apiInstance = new CommercePaypalStandardMigrationApi();
        String tokenId = tokenId_example; // String | The PayPal setup token ID.
        Integer userId = 56; // Integer | User ID to associate the payment token with.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_standard_migration_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId, userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalStandardMigrationApi#createLearndashV1CommercePaypalStandardMigrationPaymentToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalStandardMigrationApi *apiInstance = [[CommercePaypalStandardMigrationApi alloc] init];
String *tokenId = tokenId_example; // The PayPal setup token ID. (optional) (default to null)
Integer *userId = 56; // User ID to associate the payment token with. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest *createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = ; //  (optional)

// Create PayPal Payment Token for Migration
[apiInstance createLearndashV1CommercePaypalStandardMigrationPaymentTokenWith:tokenId
    userId:userId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest:createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_standard_migration_payment_token_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalStandardMigrationApi()
var opts = {
  'tokenId': tokenId_example, // {String} The PayPal setup token ID.
  'userId': 56, // {Integer} User ID to associate the payment token with.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest':  // {CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalStandardMigrationPaymentToken(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalStandardMigrationPaymentTokenExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalStandardMigrationApi();
            var tokenId = tokenId_example;  // String | The PayPal setup token ID. (optional)  (default to null)
            var userId = 56;  // Integer | User ID to associate the payment token with. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = new CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest(); // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest |  (optional) 

            try {
                // Create PayPal Payment Token for Migration
                create_learndash_v1_commerce_paypal_standard_migration_payment_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId, userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalStandardMigrationApi.createLearndashV1CommercePaypalStandardMigrationPaymentToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalStandardMigrationApi();
$tokenId = tokenId_example; // String | The PayPal setup token ID.
$userId = 56; // Integer | User ID to associate the payment token with.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalStandardMigrationPaymentToken($tokenId, $userId, $isSandbox, $createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationPaymentToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalStandardMigrationApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalStandardMigrationApi->new();
my $tokenId = tokenId_example; # String | The PayPal setup token ID.
my $userId = 56; # Integer | User ID to associate the payment token with.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest->new(); # CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId => $tokenId, userId => $userId, isSandbox => $isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest => $createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationPaymentToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalStandardMigrationApi()
tokenId = tokenId_example # String | The PayPal setup token ID. (optional) (default to null)
userId = 56 # Integer | User ID to associate the payment token with. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest =  # CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest |  (optional)

try:
    # Create PayPal Payment Token for Migration
    api_response = api_instance.create_learndash_v1_commerce_paypal_standard_migration_payment_token(tokenId=tokenId, userId=userId, isSandbox=isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest=createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationPaymentToken: %s\n" % e)
extern crate CommercePaypalStandardMigrationApi;

pub fn main() {
    let tokenId = tokenId_example; // String
    let userId = 56; // Integer
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest

    let mut context = CommercePaypalStandardMigrationApi::Context::default();
    let result = client.createLearndashV1CommercePaypalStandardMigrationPaymentToken(tokenId, userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationPaymentTokenRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
token_id
String
The PayPal setup token ID.
user_id
Integer
User ID to associate the payment token with.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Create PayPal Setup Token for Migration

Creates a new PayPal setup token for migrating subscriptions from PayPal Standard to PayPal Checkout.


/learndash/v1/learndash/v1/commerce/paypal-standard/migration/setup-token

Usage and SDK Samples

curl -X POST \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/commerce/paypal-standard/migration/setup-token?user_id=56&is_sandbox=false" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommercePaypalStandardMigrationApi;

import java.io.File;
import java.util.*;

public class CommercePaypalStandardMigrationApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CommercePaypalStandardMigrationApi apiInstance = new CommercePaypalStandardMigrationApi();
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_standard_migration_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationSetupToken(userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalStandardMigrationApi#createLearndashV1CommercePaypalStandardMigrationSetupToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer userId = new Integer(); // Integer | User ID of the customer.
final Boolean isSandbox = new Boolean(); // Boolean | Whether to use the sandbox environment.
final CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = new CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest(); // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest | 

try {
    final result = await api_instance.createLearndashV1CommercePaypalStandardMigrationSetupToken(userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLearndashV1CommercePaypalStandardMigrationSetupToken: $e\n');
}

import org.openapitools.client.api.CommercePaypalStandardMigrationApi;

public class CommercePaypalStandardMigrationApiExample {
    public static void main(String[] args) {
        CommercePaypalStandardMigrationApi apiInstance = new CommercePaypalStandardMigrationApi();
        Integer userId = 56; // Integer | User ID of the customer.
        Boolean isSandbox = false; // Boolean | Whether to use the sandbox environment.
        CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest | 

        try {
            create_learndash_v1_commerce_paypal_standard_migration_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationSetupToken(userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommercePaypalStandardMigrationApi#createLearndashV1CommercePaypalStandardMigrationSetupToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
CommercePaypalStandardMigrationApi *apiInstance = [[CommercePaypalStandardMigrationApi alloc] init];
Integer *userId = 56; // User ID of the customer. (optional) (default to null)
Boolean *isSandbox = false; // Whether to use the sandbox environment. (optional) (default to false)
CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest *createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = ; //  (optional)

// Create PayPal Setup Token for Migration
[apiInstance createLearndashV1CommercePaypalStandardMigrationSetupTokenWith:userId
    isSandbox:isSandbox
    createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest:createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest
              completionHandler: ^(create_learndash_v1_commerce_paypal_standard_migration_setup_token_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CommercePaypalStandardMigrationApi()
var opts = {
  'userId': 56, // {Integer} User ID of the customer.
  'isSandbox': false, // {Boolean} Whether to use the sandbox environment.
  'createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest':  // {CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLearndashV1CommercePaypalStandardMigrationSetupToken(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLearndashV1CommercePaypalStandardMigrationSetupTokenExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CommercePaypalStandardMigrationApi();
            var userId = 56;  // Integer | User ID of the customer. (optional)  (default to null)
            var isSandbox = false;  // Boolean | Whether to use the sandbox environment. (optional)  (default to false)
            var createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = new CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest(); // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest |  (optional) 

            try {
                // Create PayPal Setup Token for Migration
                create_learndash_v1_commerce_paypal_standard_migration_setup_token_200_response result = apiInstance.createLearndashV1CommercePaypalStandardMigrationSetupToken(userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommercePaypalStandardMigrationApi.createLearndashV1CommercePaypalStandardMigrationSetupToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommercePaypalStandardMigrationApi();
$userId = 56; // Integer | User ID of the customer.
$isSandbox = false; // Boolean | Whether to use the sandbox environment.
$createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest | 

try {
    $result = $api_instance->createLearndashV1CommercePaypalStandardMigrationSetupToken($userId, $isSandbox, $createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationSetupToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommercePaypalStandardMigrationApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommercePaypalStandardMigrationApi->new();
my $userId = 56; # Integer | User ID of the customer.
my $isSandbox = false; # Boolean | Whether to use the sandbox environment.
my $createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = WWW::OPenAPIClient::Object::CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest->new(); # CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest | 

eval {
    my $result = $api_instance->createLearndashV1CommercePaypalStandardMigrationSetupToken(userId => $userId, isSandbox => $isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest => $createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationSetupToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CommercePaypalStandardMigrationApi()
userId = 56 # Integer | User ID of the customer. (optional) (default to null)
isSandbox = false # Boolean | Whether to use the sandbox environment. (optional) (default to false)
createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest =  # CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest |  (optional)

try:
    # Create PayPal Setup Token for Migration
    api_response = api_instance.create_learndash_v1_commerce_paypal_standard_migration_setup_token(userId=userId, isSandbox=isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest=createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommercePaypalStandardMigrationApi->createLearndashV1CommercePaypalStandardMigrationSetupToken: %s\n" % e)
extern crate CommercePaypalStandardMigrationApi;

pub fn main() {
    let userId = 56; // Integer
    let isSandbox = false; // Boolean
    let createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest = ; // CreateLearndashV1CommercePaypalStandardMigrationSetupTokenRequest

    let mut context = CommercePaypalStandardMigrationApi::Context::default();
    let result = client.createLearndashV1CommercePaypalStandardMigrationSetupToken(userId, isSandbox, createLearndashV1CommercePaypalStandardMigrationSetupTokenRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body
Query parameters
Name Description
user_id
Integer
User ID of the customer.
is_sandbox
Boolean
Whether to use the sandbox environment.

Responses


Course Groups

Update associated groups for a course

Adds groups to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseGroupsApi;

import java.io.File;
import java.util.*;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#createLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2CoursesGroupsById: $e\n');
}

import org.openapitools.client.api.CourseGroupsApi;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#createLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseGroupsApi *apiInstance = [[CourseGroupsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesGroupsByIdRequest *updateLdlmsV2CoursesGroupsByIdRequest = ; //  (optional)

// Update associated groups for a course
[apiInstance createLdlmsV2CoursesGroupsByIdWith:id
    updateLdlmsV2CoursesGroupsByIdRequest:updateLdlmsV2CoursesGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_courses_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseGroupsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesGroupsByIdRequest':  // {UpdateLdlmsV2CoursesGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2CoursesGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2CoursesGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseGroupsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a course
                array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseGroupsApi.createLdlmsV2CoursesGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseGroupsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2CoursesGroupsById($id, $updateLdlmsV2CoursesGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseGroupsApi->createLdlmsV2CoursesGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseGroupsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesGroupsByIdRequest->new(); # UpdateLdlmsV2CoursesGroupsByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2CoursesGroupsById(id => $id, updateLdlmsV2CoursesGroupsByIdRequest => $updateLdlmsV2CoursesGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseGroupsApi->createLdlmsV2CoursesGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseGroupsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesGroupsByIdRequest =  # UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a course
    api_response = api_instance.create_ldlms_v2_courses_groups_by_id(id, updateLdlmsV2CoursesGroupsByIdRequest=updateLdlmsV2CoursesGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseGroupsApi->createLdlmsV2CoursesGroupsById: %s\n" % e)
extern crate CourseGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest

    let mut context = CourseGroupsApi::Context::default();
    let result = client.createLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Delete associated groups for a course

Removes groups from a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups?group_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseGroupsApi;

import java.io.File;
import java.util.*;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        array[Integer] groupIds = ; // array[Integer] | Group IDs to remove from Course.

        try {
            array[delete_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2CoursesGroupsById(id, groupIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#deleteLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final array[Integer] groupIds = new array[Integer](); // array[Integer] | Group IDs to remove from Course.

try {
    final result = await api_instance.deleteLdlmsV2CoursesGroupsById(id, groupIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2CoursesGroupsById: $e\n');
}

import org.openapitools.client.api.CourseGroupsApi;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        array[Integer] groupIds = ; // array[Integer] | Group IDs to remove from Course.

        try {
            array[delete_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2CoursesGroupsById(id, groupIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#deleteLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseGroupsApi *apiInstance = [[CourseGroupsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
array[Integer] *groupIds = ; // Group IDs to remove from Course. (optional) (default to null)

// Delete associated groups for a course
[apiInstance deleteLdlmsV2CoursesGroupsByIdWith:id
    groupIds:groupIds
              completionHandler: ^(array[delete_ldlms_v2_courses_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseGroupsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'groupIds':  // {array[Integer]} Group IDs to remove from Course.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2CoursesGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2CoursesGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseGroupsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var groupIds = new array[Integer](); // array[Integer] | Group IDs to remove from Course. (optional)  (default to null)

            try {
                // Delete associated groups for a course
                array[delete_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2CoursesGroupsById(id, groupIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseGroupsApi.deleteLdlmsV2CoursesGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseGroupsApi();
$id = 56; // Integer | Course ID
$groupIds = ; // array[Integer] | Group IDs to remove from Course.

try {
    $result = $api_instance->deleteLdlmsV2CoursesGroupsById($id, $groupIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseGroupsApi->deleteLdlmsV2CoursesGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseGroupsApi->new();
my $id = 56; # Integer | Course ID
my $groupIds = []; # array[Integer] | Group IDs to remove from Course.

eval {
    my $result = $api_instance->deleteLdlmsV2CoursesGroupsById(id => $id, groupIds => $groupIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseGroupsApi->deleteLdlmsV2CoursesGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseGroupsApi()
id = 56 # Integer | Course ID (default to null)
groupIds =  # array[Integer] | Group IDs to remove from Course. (optional) (default to null)

try:
    # Delete associated groups for a course
    api_response = api_instance.delete_ldlms_v2_courses_groups_by_id(id, groupIds=groupIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseGroupsApi->deleteLdlmsV2CoursesGroupsById: %s\n" % e)
extern crate CourseGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let groupIds = ; // array[Integer]

    let mut context = CourseGroupsApi::Context::default();
    let result = client.deleteLdlmsV2CoursesGroupsById(id, groupIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Query parameters
Name Description
group_ids
array[Integer]
Group IDs to remove from Course.

Responses


Get associated groups for a course

Retrieves the groups for a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&parent=[]&parent_exclude=[]&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&categories=Object&categories_exclude=Object&tags=Object&tags_exclude=Object&ld_group_category=Object&ld_group_category_exclude=Object&ld_group_tag=Object&ld_group_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseGroupsApi;

import java.io.File;
import java.util.*;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2CoursesGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#getLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[Integer] parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs.
final array[Integer] parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
final Object categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
final Object tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
final Object tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
final Object ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
final Object ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    final result = await api_instance.getLdlmsV2CoursesGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2CoursesGroupsById: $e\n');
}

import org.openapitools.client.api.CourseGroupsApi;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2CoursesGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#getLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseGroupsApi *apiInstance = [[CourseGroupsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[Integer] *parent = []; // Limit result set to items with particular parent IDs. (optional) (default to [])
array[Integer] *parentExclude = []; // Limit result set to all items except those of a particular parent ID. (optional) (default to [])
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *categories = Object; // Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *categoriesExclude = Object; // Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *tags = Object; // Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *tagsExclude = Object; // Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *ldGroupCategory = Object; // Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupTag = Object; // Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
Object *ldGroupTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

// Get associated groups for a course
[apiInstance getLdlmsV2CoursesGroupsByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    parent:parent
    parentExclude:parentExclude
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    categories:categories
    categoriesExclude:categoriesExclude
    tags:tags
    tagsExclude:tagsExclude
    ldGroupCategory:ldGroupCategory
    ldGroupCategoryExclude:ldGroupCategoryExclude
    ldGroupTag:ldGroupTag
    ldGroupTagExclude:ldGroupTagExclude
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseGroupsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'parent': [], // {array[Integer]} Limit result set to items with particular parent IDs.
  'parentExclude': [], // {array[Integer]} Limit result set to all items except those of a particular parent ID.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'categories': Object, // {Object} Limit result set to items with specific terms assigned in the categories taxonomy.
  'categoriesExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the categories taxonomy.
  'tags': Object, // {Object} Limit result set to items with specific terms assigned in the tags taxonomy.
  'tagsExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the tags taxonomy.
  'ldGroupCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
  'ldGroupTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2CoursesGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2CoursesGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseGroupsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs. (optional)  (default to [])
            var parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID. (optional)  (default to [])
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)
            var ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)

            try {
                // Get associated groups for a course
                array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2CoursesGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseGroupsApi.getLdlmsV2CoursesGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseGroupsApi();
$id = 56; // Integer | Course ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
$parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
$categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
$tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
$tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
$ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
$ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
$ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
$ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    $result = $api_instance->getLdlmsV2CoursesGroupsById($id, $context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $searchSemantics, $offset, $order, $orderby, $parent, $parentExclude, $searchColumns, $slug, $status, $taxRelation, $categories, $categoriesExclude, $tags, $tagsExclude, $ldGroupCategory, $ldGroupCategoryExclude, $ldGroupTag, $ldGroupTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseGroupsApi->getLdlmsV2CoursesGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseGroupsApi->new();
my $id = 56; # Integer | Course ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $parent = [[]]; # array[Integer] | Limit result set to items with particular parent IDs.
my $parentExclude = [[]]; # array[Integer] | Limit result set to all items except those of a particular parent ID.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $categories = Object; # Object | Limit result set to items with specific terms assigned in the categories taxonomy.
my $categoriesExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
my $tags = Object; # Object | Limit result set to items with specific terms assigned in the tags taxonomy.
my $tagsExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
my $ldGroupCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
my $ldGroupTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

eval {
    my $result = $api_instance->getLdlmsV2CoursesGroupsById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, parent => $parent, parentExclude => $parentExclude, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, categories => $categories, categoriesExclude => $categoriesExclude, tags => $tags, tagsExclude => $tagsExclude, ldGroupCategory => $ldGroupCategory, ldGroupCategoryExclude => $ldGroupCategoryExclude, ldGroupTag => $ldGroupTag, ldGroupTagExclude => $ldGroupTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseGroupsApi->getLdlmsV2CoursesGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseGroupsApi()
id = 56 # Integer | Course ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
parent = [] # array[Integer] | Limit result set to items with particular parent IDs. (optional) (default to [])
parentExclude = [] # array[Integer] | Limit result set to all items except those of a particular parent ID. (optional) (default to [])
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
categories = Object # Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
categoriesExclude = Object # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
tags = Object # Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
tagsExclude = Object # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
ldGroupCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupTag = Object # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
ldGroupTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

try:
    # Get associated groups for a course
    api_response = api_instance.get_ldlms_v2_courses_groups_by_id(id, context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, parent=parent, parentExclude=parentExclude, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, categories=categories, categoriesExclude=categoriesExclude, tags=tags, tagsExclude=tagsExclude, ldGroupCategory=ldGroupCategory, ldGroupCategoryExclude=ldGroupCategoryExclude, ldGroupTag=ldGroupTag, ldGroupTagExclude=ldGroupTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseGroupsApi->getLdlmsV2CoursesGroupsById: %s\n" % e)
extern crate CourseGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let parent = []; // array[Integer]
    let parentExclude = []; // array[Integer]
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let categories = Object; // Object
    let categoriesExclude = Object; // Object
    let tags = Object; // Object
    let tagsExclude = Object; // Object
    let ldGroupCategory = Object; // Object
    let ldGroupCategoryExclude = Object; // Object
    let ldGroupTag = Object; // Object
    let ldGroupTagExclude = Object; // Object

    let mut context = CourseGroupsApi::Context::default();
    let result = client.getLdlmsV2CoursesGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
parent
array[Integer]
Limit result set to items with particular parent IDs.
parent_exclude
array[Integer]
Limit result set to all items except those of a particular parent ID.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
categories
Object
Limit result set to items with specific terms assigned in the categories taxonomy.
categories_exclude
Object
Limit result set to items except those with specific terms assigned in the categories taxonomy.
tags
Object
Limit result set to items with specific terms assigned in the tags taxonomy.
tags_exclude
Object
Limit result set to items except those with specific terms assigned in the tags taxonomy.
ld_group_category
Object
Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
ld_group_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
ld_group_tag
Object
Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
ld_group_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

Responses


Update associated groups for a course

Adds groups to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseGroupsApi;

import java.io.File;
import java.util.*;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#patchLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2CoursesGroupsById: $e\n');
}

import org.openapitools.client.api.CourseGroupsApi;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#patchLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseGroupsApi *apiInstance = [[CourseGroupsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesGroupsByIdRequest *updateLdlmsV2CoursesGroupsByIdRequest = ; //  (optional)

// Update associated groups for a course
[apiInstance patchLdlmsV2CoursesGroupsByIdWith:id
    updateLdlmsV2CoursesGroupsByIdRequest:updateLdlmsV2CoursesGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_courses_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseGroupsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesGroupsByIdRequest':  // {UpdateLdlmsV2CoursesGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2CoursesGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2CoursesGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseGroupsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a course
                array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseGroupsApi.patchLdlmsV2CoursesGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseGroupsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2CoursesGroupsById($id, $updateLdlmsV2CoursesGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseGroupsApi->patchLdlmsV2CoursesGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseGroupsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesGroupsByIdRequest->new(); # UpdateLdlmsV2CoursesGroupsByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2CoursesGroupsById(id => $id, updateLdlmsV2CoursesGroupsByIdRequest => $updateLdlmsV2CoursesGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseGroupsApi->patchLdlmsV2CoursesGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseGroupsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesGroupsByIdRequest =  # UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a course
    api_response = api_instance.patch_ldlms_v2_courses_groups_by_id(id, updateLdlmsV2CoursesGroupsByIdRequest=updateLdlmsV2CoursesGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseGroupsApi->patchLdlmsV2CoursesGroupsById: %s\n" % e)
extern crate CourseGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest

    let mut context = CourseGroupsApi::Context::default();
    let result = client.patchLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Update associated groups for a course

Adds groups to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseGroupsApi;

import java.io.File;
import java.util.*;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#updateLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2CoursesGroupsById: $e\n');
}

import org.openapitools.client.api.CourseGroupsApi;

public class CourseGroupsApiExample {
    public static void main(String[] args) {
        CourseGroupsApi apiInstance = new CourseGroupsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesGroupsByIdRequest updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseGroupsApi#updateLdlmsV2CoursesGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseGroupsApi *apiInstance = [[CourseGroupsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesGroupsByIdRequest *updateLdlmsV2CoursesGroupsByIdRequest = ; //  (optional)

// Update associated groups for a course
[apiInstance updateLdlmsV2CoursesGroupsByIdWith:id
    updateLdlmsV2CoursesGroupsByIdRequest:updateLdlmsV2CoursesGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_courses_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseGroupsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesGroupsByIdRequest':  // {UpdateLdlmsV2CoursesGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2CoursesGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2CoursesGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseGroupsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesGroupsByIdRequest = new UpdateLdlmsV2CoursesGroupsByIdRequest(); // UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a course
                array[update_ldlms_v2_courses_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseGroupsApi.updateLdlmsV2CoursesGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseGroupsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2CoursesGroupsById($id, $updateLdlmsV2CoursesGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseGroupsApi->updateLdlmsV2CoursesGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseGroupsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesGroupsByIdRequest->new(); # UpdateLdlmsV2CoursesGroupsByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2CoursesGroupsById(id => $id, updateLdlmsV2CoursesGroupsByIdRequest => $updateLdlmsV2CoursesGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseGroupsApi->updateLdlmsV2CoursesGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseGroupsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesGroupsByIdRequest =  # UpdateLdlmsV2CoursesGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a course
    api_response = api_instance.update_ldlms_v2_courses_groups_by_id(id, updateLdlmsV2CoursesGroupsByIdRequest=updateLdlmsV2CoursesGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseGroupsApi->updateLdlmsV2CoursesGroupsById: %s\n" % e)
extern crate CourseGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesGroupsByIdRequest = ; // UpdateLdlmsV2CoursesGroupsByIdRequest

    let mut context = CourseGroupsApi::Context::default();
    let result = client.updateLdlmsV2CoursesGroupsById(id, updateLdlmsV2CoursesGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Course Prerequisites

Get associated prerequisites for a course

Retrieves the course prerequisites for a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/prerequisites

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/prerequisites?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_course_category=Object&ld_course_category_exclude=Object&ld_course_tag=Object&ld_course_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursePrerequisitesApi;

import java.io.File;
import java.util.*;

public class CoursePrerequisitesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursePrerequisitesApi apiInstance = new CoursePrerequisitesApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2CoursesPrerequisitesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursePrerequisitesApi#getLdlmsV2CoursesPrerequisitesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
final Object ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    final result = await api_instance.getLdlmsV2CoursesPrerequisitesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2CoursesPrerequisitesById: $e\n');
}

import org.openapitools.client.api.CoursePrerequisitesApi;

public class CoursePrerequisitesApiExample {
    public static void main(String[] args) {
        CoursePrerequisitesApi apiInstance = new CoursePrerequisitesApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2CoursesPrerequisitesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursePrerequisitesApi#getLdlmsV2CoursesPrerequisitesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursePrerequisitesApi *apiInstance = [[CoursePrerequisitesApi alloc] init];
Integer *id = 56; // Course ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldCourseCategory = Object; // Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseTag = Object; // Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
Object *ldCourseTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

// Get associated prerequisites for a course
[apiInstance getLdlmsV2CoursesPrerequisitesByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldCourseCategory:ldCourseCategory
    ldCourseCategoryExclude:ldCourseCategoryExclude
    ldCourseTag:ldCourseTag
    ldCourseTagExclude:ldCourseTagExclude
              completionHandler: ^(array[LDLMS_v2_Course] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursePrerequisitesApi()
var id = 56; // {Integer} Course ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldCourseCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
  'ldCourseTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2CoursesPrerequisitesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2CoursesPrerequisitesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursePrerequisitesApi();
            var id = 56;  // Integer | Course ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)
            var ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)

            try {
                // Get associated prerequisites for a course
                array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2CoursesPrerequisitesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursePrerequisitesApi.getLdlmsV2CoursesPrerequisitesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursePrerequisitesApi();
$id = 56; // Integer | Course ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
$ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
$ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
$ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    $result = $api_instance->getLdlmsV2CoursesPrerequisitesById($id, $context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldCourseCategory, $ldCourseCategoryExclude, $ldCourseTag, $ldCourseTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursePrerequisitesApi->getLdlmsV2CoursesPrerequisitesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursePrerequisitesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursePrerequisitesApi->new();
my $id = 56; # Integer | Course ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldCourseCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
my $ldCourseTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

eval {
    my $result = $api_instance->getLdlmsV2CoursesPrerequisitesById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldCourseCategory => $ldCourseCategory, ldCourseCategoryExclude => $ldCourseCategoryExclude, ldCourseTag => $ldCourseTag, ldCourseTagExclude => $ldCourseTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursePrerequisitesApi->getLdlmsV2CoursesPrerequisitesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursePrerequisitesApi()
id = 56 # Integer | Course ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldCourseCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseTag = Object # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
ldCourseTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

try:
    # Get associated prerequisites for a course
    api_response = api_instance.get_ldlms_v2_courses_prerequisites_by_id(id, context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldCourseCategory=ldCourseCategory, ldCourseCategoryExclude=ldCourseCategoryExclude, ldCourseTag=ldCourseTag, ldCourseTagExclude=ldCourseTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursePrerequisitesApi->getLdlmsV2CoursesPrerequisitesById: %s\n" % e)
extern crate CoursePrerequisitesApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldCourseCategory = Object; // Object
    let ldCourseCategoryExclude = Object; // Object
    let ldCourseTag = Object; // Object
    let ldCourseTagExclude = Object; // Object

    let mut context = CoursePrerequisitesApi::Context::default();
    let result = client.getLdlmsV2CoursesPrerequisitesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_course_category
Object
Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
ld_course_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
ld_course_tag
Object
Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
ld_course_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

Responses


Course Steps

Set the course structure: assign and organize lessons, topics, and quizzes

Establishes the complete course hierarchy by assigning lessons, topics, and quizzes with their parent-child relationships and ordering. Must be called after creating course content to make the course functional.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseStepsApi;

import java.io.File;
import java.util.*;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.createLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#createLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2CoursesStepsById: $e\n');
}

import org.openapitools.client.api.CourseStepsApi;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.createLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#createLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseStepsApi *apiInstance = [[CourseStepsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesStepsByIdRequest *updateLdlmsV2CoursesStepsByIdRequest = ; //  (optional)

// Set the course structure: assign and organize lessons, topics, and quizzes
[apiInstance createLdlmsV2CoursesStepsByIdWith:id
    updateLdlmsV2CoursesStepsByIdRequest:updateLdlmsV2CoursesStepsByIdRequest
              completionHandler: ^(update_ldlms_v2_courses_steps_by_id_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseStepsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesStepsByIdRequest':  // {UpdateLdlmsV2CoursesStepsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2CoursesStepsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2CoursesStepsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseStepsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest |  (optional) 

            try {
                // Set the course structure: assign and organize lessons, topics, and quizzes
                update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.createLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseStepsApi.createLdlmsV2CoursesStepsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseStepsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2CoursesStepsById($id, $updateLdlmsV2CoursesStepsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseStepsApi->createLdlmsV2CoursesStepsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseStepsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseStepsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesStepsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesStepsByIdRequest->new(); # UpdateLdlmsV2CoursesStepsByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2CoursesStepsById(id => $id, updateLdlmsV2CoursesStepsByIdRequest => $updateLdlmsV2CoursesStepsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseStepsApi->createLdlmsV2CoursesStepsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseStepsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesStepsByIdRequest =  # UpdateLdlmsV2CoursesStepsByIdRequest |  (optional)

try:
    # Set the course structure: assign and organize lessons, topics, and quizzes
    api_response = api_instance.create_ldlms_v2_courses_steps_by_id(id, updateLdlmsV2CoursesStepsByIdRequest=updateLdlmsV2CoursesStepsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseStepsApi->createLdlmsV2CoursesStepsById: %s\n" % e)
extern crate CourseStepsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest

    let mut context = CourseStepsApi::Context::default();
    let result = client.createLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Get course structure: returns lesson/topic/quiz hierarchy and order

Returns the current course structure showing the hierarchy and ordering of lessons, topics, and quizzes. Parameter 'type' controls response format (hierarchy, flat lists, sequential order, etc).


/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps?context=view&type=all"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseStepsApi;

import java.io.File;
import java.util.*;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        String type = all; // String | Filter returned results by step type.

        try {
            get_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.getLdlmsV2CoursesStepsById(id, context, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#getLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final String type = new String(); // String | Filter returned results by step type.

try {
    final result = await api_instance.getLdlmsV2CoursesStepsById(id, context, type);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2CoursesStepsById: $e\n');
}

import org.openapitools.client.api.CourseStepsApi;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        String type = all; // String | Filter returned results by step type.

        try {
            get_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.getLdlmsV2CoursesStepsById(id, context, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#getLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseStepsApi *apiInstance = [[CourseStepsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
String *type = all; // Filter returned results by step type. (optional) (default to all)

// Get course structure: returns lesson/topic/quiz hierarchy and order
[apiInstance getLdlmsV2CoursesStepsByIdWith:id
    context:context
    type:type
              completionHandler: ^(get_ldlms_v2_courses_steps_by_id_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseStepsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'type': all // {String} Filter returned results by step type.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2CoursesStepsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2CoursesStepsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseStepsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var type = all;  // String | Filter returned results by step type. (optional)  (default to all)

            try {
                // Get course structure: returns lesson/topic/quiz hierarchy and order
                get_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.getLdlmsV2CoursesStepsById(id, context, type);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseStepsApi.getLdlmsV2CoursesStepsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseStepsApi();
$id = 56; // Integer | Course ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$type = all; // String | Filter returned results by step type.

try {
    $result = $api_instance->getLdlmsV2CoursesStepsById($id, $context, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseStepsApi->getLdlmsV2CoursesStepsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseStepsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseStepsApi->new();
my $id = 56; # Integer | Course ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $type = all; # String | Filter returned results by step type.

eval {
    my $result = $api_instance->getLdlmsV2CoursesStepsById(id => $id, context => $context, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseStepsApi->getLdlmsV2CoursesStepsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseStepsApi()
id = 56 # Integer | Course ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
type = all # String | Filter returned results by step type. (optional) (default to all)

try:
    # Get course structure: returns lesson/topic/quiz hierarchy and order
    api_response = api_instance.get_ldlms_v2_courses_steps_by_id(id, context=context, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseStepsApi->getLdlmsV2CoursesStepsById: %s\n" % e)
extern crate CourseStepsApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let type = all; // String

    let mut context = CourseStepsApi::Context::default();
    let result = client.getLdlmsV2CoursesStepsById(id, context, type, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
type
String
Filter returned results by step type.

Responses


Update associated steps for a course

Partially updates the course step association for an existing course. Only the provided fields will be updated, leaving other fields unchanged. Use this to assign lessons, topics and quizzes to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseStepsApi;

import java.io.File;
import java.util.*;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.patchLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#patchLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2CoursesStepsById: $e\n');
}

import org.openapitools.client.api.CourseStepsApi;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.patchLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#patchLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseStepsApi *apiInstance = [[CourseStepsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesStepsByIdRequest *updateLdlmsV2CoursesStepsByIdRequest = ; //  (optional)

// Update associated steps for a course
[apiInstance patchLdlmsV2CoursesStepsByIdWith:id
    updateLdlmsV2CoursesStepsByIdRequest:updateLdlmsV2CoursesStepsByIdRequest
              completionHandler: ^(update_ldlms_v2_courses_steps_by_id_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseStepsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesStepsByIdRequest':  // {UpdateLdlmsV2CoursesStepsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2CoursesStepsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2CoursesStepsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseStepsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest |  (optional) 

            try {
                // Update associated steps for a course
                update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.patchLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseStepsApi.patchLdlmsV2CoursesStepsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseStepsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2CoursesStepsById($id, $updateLdlmsV2CoursesStepsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseStepsApi->patchLdlmsV2CoursesStepsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseStepsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseStepsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesStepsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesStepsByIdRequest->new(); # UpdateLdlmsV2CoursesStepsByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2CoursesStepsById(id => $id, updateLdlmsV2CoursesStepsByIdRequest => $updateLdlmsV2CoursesStepsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseStepsApi->patchLdlmsV2CoursesStepsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseStepsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesStepsByIdRequest =  # UpdateLdlmsV2CoursesStepsByIdRequest |  (optional)

try:
    # Update associated steps for a course
    api_response = api_instance.patch_ldlms_v2_courses_steps_by_id(id, updateLdlmsV2CoursesStepsByIdRequest=updateLdlmsV2CoursesStepsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseStepsApi->patchLdlmsV2CoursesStepsById: %s\n" % e)
extern crate CourseStepsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest

    let mut context = CourseStepsApi::Context::default();
    let result = client.patchLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Update associated steps for a course

Updates the course step association for an existing course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/steps" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseStepsApi;

import java.io.File;
import java.util.*;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.updateLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#updateLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2CoursesStepsById: $e\n');
}

import org.openapitools.client.api.CourseStepsApi;

public class CourseStepsApiExample {
    public static void main(String[] args) {
        CourseStepsApi apiInstance = new CourseStepsApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesStepsByIdRequest updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

        try {
            update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.updateLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseStepsApi#updateLdlmsV2CoursesStepsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseStepsApi *apiInstance = [[CourseStepsApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesStepsByIdRequest *updateLdlmsV2CoursesStepsByIdRequest = ; //  (optional)

// Update associated steps for a course
[apiInstance updateLdlmsV2CoursesStepsByIdWith:id
    updateLdlmsV2CoursesStepsByIdRequest:updateLdlmsV2CoursesStepsByIdRequest
              completionHandler: ^(update_ldlms_v2_courses_steps_by_id_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseStepsApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesStepsByIdRequest':  // {UpdateLdlmsV2CoursesStepsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2CoursesStepsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2CoursesStepsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseStepsApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesStepsByIdRequest = new UpdateLdlmsV2CoursesStepsByIdRequest(); // UpdateLdlmsV2CoursesStepsByIdRequest |  (optional) 

            try {
                // Update associated steps for a course
                update_ldlms_v2_courses_steps_by_id_200_response result = apiInstance.updateLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseStepsApi.updateLdlmsV2CoursesStepsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseStepsApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2CoursesStepsById($id, $updateLdlmsV2CoursesStepsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseStepsApi->updateLdlmsV2CoursesStepsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseStepsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseStepsApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesStepsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesStepsByIdRequest->new(); # UpdateLdlmsV2CoursesStepsByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2CoursesStepsById(id => $id, updateLdlmsV2CoursesStepsByIdRequest => $updateLdlmsV2CoursesStepsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseStepsApi->updateLdlmsV2CoursesStepsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseStepsApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesStepsByIdRequest =  # UpdateLdlmsV2CoursesStepsByIdRequest |  (optional)

try:
    # Update associated steps for a course
    api_response = api_instance.update_ldlms_v2_courses_steps_by_id(id, updateLdlmsV2CoursesStepsByIdRequest=updateLdlmsV2CoursesStepsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseStepsApi->updateLdlmsV2CoursesStepsById: %s\n" % e)
extern crate CourseStepsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesStepsByIdRequest = ; // UpdateLdlmsV2CoursesStepsByIdRequest

    let mut context = CourseStepsApi::Context::default();
    let result = client.updateLdlmsV2CoursesStepsById(id, updateLdlmsV2CoursesStepsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Course Users

Update associated users for a course

Adds users to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/users

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseUsersApi;

import java.io.File;
import java.util.*;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.createLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#createLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID.
final UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2CoursesUsersById: $e\n');
}

import org.openapitools.client.api.CourseUsersApi;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.createLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#createLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseUsersApi *apiInstance = [[CourseUsersApi alloc] init];
Integer *id = 56; // Course ID. (default to null)
UpdateLdlmsV2CoursesUsersByIdRequest *updateLdlmsV2CoursesUsersByIdRequest = ; //  (optional)

// Update associated users for a course
[apiInstance createLdlmsV2CoursesUsersByIdWith:id
    updateLdlmsV2CoursesUsersByIdRequest:updateLdlmsV2CoursesUsersByIdRequest
              completionHandler: ^(array[oas_any_type_not_mapped] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseUsersApi()
var id = 56; // {Integer} Course ID.
var opts = {
  'updateLdlmsV2CoursesUsersByIdRequest':  // {UpdateLdlmsV2CoursesUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2CoursesUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2CoursesUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseUsersApi();
            var id = 56;  // Integer | Course ID. (default to null)
            var updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a course
                array[oas_any_type_not_mapped] result = apiInstance.createLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseUsersApi.createLdlmsV2CoursesUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseUsersApi();
$id = 56; // Integer | Course ID.
$updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2CoursesUsersById($id, $updateLdlmsV2CoursesUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseUsersApi->createLdlmsV2CoursesUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseUsersApi->new();
my $id = 56; # Integer | Course ID.
my $updateLdlmsV2CoursesUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesUsersByIdRequest->new(); # UpdateLdlmsV2CoursesUsersByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2CoursesUsersById(id => $id, updateLdlmsV2CoursesUsersByIdRequest => $updateLdlmsV2CoursesUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseUsersApi->createLdlmsV2CoursesUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseUsersApi()
id = 56 # Integer | Course ID. (default to null)
updateLdlmsV2CoursesUsersByIdRequest =  # UpdateLdlmsV2CoursesUsersByIdRequest |  (optional)

try:
    # Update associated users for a course
    api_response = api_instance.create_ldlms_v2_courses_users_by_id(id, updateLdlmsV2CoursesUsersByIdRequest=updateLdlmsV2CoursesUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseUsersApi->createLdlmsV2CoursesUsersById: %s\n" % e)
extern crate CourseUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest

    let mut context = CourseUsersApi::Context::default();
    let result = client.createLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID.
Required
Request body

Responses


Delete associated users for a course

Removes users from a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/users

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/users?user_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseUsersApi;

import java.io.File;
import java.util.*;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        array[Integer] userIds = ; // array[Integer] | User IDs to remove from Course. Limit 50 per request.

        try {
            array[oas_any_type_not_mapped] result = apiInstance.deleteLdlmsV2CoursesUsersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#deleteLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID.
final array[Integer] userIds = new array[Integer](); // array[Integer] | User IDs to remove from Course. Limit 50 per request.

try {
    final result = await api_instance.deleteLdlmsV2CoursesUsersById(id, userIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2CoursesUsersById: $e\n');
}

import org.openapitools.client.api.CourseUsersApi;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        array[Integer] userIds = ; // array[Integer] | User IDs to remove from Course. Limit 50 per request.

        try {
            array[oas_any_type_not_mapped] result = apiInstance.deleteLdlmsV2CoursesUsersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#deleteLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseUsersApi *apiInstance = [[CourseUsersApi alloc] init];
Integer *id = 56; // Course ID. (default to null)
array[Integer] *userIds = ; // User IDs to remove from Course. Limit 50 per request. (optional) (default to null)

// Delete associated users for a course
[apiInstance deleteLdlmsV2CoursesUsersByIdWith:id
    userIds:userIds
              completionHandler: ^(array[oas_any_type_not_mapped] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseUsersApi()
var id = 56; // {Integer} Course ID.
var opts = {
  'userIds':  // {array[Integer]} User IDs to remove from Course. Limit 50 per request.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2CoursesUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2CoursesUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseUsersApi();
            var id = 56;  // Integer | Course ID. (default to null)
            var userIds = new array[Integer](); // array[Integer] | User IDs to remove from Course. Limit 50 per request. (optional)  (default to null)

            try {
                // Delete associated users for a course
                array[oas_any_type_not_mapped] result = apiInstance.deleteLdlmsV2CoursesUsersById(id, userIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseUsersApi.deleteLdlmsV2CoursesUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseUsersApi();
$id = 56; // Integer | Course ID.
$userIds = ; // array[Integer] | User IDs to remove from Course. Limit 50 per request.

try {
    $result = $api_instance->deleteLdlmsV2CoursesUsersById($id, $userIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseUsersApi->deleteLdlmsV2CoursesUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseUsersApi->new();
my $id = 56; # Integer | Course ID.
my $userIds = []; # array[Integer] | User IDs to remove from Course. Limit 50 per request.

eval {
    my $result = $api_instance->deleteLdlmsV2CoursesUsersById(id => $id, userIds => $userIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseUsersApi->deleteLdlmsV2CoursesUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseUsersApi()
id = 56 # Integer | Course ID. (default to null)
userIds =  # array[Integer] | User IDs to remove from Course. Limit 50 per request. (optional) (default to null)

try:
    # Delete associated users for a course
    api_response = api_instance.delete_ldlms_v2_courses_users_by_id(id, userIds=userIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseUsersApi->deleteLdlmsV2CoursesUsersById: %s\n" % e)
extern crate CourseUsersApi;

pub fn main() {
    let id = 56; // Integer
    let userIds = ; // array[Integer]

    let mut context = CourseUsersApi::Context::default();
    let result = client.deleteLdlmsV2CoursesUsersById(id, userIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID.
Required
Query parameters
Name Description
user_ids
array[Integer]
User IDs to remove from Course. Limit 50 per request.

Responses


Get associated users for a course

Retrieves the users for a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/users

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/users?context=view&page=1&per_page=10&search=search_example&exclude=[]&include=[]&offset=56&order=asc&orderby=name&slug=&roles=&capabilities=&who=who_example&has_published_posts=&search_columns=[]"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseUsersApi;

import java.io.File;
import java.util.*;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2CoursesUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#getLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID.
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by user attribute.
final array[String] slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs.
final array[String] roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
final array[String] capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
final String who = new String(); // String | Limit result set to users who are considered authors.
final array[String] hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.

try {
    final result = await api_instance.getLdlmsV2CoursesUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2CoursesUsersById: $e\n');
}

import org.openapitools.client.api.CourseUsersApi;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2CoursesUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#getLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseUsersApi *apiInstance = [[CourseUsersApi alloc] init];
Integer *id = 56; // Course ID. (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = name; // Sort collection by user attribute. (optional) (default to name)
array[String] *slug = ; // Limit result set to users with one or more specific slugs. (optional) (default to null)
array[String] *roles = ; // Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
array[String] *capabilities = ; // Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
String *who = who_example; // Limit result set to users who are considered authors. (optional) (default to null)
array[String] *hasPublishedPosts = ; // Limit result set to users who have published posts. (optional) (default to null)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])

// Get associated users for a course
[apiInstance getLdlmsV2CoursesUsersByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    exclude:exclude
    include:include
    offset:offset
    order:order
    orderby:orderby
    slug:slug
    roles:roles
    capabilities:capabilities
    who:who
    hasPublishedPosts:hasPublishedPosts
    searchColumns:searchColumns
              completionHandler: ^(array[LDLMS_v2_User] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseUsersApi()
var id = 56; // {Integer} Course ID.
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': name, // {String} Sort collection by user attribute.
  'slug': , // {array[String]} Limit result set to users with one or more specific slugs.
  'roles': , // {array[String]} Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
  'capabilities': , // {array[String]} Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
  'who': who_example, // {String} Limit result set to users who are considered authors.
  'hasPublishedPosts': , // {array[String]} Limit result set to users who have published posts.
  'searchColumns': [] // {array[String]} Array of column names to be searched.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2CoursesUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2CoursesUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseUsersApi();
            var id = 56;  // Integer | Course ID. (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = name;  // String | Sort collection by user attribute. (optional)  (default to name)
            var slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs. (optional)  (default to null)
            var roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional)  (default to null)
            var capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional)  (default to null)
            var who = who_example;  // String | Limit result set to users who are considered authors. (optional)  (default to null)
            var hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts. (optional)  (default to null)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])

            try {
                // Get associated users for a course
                array[LDLMS_v2_User] result = apiInstance.getLdlmsV2CoursesUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseUsersApi.getLdlmsV2CoursesUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseUsersApi();
$id = 56; // Integer | Course ID.
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = name; // String | Sort collection by user attribute.
$slug = ; // array[String] | Limit result set to users with one or more specific slugs.
$roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
$capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
$who = who_example; // String | Limit result set to users who are considered authors.
$hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
$searchColumns = []; // array[String] | Array of column names to be searched.

try {
    $result = $api_instance->getLdlmsV2CoursesUsersById($id, $context, $page, $perPage, $search, $exclude, $include, $offset, $order, $orderby, $slug, $roles, $capabilities, $who, $hasPublishedPosts, $searchColumns);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseUsersApi->getLdlmsV2CoursesUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseUsersApi->new();
my $id = 56; # Integer | Course ID.
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = name; # String | Sort collection by user attribute.
my $slug = []; # array[String] | Limit result set to users with one or more specific slugs.
my $roles = []; # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
my $capabilities = []; # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
my $who = who_example; # String | Limit result set to users who are considered authors.
my $hasPublishedPosts = []; # array[String] | Limit result set to users who have published posts.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.

eval {
    my $result = $api_instance->getLdlmsV2CoursesUsersById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, exclude => $exclude, include => $include, offset => $offset, order => $order, orderby => $orderby, slug => $slug, roles => $roles, capabilities => $capabilities, who => $who, hasPublishedPosts => $hasPublishedPosts, searchColumns => $searchColumns);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseUsersApi->getLdlmsV2CoursesUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseUsersApi()
id = 56 # Integer | Course ID. (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = name # String | Sort collection by user attribute. (optional) (default to name)
slug =  # array[String] | Limit result set to users with one or more specific slugs. (optional) (default to null)
roles =  # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
capabilities =  # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
who = who_example # String | Limit result set to users who are considered authors. (optional) (default to null)
hasPublishedPosts =  # array[String] | Limit result set to users who have published posts. (optional) (default to null)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])

try:
    # Get associated users for a course
    api_response = api_instance.get_ldlms_v2_courses_users_by_id(id, context=context, page=page, perPage=perPage, search=search, exclude=exclude, include=include, offset=offset, order=order, orderby=orderby, slug=slug, roles=roles, capabilities=capabilities, who=who, hasPublishedPosts=hasPublishedPosts, searchColumns=searchColumns)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseUsersApi->getLdlmsV2CoursesUsersById: %s\n" % e)
extern crate CourseUsersApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = name; // String
    let slug = ; // array[String]
    let roles = ; // array[String]
    let capabilities = ; // array[String]
    let who = who_example; // String
    let hasPublishedPosts = ; // array[String]
    let searchColumns = []; // array[String]

    let mut context = CourseUsersApi::Context::default();
    let result = client.getLdlmsV2CoursesUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID.
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by user attribute.
slug
array[String]
Limit result set to users with one or more specific slugs.
roles
array[String]
Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
capabilities
array[String]
Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
who
String
Limit result set to users who are considered authors.
has_published_posts
array[String]
Limit result set to users who have published posts.
search_columns
array[String]
Array of column names to be searched.

Responses


Update associated users for a course

Adds users to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/users

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseUsersApi;

import java.io.File;
import java.util.*;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.patchLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#patchLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID.
final UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2CoursesUsersById: $e\n');
}

import org.openapitools.client.api.CourseUsersApi;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.patchLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#patchLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseUsersApi *apiInstance = [[CourseUsersApi alloc] init];
Integer *id = 56; // Course ID. (default to null)
UpdateLdlmsV2CoursesUsersByIdRequest *updateLdlmsV2CoursesUsersByIdRequest = ; //  (optional)

// Update associated users for a course
[apiInstance patchLdlmsV2CoursesUsersByIdWith:id
    updateLdlmsV2CoursesUsersByIdRequest:updateLdlmsV2CoursesUsersByIdRequest
              completionHandler: ^(array[oas_any_type_not_mapped] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseUsersApi()
var id = 56; // {Integer} Course ID.
var opts = {
  'updateLdlmsV2CoursesUsersByIdRequest':  // {UpdateLdlmsV2CoursesUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2CoursesUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2CoursesUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseUsersApi();
            var id = 56;  // Integer | Course ID. (default to null)
            var updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a course
                array[oas_any_type_not_mapped] result = apiInstance.patchLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseUsersApi.patchLdlmsV2CoursesUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseUsersApi();
$id = 56; // Integer | Course ID.
$updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2CoursesUsersById($id, $updateLdlmsV2CoursesUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseUsersApi->patchLdlmsV2CoursesUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseUsersApi->new();
my $id = 56; # Integer | Course ID.
my $updateLdlmsV2CoursesUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesUsersByIdRequest->new(); # UpdateLdlmsV2CoursesUsersByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2CoursesUsersById(id => $id, updateLdlmsV2CoursesUsersByIdRequest => $updateLdlmsV2CoursesUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseUsersApi->patchLdlmsV2CoursesUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseUsersApi()
id = 56 # Integer | Course ID. (default to null)
updateLdlmsV2CoursesUsersByIdRequest =  # UpdateLdlmsV2CoursesUsersByIdRequest |  (optional)

try:
    # Update associated users for a course
    api_response = api_instance.patch_ldlms_v2_courses_users_by_id(id, updateLdlmsV2CoursesUsersByIdRequest=updateLdlmsV2CoursesUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseUsersApi->patchLdlmsV2CoursesUsersById: %s\n" % e)
extern crate CourseUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest

    let mut context = CourseUsersApi::Context::default();
    let result = client.patchLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID.
Required
Request body

Responses


Update associated users for a course

Adds users to a specific course.


/learndash/v1/ldlms/v2/sfwd-courses/{id}/users

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CourseUsersApi;

import java.io.File;
import java.util.*;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.updateLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#updateLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID.
final UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2CoursesUsersById: $e\n');
}

import org.openapitools.client.api.CourseUsersApi;

public class CourseUsersApiExample {
    public static void main(String[] args) {
        CourseUsersApi apiInstance = new CourseUsersApi();
        Integer id = 56; // Integer | Course ID.
        UpdateLdlmsV2CoursesUsersByIdRequest updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

        try {
            array[oas_any_type_not_mapped] result = apiInstance.updateLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseUsersApi#updateLdlmsV2CoursesUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CourseUsersApi *apiInstance = [[CourseUsersApi alloc] init];
Integer *id = 56; // Course ID. (default to null)
UpdateLdlmsV2CoursesUsersByIdRequest *updateLdlmsV2CoursesUsersByIdRequest = ; //  (optional)

// Update associated users for a course
[apiInstance updateLdlmsV2CoursesUsersByIdWith:id
    updateLdlmsV2CoursesUsersByIdRequest:updateLdlmsV2CoursesUsersByIdRequest
              completionHandler: ^(array[oas_any_type_not_mapped] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CourseUsersApi()
var id = 56; // {Integer} Course ID.
var opts = {
  'updateLdlmsV2CoursesUsersByIdRequest':  // {UpdateLdlmsV2CoursesUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2CoursesUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2CoursesUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CourseUsersApi();
            var id = 56;  // Integer | Course ID. (default to null)
            var updateLdlmsV2CoursesUsersByIdRequest = new UpdateLdlmsV2CoursesUsersByIdRequest(); // UpdateLdlmsV2CoursesUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a course
                array[oas_any_type_not_mapped] result = apiInstance.updateLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CourseUsersApi.updateLdlmsV2CoursesUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CourseUsersApi();
$id = 56; // Integer | Course ID.
$updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2CoursesUsersById($id, $updateLdlmsV2CoursesUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseUsersApi->updateLdlmsV2CoursesUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CourseUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CourseUsersApi->new();
my $id = 56; # Integer | Course ID.
my $updateLdlmsV2CoursesUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesUsersByIdRequest->new(); # UpdateLdlmsV2CoursesUsersByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2CoursesUsersById(id => $id, updateLdlmsV2CoursesUsersByIdRequest => $updateLdlmsV2CoursesUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseUsersApi->updateLdlmsV2CoursesUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CourseUsersApi()
id = 56 # Integer | Course ID. (default to null)
updateLdlmsV2CoursesUsersByIdRequest =  # UpdateLdlmsV2CoursesUsersByIdRequest |  (optional)

try:
    # Update associated users for a course
    api_response = api_instance.update_ldlms_v2_courses_users_by_id(id, updateLdlmsV2CoursesUsersByIdRequest=updateLdlmsV2CoursesUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseUsersApi->updateLdlmsV2CoursesUsersById: %s\n" % e)
extern crate CourseUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesUsersByIdRequest = ; // UpdateLdlmsV2CoursesUsersByIdRequest

    let mut context = CourseUsersApi::Context::default();
    let result = client.updateLdlmsV2CoursesUsersById(id, updateLdlmsV2CoursesUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID.
Required
Request body

Responses


Courses

Create course container: requires lessons to be functional

Creates an empty course with metadata (title, pricing, settings). Warning: A course without lessons/topics assigned via /sfwd-courses/{id}/steps is non-functional and cannot be taken by students. Always follow with: 1) Create lessons/topics/quizzes, 2) Assign them using the /steps endpoint.


/learndash/v1/ldlms/v2/sfwd-courses

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        CreateLdlmsV2CoursesRequest createLdlmsV2CoursesRequest = ; // CreateLdlmsV2CoursesRequest | 

        try {
            array[LDLMS_v2_Course] result = apiInstance.createLdlmsV2Courses(createLdlmsV2CoursesRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#createLdlmsV2Courses");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2CoursesRequest createLdlmsV2CoursesRequest = new CreateLdlmsV2CoursesRequest(); // CreateLdlmsV2CoursesRequest | 

try {
    final result = await api_instance.createLdlmsV2Courses(createLdlmsV2CoursesRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Courses: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        CreateLdlmsV2CoursesRequest createLdlmsV2CoursesRequest = ; // CreateLdlmsV2CoursesRequest | 

        try {
            array[LDLMS_v2_Course] result = apiInstance.createLdlmsV2Courses(createLdlmsV2CoursesRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#createLdlmsV2Courses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
CreateLdlmsV2CoursesRequest *createLdlmsV2CoursesRequest = ; //  (optional)

// Create course container: requires lessons to be functional
[apiInstance createLdlmsV2CoursesWith:createLdlmsV2CoursesRequest
              completionHandler: ^(array[LDLMS_v2_Course] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var opts = {
  'createLdlmsV2CoursesRequest':  // {CreateLdlmsV2CoursesRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Courses(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2CoursesExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var createLdlmsV2CoursesRequest = new CreateLdlmsV2CoursesRequest(); // CreateLdlmsV2CoursesRequest |  (optional) 

            try {
                // Create course container: requires lessons to be functional
                array[LDLMS_v2_Course] result = apiInstance.createLdlmsV2Courses(createLdlmsV2CoursesRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.createLdlmsV2Courses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$createLdlmsV2CoursesRequest = ; // CreateLdlmsV2CoursesRequest | 

try {
    $result = $api_instance->createLdlmsV2Courses($createLdlmsV2CoursesRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->createLdlmsV2Courses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $createLdlmsV2CoursesRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2CoursesRequest->new(); # CreateLdlmsV2CoursesRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Courses(createLdlmsV2CoursesRequest => $createLdlmsV2CoursesRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->createLdlmsV2Courses: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
createLdlmsV2CoursesRequest =  # CreateLdlmsV2CoursesRequest |  (optional)

try:
    # Create course container: requires lessons to be functional
    api_response = api_instance.create_ldlms_v2_courses(createLdlmsV2CoursesRequest=createLdlmsV2CoursesRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->createLdlmsV2Courses: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let createLdlmsV2CoursesRequest = ; // CreateLdlmsV2CoursesRequest

    let mut context = CoursesApi::Context::default();
    let result = client.createLdlmsV2Courses(createLdlmsV2CoursesRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a course

Partially updates an existing course. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-courses/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.createLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#createLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2CoursesById: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.createLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#createLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesByIdRequest *updateLdlmsV2CoursesByIdRequest = ; //  (optional)

// Update a course
[apiInstance createLdlmsV2CoursesByIdWith:id
    updateLdlmsV2CoursesByIdRequest:updateLdlmsV2CoursesByIdRequest
              completionHandler: ^(LDLMS_v2_Course output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesByIdRequest':  // {UpdateLdlmsV2CoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2CoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2CoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest |  (optional) 

            try {
                // Update a course
                LDLMS_v2_Course result = apiInstance.createLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.createLdlmsV2CoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2CoursesById($id, $updateLdlmsV2CoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->createLdlmsV2CoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesByIdRequest->new(); # UpdateLdlmsV2CoursesByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2CoursesById(id => $id, updateLdlmsV2CoursesByIdRequest => $updateLdlmsV2CoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->createLdlmsV2CoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesByIdRequest =  # UpdateLdlmsV2CoursesByIdRequest |  (optional)

try:
    # Update a course
    api_response = api_instance.create_ldlms_v2_courses_by_id(id, updateLdlmsV2CoursesByIdRequest=updateLdlmsV2CoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->createLdlmsV2CoursesById: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest

    let mut context = CoursesApi::Context::default();
    let result = client.createLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Delete a course

Deletes a course permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/sfwd-courses/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Course result = apiInstance.deleteLdlmsV2CoursesById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#deleteLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2CoursesById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2CoursesById: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Course result = apiInstance.deleteLdlmsV2CoursesById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#deleteLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
Integer *id = 56; // Course ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a course
[apiInstance deleteLdlmsV2CoursesByIdWith:id
    force:force
              completionHandler: ^(LDLMS_v2_Course output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var id = 56; // {Integer} Course ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2CoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2CoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var id = 56;  // Integer | Course ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a course
                LDLMS_v2_Course result = apiInstance.deleteLdlmsV2CoursesById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.deleteLdlmsV2CoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$id = 56; // Integer | Course ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2CoursesById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->deleteLdlmsV2CoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $id = 56; # Integer | Course ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2CoursesById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->deleteLdlmsV2CoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
id = 56 # Integer | Course ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a course
    api_response = api_instance.delete_ldlms_v2_courses_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->deleteLdlmsV2CoursesById: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = CoursesApi::Context::default();
    let result = client.deleteLdlmsV2CoursesById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific course

Returns a specific course by ID. Returns the complete course data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-courses/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID

        try {
            LDLMS_v2_Course result = apiInstance.getLdlmsV2CoursesById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#getLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID

try {
    final result = await api_instance.getLdlmsV2CoursesById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2CoursesById: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID

        try {
            LDLMS_v2_Course result = apiInstance.getLdlmsV2CoursesById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#getLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
Integer *id = 56; // Course ID (default to null)

// Get a specific course
[apiInstance getLdlmsV2CoursesByIdWith:id
              completionHandler: ^(LDLMS_v2_Course output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var id = 56; // {Integer} Course ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2CoursesById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2CoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var id = 56;  // Integer | Course ID (default to null)

            try {
                // Get a specific course
                LDLMS_v2_Course result = apiInstance.getLdlmsV2CoursesById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.getLdlmsV2CoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$id = 56; // Integer | Course ID

try {
    $result = $api_instance->getLdlmsV2CoursesById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->getLdlmsV2CoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $id = 56; # Integer | Course ID

eval {
    my $result = $api_instance->getLdlmsV2CoursesById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->getLdlmsV2CoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
id = 56 # Integer | Course ID (default to null)

try:
    # Get a specific course
    api_response = api_instance.get_ldlms_v2_courses_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->getLdlmsV2CoursesById: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = CoursesApi::Context::default();
    let result = client.getLdlmsV2CoursesById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required

Responses


List courses: retrieve all courses with filtering and pagination

Returns a paginated collection of courses. Supports filtering by author, category, tag, status, and search. Use per_page (max 100) and page for pagination. Does not include course steps/content structure.


/learndash/v1/ldlms/v2/sfwd-courses

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_course_category=Object&ld_course_category_exclude=Object&ld_course_tag=Object&ld_course_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.listLdlmsV2Courses(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#listLdlmsV2Courses");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
final Object ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    final result = await api_instance.listLdlmsV2Courses(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Courses: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.listLdlmsV2Courses(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#listLdlmsV2Courses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldCourseCategory = Object; // Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseTag = Object; // Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
Object *ldCourseTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

// List courses: retrieve all courses with filtering and pagination
[apiInstance listLdlmsV2CoursesWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldCourseCategory:ldCourseCategory
    ldCourseCategoryExclude:ldCourseCategoryExclude
    ldCourseTag:ldCourseTag
    ldCourseTagExclude:ldCourseTagExclude
              completionHandler: ^(array[LDLMS_v2_Course] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldCourseCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
  'ldCourseTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Courses(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2CoursesExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)
            var ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)

            try {
                // List courses: retrieve all courses with filtering and pagination
                array[LDLMS_v2_Course] result = apiInstance.listLdlmsV2Courses(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.listLdlmsV2Courses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
$ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
$ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
$ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    $result = $api_instance->listLdlmsV2Courses($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldCourseCategory, $ldCourseCategoryExclude, $ldCourseTag, $ldCourseTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->listLdlmsV2Courses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldCourseCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
my $ldCourseTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

eval {
    my $result = $api_instance->listLdlmsV2Courses(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldCourseCategory => $ldCourseCategory, ldCourseCategoryExclude => $ldCourseCategoryExclude, ldCourseTag => $ldCourseTag, ldCourseTagExclude => $ldCourseTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->listLdlmsV2Courses: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldCourseCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseTag = Object # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
ldCourseTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

try:
    # List courses: retrieve all courses with filtering and pagination
    api_response = api_instance.list_ldlms_v2_courses(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldCourseCategory=ldCourseCategory, ldCourseCategoryExclude=ldCourseCategoryExclude, ldCourseTag=ldCourseTag, ldCourseTagExclude=ldCourseTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->listLdlmsV2Courses: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldCourseCategory = Object; // Object
    let ldCourseCategoryExclude = Object; // Object
    let ldCourseTag = Object; // Object
    let ldCourseTagExclude = Object; // Object

    let mut context = CoursesApi::Context::default();
    let result = client.listLdlmsV2Courses(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_course_category
Object
Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
ld_course_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
ld_course_tag
Object
Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
ld_course_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

Responses


Update a course

Partially updates an existing course. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-courses/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.patchLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#patchLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2CoursesById: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.patchLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#patchLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesByIdRequest *updateLdlmsV2CoursesByIdRequest = ; //  (optional)

// Update a course
[apiInstance patchLdlmsV2CoursesByIdWith:id
    updateLdlmsV2CoursesByIdRequest:updateLdlmsV2CoursesByIdRequest
              completionHandler: ^(LDLMS_v2_Course output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesByIdRequest':  // {UpdateLdlmsV2CoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2CoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2CoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest |  (optional) 

            try {
                // Update a course
                LDLMS_v2_Course result = apiInstance.patchLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.patchLdlmsV2CoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2CoursesById($id, $updateLdlmsV2CoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->patchLdlmsV2CoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesByIdRequest->new(); # UpdateLdlmsV2CoursesByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2CoursesById(id => $id, updateLdlmsV2CoursesByIdRequest => $updateLdlmsV2CoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->patchLdlmsV2CoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesByIdRequest =  # UpdateLdlmsV2CoursesByIdRequest |  (optional)

try:
    # Update a course
    api_response = api_instance.patch_ldlms_v2_courses_by_id(id, updateLdlmsV2CoursesByIdRequest=updateLdlmsV2CoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->patchLdlmsV2CoursesById: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest

    let mut context = CoursesApi::Context::default();
    let result = client.patchLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Update a course

Updates an existing course. Requires the complete course data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-courses/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-courses/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CoursesApi;

import java.io.File;
import java.util.*;

public class CoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.updateLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#updateLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Course ID
final UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2CoursesById: $e\n');
}

import org.openapitools.client.api.CoursesApi;

public class CoursesApiExample {
    public static void main(String[] args) {
        CoursesApi apiInstance = new CoursesApi();
        Integer id = 56; // Integer | Course ID
        UpdateLdlmsV2CoursesByIdRequest updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

        try {
            LDLMS_v2_Course result = apiInstance.updateLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoursesApi#updateLdlmsV2CoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
CoursesApi *apiInstance = [[CoursesApi alloc] init];
Integer *id = 56; // Course ID (default to null)
UpdateLdlmsV2CoursesByIdRequest *updateLdlmsV2CoursesByIdRequest = ; //  (optional)

// Update a course
[apiInstance updateLdlmsV2CoursesByIdWith:id
    updateLdlmsV2CoursesByIdRequest:updateLdlmsV2CoursesByIdRequest
              completionHandler: ^(LDLMS_v2_Course output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.CoursesApi()
var id = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2CoursesByIdRequest':  // {UpdateLdlmsV2CoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2CoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2CoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new CoursesApi();
            var id = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2CoursesByIdRequest = new UpdateLdlmsV2CoursesByIdRequest(); // UpdateLdlmsV2CoursesByIdRequest |  (optional) 

            try {
                // Update a course
                LDLMS_v2_Course result = apiInstance.updateLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CoursesApi.updateLdlmsV2CoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CoursesApi();
$id = 56; // Integer | Course ID
$updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2CoursesById($id, $updateLdlmsV2CoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CoursesApi->updateLdlmsV2CoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CoursesApi->new();
my $id = 56; # Integer | Course ID
my $updateLdlmsV2CoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2CoursesByIdRequest->new(); # UpdateLdlmsV2CoursesByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2CoursesById(id => $id, updateLdlmsV2CoursesByIdRequest => $updateLdlmsV2CoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CoursesApi->updateLdlmsV2CoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.CoursesApi()
id = 56 # Integer | Course ID (default to null)
updateLdlmsV2CoursesByIdRequest =  # UpdateLdlmsV2CoursesByIdRequest |  (optional)

try:
    # Update a course
    api_response = api_instance.update_ldlms_v2_courses_by_id(id, updateLdlmsV2CoursesByIdRequest=updateLdlmsV2CoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoursesApi->updateLdlmsV2CoursesById: %s\n" % e)
extern crate CoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2CoursesByIdRequest = ; // UpdateLdlmsV2CoursesByIdRequest

    let mut context = CoursesApi::Context::default();
    let result = client.updateLdlmsV2CoursesById(id, updateLdlmsV2CoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Course ID
Required
Request body

Responses


Docs

Get OpenAPI specification

Returns the OpenAPI 3.0 specification in JSON format.


/learndash/v1/learndash/v1/docs/openapi

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/docs/openapi?trim=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DocsApi;

import java.io.File;
import java.util.*;

public class DocsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DocsApi apiInstance = new DocsApi();
        Boolean trim = true; // Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

        try {
            list_learndash_v1_docs_openapi_200_response result = apiInstance.listLearndashV1DocsOpenapi(trim);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocsApi#listLearndashV1DocsOpenapi");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean trim = new Boolean(); // Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

try {
    final result = await api_instance.listLearndashV1DocsOpenapi(trim);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLearndashV1DocsOpenapi: $e\n');
}

import org.openapitools.client.api.DocsApi;

public class DocsApiExample {
    public static void main(String[] args) {
        DocsApi apiInstance = new DocsApi();
        Boolean trim = true; // Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

        try {
            list_learndash_v1_docs_openapi_200_response result = apiInstance.listLearndashV1DocsOpenapi(trim);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocsApi#listLearndashV1DocsOpenapi");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DocsApi *apiInstance = [[DocsApi alloc] init];
Boolean *trim = true; // Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation. (optional) (default to true)

// Get OpenAPI specification
[apiInstance listLearndashV1DocsOpenapiWith:trim
              completionHandler: ^(list_learndash_v1_docs_openapi_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.DocsApi()
var opts = {
  'trim': true // {Boolean} Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLearndashV1DocsOpenapi(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLearndashV1DocsOpenapiExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DocsApi();
            var trim = true;  // Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation. (optional)  (default to true)

            try {
                // Get OpenAPI specification
                list_learndash_v1_docs_openapi_200_response result = apiInstance.listLearndashV1DocsOpenapi(trim);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DocsApi.listLearndashV1DocsOpenapi: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DocsApi();
$trim = true; // Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

try {
    $result = $api_instance->listLearndashV1DocsOpenapi($trim);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocsApi->listLearndashV1DocsOpenapi: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DocsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DocsApi->new();
my $trim = true; # Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

eval {
    my $result = $api_instance->listLearndashV1DocsOpenapi(trim => $trim);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DocsApi->listLearndashV1DocsOpenapi: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DocsApi()
trim = true # Boolean | Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation. (optional) (default to true)

try:
    # Get OpenAPI specification
    api_response = api_instance.list_learndash_v1_docs_openapi(trim=trim)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DocsApi->listLearndashV1DocsOpenapi: %s\n" % e)
extern crate DocsApi;

pub fn main() {
    let trim = true; // Boolean

    let mut context = DocsApi::Context::default();
    let result = client.listLearndashV1DocsOpenapi(trim, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
trim
Boolean
Whether to trim documentation from the OpenAPI specification. This is used in cases where an older REST API endpoints may expose unnecessary documentation.

Responses


Essays

Update a essay

Partially updates an existing essay. Only the provided fields will be updated, leaving other fields unchanged. Only admins can update essays.


/learndash/v1/ldlms/v2/sfwd-essays/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-essays/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EssaysApi;

import java.io.File;
import java.util.*;

public class EssaysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.createLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#createLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Submitted Essay ID
final UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2EssaysById: $e\n');
}

import org.openapitools.client.api.EssaysApi;

public class EssaysApiExample {
    public static void main(String[] args) {
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.createLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#createLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
EssaysApi *apiInstance = [[EssaysApi alloc] init];
Integer *id = 56; // Submitted Essay ID (default to null)
UpdateLdlmsV2EssaysByIdRequest *updateLdlmsV2EssaysByIdRequest = ; //  (optional)

// Update a essay
[apiInstance createLdlmsV2EssaysByIdWith:id
    updateLdlmsV2EssaysByIdRequest:updateLdlmsV2EssaysByIdRequest
              completionHandler: ^(array[LDLMS_v2_Essay] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.EssaysApi()
var id = 56; // {Integer} Submitted Essay ID
var opts = {
  'updateLdlmsV2EssaysByIdRequest':  // {UpdateLdlmsV2EssaysByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2EssaysById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2EssaysByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EssaysApi();
            var id = 56;  // Integer | Submitted Essay ID (default to null)
            var updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest |  (optional) 

            try {
                // Update a essay
                array[LDLMS_v2_Essay] result = apiInstance.createLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EssaysApi.createLdlmsV2EssaysById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EssaysApi();
$id = 56; // Integer | Submitted Essay ID
$updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2EssaysById($id, $updateLdlmsV2EssaysByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EssaysApi->createLdlmsV2EssaysById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EssaysApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EssaysApi->new();
my $id = 56; # Integer | Submitted Essay ID
my $updateLdlmsV2EssaysByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2EssaysByIdRequest->new(); # UpdateLdlmsV2EssaysByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2EssaysById(id => $id, updateLdlmsV2EssaysByIdRequest => $updateLdlmsV2EssaysByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EssaysApi->createLdlmsV2EssaysById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EssaysApi()
id = 56 # Integer | Submitted Essay ID (default to null)
updateLdlmsV2EssaysByIdRequest =  # UpdateLdlmsV2EssaysByIdRequest |  (optional)

try:
    # Update a essay
    api_response = api_instance.create_ldlms_v2_essays_by_id(id, updateLdlmsV2EssaysByIdRequest=updateLdlmsV2EssaysByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EssaysApi->createLdlmsV2EssaysById: %s\n" % e)
extern crate EssaysApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest

    let mut context = EssaysApi::Context::default();
    let result = client.createLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Submitted Essay ID
Required
Request body

Responses


Get a specific essay

Returns a specific essay by ID. Returns the complete essay data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-essays/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-essays/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EssaysApi;

import java.io.File;
import java.util.*;

public class EssaysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID

        try {
            array[LDLMS_v2_Essay] result = apiInstance.getLdlmsV2EssaysById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#getLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Submitted Essay ID

try {
    final result = await api_instance.getLdlmsV2EssaysById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2EssaysById: $e\n');
}

import org.openapitools.client.api.EssaysApi;

public class EssaysApiExample {
    public static void main(String[] args) {
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID

        try {
            array[LDLMS_v2_Essay] result = apiInstance.getLdlmsV2EssaysById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#getLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
EssaysApi *apiInstance = [[EssaysApi alloc] init];
Integer *id = 56; // Submitted Essay ID (default to null)

// Get a specific essay
[apiInstance getLdlmsV2EssaysByIdWith:id
              completionHandler: ^(array[LDLMS_v2_Essay] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.EssaysApi()
var id = 56; // {Integer} Submitted Essay ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2EssaysById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2EssaysByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EssaysApi();
            var id = 56;  // Integer | Submitted Essay ID (default to null)

            try {
                // Get a specific essay
                array[LDLMS_v2_Essay] result = apiInstance.getLdlmsV2EssaysById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EssaysApi.getLdlmsV2EssaysById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EssaysApi();
$id = 56; // Integer | Submitted Essay ID

try {
    $result = $api_instance->getLdlmsV2EssaysById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EssaysApi->getLdlmsV2EssaysById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EssaysApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EssaysApi->new();
my $id = 56; # Integer | Submitted Essay ID

eval {
    my $result = $api_instance->getLdlmsV2EssaysById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EssaysApi->getLdlmsV2EssaysById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EssaysApi()
id = 56 # Integer | Submitted Essay ID (default to null)

try:
    # Get a specific essay
    api_response = api_instance.get_ldlms_v2_essays_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EssaysApi->getLdlmsV2EssaysById: %s\n" % e)
extern crate EssaysApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = EssaysApi::Context::default();
    let result = client.getLdlmsV2EssaysById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Submitted Essay ID
Required

Responses


Get essays

Returns a list of essays. You can filter the results using query parameters such as per_page, page, search, course, lesson, topic, and status.


/learndash/v1/ldlms/v2/sfwd-essays

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-essays?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&search_semantics=searchSemantics_example&offset=56&order=desc&orderby=date&search_columns=[]&slug=&status=["any"]&course=56&lesson=0&topic=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EssaysApi;

import java.io.File;
import java.util.*;

public class EssaysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EssaysApi apiInstance = new EssaysApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Filter by Course ID
        Integer lesson = 0; // Integer | Filter by Lesson ID
        Integer topic = 0; // Integer | Filter by Topic ID

        try {
            array[LDLMS_v2_Essay] result = apiInstance.listLdlmsV2Essays(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#listLdlmsV2Essays");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final Integer course = new Integer(); // Integer | Filter by Course ID
final Integer lesson = new Integer(); // Integer | Filter by Lesson ID
final Integer topic = new Integer(); // Integer | Filter by Topic ID

try {
    final result = await api_instance.listLdlmsV2Essays(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Essays: $e\n');
}

import org.openapitools.client.api.EssaysApi;

public class EssaysApiExample {
    public static void main(String[] args) {
        EssaysApi apiInstance = new EssaysApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Filter by Course ID
        Integer lesson = 0; // Integer | Filter by Lesson ID
        Integer topic = 0; // Integer | Filter by Topic ID

        try {
            array[LDLMS_v2_Essay] result = apiInstance.listLdlmsV2Essays(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#listLdlmsV2Essays");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
EssaysApi *apiInstance = [[EssaysApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = desc; // Order sort attribute ascending or descending. (optional) (default to desc)
String *orderby = date; // Sort collection by post attribute. (optional) (default to date)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["any"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["any"])
Integer *course = 56; // Filter by Course ID (optional) (default to null)
Integer *lesson = 0; // Filter by Lesson ID (optional) (default to 0)
Integer *topic = 0; // Filter by Topic ID (optional) (default to 0)

// Get essays
[apiInstance listLdlmsV2EssaysWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    course:course
    lesson:lesson
    topic:topic
              completionHandler: ^(array[LDLMS_v2_Essay] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.EssaysApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': desc, // {String} Order sort attribute ascending or descending.
  'orderby': date, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["any"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'course': 56, // {Integer} Filter by Course ID
  'lesson': 0, // {Integer} Filter by Lesson ID
  'topic': 0 // {Integer} Filter by Topic ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Essays(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2EssaysExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EssaysApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = desc;  // String | Order sort attribute ascending or descending. (optional)  (default to desc)
            var orderby = date;  // String | Sort collection by post attribute. (optional)  (default to date)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["any"])
            var course = 56;  // Integer | Filter by Course ID (optional)  (default to null)
            var lesson = 0;  // Integer | Filter by Lesson ID (optional)  (default to 0)
            var topic = 0;  // Integer | Filter by Topic ID (optional)  (default to 0)

            try {
                // Get essays
                array[LDLMS_v2_Essay] result = apiInstance.listLdlmsV2Essays(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EssaysApi.listLdlmsV2Essays: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EssaysApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = desc; // String | Order sort attribute ascending or descending.
$orderby = date; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["any"]; // array[String] | Limit result set to posts assigned one or more statuses.
$course = 56; // Integer | Filter by Course ID
$lesson = 0; // Integer | Filter by Lesson ID
$topic = 0; // Integer | Filter by Topic ID

try {
    $result = $api_instance->listLdlmsV2Essays($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $course, $lesson, $topic);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EssaysApi->listLdlmsV2Essays: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EssaysApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EssaysApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = desc; # String | Order sort attribute ascending or descending.
my $orderby = date; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["any"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $course = 56; # Integer | Filter by Course ID
my $lesson = 0; # Integer | Filter by Lesson ID
my $topic = 0; # Integer | Filter by Topic ID

eval {
    my $result = $api_instance->listLdlmsV2Essays(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, course => $course, lesson => $lesson, topic => $topic);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EssaysApi->listLdlmsV2Essays: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EssaysApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = desc # String | Order sort attribute ascending or descending. (optional) (default to desc)
orderby = date # String | Sort collection by post attribute. (optional) (default to date)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["any"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["any"])
course = 56 # Integer | Filter by Course ID (optional) (default to null)
lesson = 0 # Integer | Filter by Lesson ID (optional) (default to 0)
topic = 0 # Integer | Filter by Topic ID (optional) (default to 0)

try:
    # Get essays
    api_response = api_instance.list_ldlms_v2_essays(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, course=course, lesson=lesson, topic=topic)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EssaysApi->listLdlmsV2Essays: %s\n" % e)
extern crate EssaysApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = desc; // String
    let orderby = date; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["any"]; // array[String]
    let course = 56; // Integer
    let lesson = 0; // Integer
    let topic = 0; // Integer

    let mut context = EssaysApi::Context::default();
    let result = client.listLdlmsV2Essays(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
course
Integer
Filter by Course ID
lesson
Integer
Filter by Lesson ID
topic
Integer
Filter by Topic ID

Responses


Update a essay

Partially updates an existing essay. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-essays/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-essays/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EssaysApi;

import java.io.File;
import java.util.*;

public class EssaysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.patchLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#patchLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Submitted Essay ID
final UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2EssaysById: $e\n');
}

import org.openapitools.client.api.EssaysApi;

public class EssaysApiExample {
    public static void main(String[] args) {
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.patchLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#patchLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
EssaysApi *apiInstance = [[EssaysApi alloc] init];
Integer *id = 56; // Submitted Essay ID (default to null)
UpdateLdlmsV2EssaysByIdRequest *updateLdlmsV2EssaysByIdRequest = ; //  (optional)

// Update a essay
[apiInstance patchLdlmsV2EssaysByIdWith:id
    updateLdlmsV2EssaysByIdRequest:updateLdlmsV2EssaysByIdRequest
              completionHandler: ^(array[LDLMS_v2_Essay] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.EssaysApi()
var id = 56; // {Integer} Submitted Essay ID
var opts = {
  'updateLdlmsV2EssaysByIdRequest':  // {UpdateLdlmsV2EssaysByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2EssaysById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2EssaysByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EssaysApi();
            var id = 56;  // Integer | Submitted Essay ID (default to null)
            var updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest |  (optional) 

            try {
                // Update a essay
                array[LDLMS_v2_Essay] result = apiInstance.patchLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EssaysApi.patchLdlmsV2EssaysById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EssaysApi();
$id = 56; // Integer | Submitted Essay ID
$updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2EssaysById($id, $updateLdlmsV2EssaysByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EssaysApi->patchLdlmsV2EssaysById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EssaysApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EssaysApi->new();
my $id = 56; # Integer | Submitted Essay ID
my $updateLdlmsV2EssaysByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2EssaysByIdRequest->new(); # UpdateLdlmsV2EssaysByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2EssaysById(id => $id, updateLdlmsV2EssaysByIdRequest => $updateLdlmsV2EssaysByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EssaysApi->patchLdlmsV2EssaysById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EssaysApi()
id = 56 # Integer | Submitted Essay ID (default to null)
updateLdlmsV2EssaysByIdRequest =  # UpdateLdlmsV2EssaysByIdRequest |  (optional)

try:
    # Update a essay
    api_response = api_instance.patch_ldlms_v2_essays_by_id(id, updateLdlmsV2EssaysByIdRequest=updateLdlmsV2EssaysByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EssaysApi->patchLdlmsV2EssaysById: %s\n" % e)
extern crate EssaysApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest

    let mut context = EssaysApi::Context::default();
    let result = client.patchLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Submitted Essay ID
Required
Request body

Responses


Update a essay

Updates an existing essay. Requires the complete essay data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-essays/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-essays/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EssaysApi;

import java.io.File;
import java.util.*;

public class EssaysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.updateLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#updateLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Submitted Essay ID
final UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2EssaysById: $e\n');
}

import org.openapitools.client.api.EssaysApi;

public class EssaysApiExample {
    public static void main(String[] args) {
        EssaysApi apiInstance = new EssaysApi();
        Integer id = 56; // Integer | Submitted Essay ID
        UpdateLdlmsV2EssaysByIdRequest updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

        try {
            array[LDLMS_v2_Essay] result = apiInstance.updateLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EssaysApi#updateLdlmsV2EssaysById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
EssaysApi *apiInstance = [[EssaysApi alloc] init];
Integer *id = 56; // Submitted Essay ID (default to null)
UpdateLdlmsV2EssaysByIdRequest *updateLdlmsV2EssaysByIdRequest = ; //  (optional)

// Update a essay
[apiInstance updateLdlmsV2EssaysByIdWith:id
    updateLdlmsV2EssaysByIdRequest:updateLdlmsV2EssaysByIdRequest
              completionHandler: ^(array[LDLMS_v2_Essay] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.EssaysApi()
var id = 56; // {Integer} Submitted Essay ID
var opts = {
  'updateLdlmsV2EssaysByIdRequest':  // {UpdateLdlmsV2EssaysByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2EssaysById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2EssaysByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EssaysApi();
            var id = 56;  // Integer | Submitted Essay ID (default to null)
            var updateLdlmsV2EssaysByIdRequest = new UpdateLdlmsV2EssaysByIdRequest(); // UpdateLdlmsV2EssaysByIdRequest |  (optional) 

            try {
                // Update a essay
                array[LDLMS_v2_Essay] result = apiInstance.updateLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EssaysApi.updateLdlmsV2EssaysById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EssaysApi();
$id = 56; // Integer | Submitted Essay ID
$updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2EssaysById($id, $updateLdlmsV2EssaysByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EssaysApi->updateLdlmsV2EssaysById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EssaysApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EssaysApi->new();
my $id = 56; # Integer | Submitted Essay ID
my $updateLdlmsV2EssaysByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2EssaysByIdRequest->new(); # UpdateLdlmsV2EssaysByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2EssaysById(id => $id, updateLdlmsV2EssaysByIdRequest => $updateLdlmsV2EssaysByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EssaysApi->updateLdlmsV2EssaysById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EssaysApi()
id = 56 # Integer | Submitted Essay ID (default to null)
updateLdlmsV2EssaysByIdRequest =  # UpdateLdlmsV2EssaysByIdRequest |  (optional)

try:
    # Update a essay
    api_response = api_instance.update_ldlms_v2_essays_by_id(id, updateLdlmsV2EssaysByIdRequest=updateLdlmsV2EssaysByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EssaysApi->updateLdlmsV2EssaysById: %s\n" % e)
extern crate EssaysApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2EssaysByIdRequest = ; // UpdateLdlmsV2EssaysByIdRequest

    let mut context = EssaysApi::Context::default();
    let result = client.updateLdlmsV2EssaysById(id, updateLdlmsV2EssaysByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Submitted Essay ID
Required
Request body

Responses


Group Courses

Update associated courses for a group

Adds courses to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/courses

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupCoursesApi;

import java.io.File;
import java.util.*;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#createLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2GroupsCoursesById: $e\n');
}

import org.openapitools.client.api.GroupCoursesApi;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#createLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupCoursesApi *apiInstance = [[GroupCoursesApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsCoursesByIdRequest *updateLdlmsV2GroupsCoursesByIdRequest = ; //  (optional)

// Update associated courses for a group
[apiInstance createLdlmsV2GroupsCoursesByIdWith:id
    updateLdlmsV2GroupsCoursesByIdRequest:updateLdlmsV2GroupsCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupCoursesApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsCoursesByIdRequest':  // {UpdateLdlmsV2GroupsCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2GroupsCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2GroupsCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupCoursesApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a group
                array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupCoursesApi.createLdlmsV2GroupsCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupCoursesApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2GroupsCoursesById($id, $updateLdlmsV2GroupsCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupCoursesApi->createLdlmsV2GroupsCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupCoursesApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsCoursesByIdRequest->new(); # UpdateLdlmsV2GroupsCoursesByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2GroupsCoursesById(id => $id, updateLdlmsV2GroupsCoursesByIdRequest => $updateLdlmsV2GroupsCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupCoursesApi->createLdlmsV2GroupsCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupCoursesApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsCoursesByIdRequest =  # UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a group
    api_response = api_instance.create_ldlms_v2_groups_courses_by_id(id, updateLdlmsV2GroupsCoursesByIdRequest=updateLdlmsV2GroupsCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupCoursesApi->createLdlmsV2GroupsCoursesById: %s\n" % e)
extern crate GroupCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest

    let mut context = GroupCoursesApi::Context::default();
    let result = client.createLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Delete associated courses for a group

Removes users from a specific courses.


/learndash/v1/ldlms/v2/groups/{id}/courses

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/courses?course_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupCoursesApi;

import java.io.File;
import java.util.*;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] courseIds = ; // array[Integer] | Course IDs to remove from Group.

        try {
            array[delete_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsCoursesById(id, courseIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#deleteLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final array[Integer] courseIds = new array[Integer](); // array[Integer] | Course IDs to remove from Group.

try {
    final result = await api_instance.deleteLdlmsV2GroupsCoursesById(id, courseIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2GroupsCoursesById: $e\n');
}

import org.openapitools.client.api.GroupCoursesApi;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] courseIds = ; // array[Integer] | Course IDs to remove from Group.

        try {
            array[delete_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsCoursesById(id, courseIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#deleteLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupCoursesApi *apiInstance = [[GroupCoursesApi alloc] init];
Integer *id = 56; // Group ID (default to null)
array[Integer] *courseIds = ; // Course IDs to remove from Group. (optional) (default to null)

// Delete associated courses for a group
[apiInstance deleteLdlmsV2GroupsCoursesByIdWith:id
    courseIds:courseIds
              completionHandler: ^(array[delete_ldlms_v2_groups_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupCoursesApi()
var id = 56; // {Integer} Group ID
var opts = {
  'courseIds':  // {array[Integer]} Course IDs to remove from Group.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2GroupsCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2GroupsCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupCoursesApi();
            var id = 56;  // Integer | Group ID (default to null)
            var courseIds = new array[Integer](); // array[Integer] | Course IDs to remove from Group. (optional)  (default to null)

            try {
                // Delete associated courses for a group
                array[delete_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsCoursesById(id, courseIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupCoursesApi.deleteLdlmsV2GroupsCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupCoursesApi();
$id = 56; // Integer | Group ID
$courseIds = ; // array[Integer] | Course IDs to remove from Group.

try {
    $result = $api_instance->deleteLdlmsV2GroupsCoursesById($id, $courseIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupCoursesApi->deleteLdlmsV2GroupsCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupCoursesApi->new();
my $id = 56; # Integer | Group ID
my $courseIds = []; # array[Integer] | Course IDs to remove from Group.

eval {
    my $result = $api_instance->deleteLdlmsV2GroupsCoursesById(id => $id, courseIds => $courseIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupCoursesApi->deleteLdlmsV2GroupsCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupCoursesApi()
id = 56 # Integer | Group ID (default to null)
courseIds =  # array[Integer] | Course IDs to remove from Group. (optional) (default to null)

try:
    # Delete associated courses for a group
    api_response = api_instance.delete_ldlms_v2_groups_courses_by_id(id, courseIds=courseIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupCoursesApi->deleteLdlmsV2GroupsCoursesById: %s\n" % e)
extern crate GroupCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let courseIds = ; // array[Integer]

    let mut context = GroupCoursesApi::Context::default();
    let result = client.deleteLdlmsV2GroupsCoursesById(id, courseIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
course_ids
array[Integer]
Course IDs to remove from Group.

Responses


Get associated courses for a group

Retrieves the courses for a specific group.


/learndash/v1/ldlms/v2/groups/{id}/courses

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/courses?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_course_category=Object&ld_course_category_exclude=Object&ld_course_tag=Object&ld_course_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupCoursesApi;

import java.io.File;
import java.util.*;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2GroupsCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#getLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
final Object ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    final result = await api_instance.getLdlmsV2GroupsCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2GroupsCoursesById: $e\n');
}

import org.openapitools.client.api.GroupCoursesApi;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2GroupsCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#getLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupCoursesApi *apiInstance = [[GroupCoursesApi alloc] init];
Integer *id = 56; // Group ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldCourseCategory = Object; // Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseTag = Object; // Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
Object *ldCourseTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

// Get associated courses for a group
[apiInstance getLdlmsV2GroupsCoursesByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldCourseCategory:ldCourseCategory
    ldCourseCategoryExclude:ldCourseCategoryExclude
    ldCourseTag:ldCourseTag
    ldCourseTagExclude:ldCourseTagExclude
              completionHandler: ^(array[LDLMS_v2_Course] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupCoursesApi()
var id = 56; // {Integer} Group ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldCourseCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
  'ldCourseTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2GroupsCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2GroupsCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupCoursesApi();
            var id = 56;  // Integer | Group ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)
            var ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)

            try {
                // Get associated courses for a group
                array[LDLMS_v2_Course] result = apiInstance.getLdlmsV2GroupsCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupCoursesApi.getLdlmsV2GroupsCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupCoursesApi();
$id = 56; // Integer | Group ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
$ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
$ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
$ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    $result = $api_instance->getLdlmsV2GroupsCoursesById($id, $context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldCourseCategory, $ldCourseCategoryExclude, $ldCourseTag, $ldCourseTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupCoursesApi->getLdlmsV2GroupsCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupCoursesApi->new();
my $id = 56; # Integer | Group ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldCourseCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
my $ldCourseTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

eval {
    my $result = $api_instance->getLdlmsV2GroupsCoursesById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldCourseCategory => $ldCourseCategory, ldCourseCategoryExclude => $ldCourseCategoryExclude, ldCourseTag => $ldCourseTag, ldCourseTagExclude => $ldCourseTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupCoursesApi->getLdlmsV2GroupsCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupCoursesApi()
id = 56 # Integer | Group ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldCourseCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseTag = Object # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
ldCourseTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

try:
    # Get associated courses for a group
    api_response = api_instance.get_ldlms_v2_groups_courses_by_id(id, context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldCourseCategory=ldCourseCategory, ldCourseCategoryExclude=ldCourseCategoryExclude, ldCourseTag=ldCourseTag, ldCourseTagExclude=ldCourseTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupCoursesApi->getLdlmsV2GroupsCoursesById: %s\n" % e)
extern crate GroupCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldCourseCategory = Object; // Object
    let ldCourseCategoryExclude = Object; // Object
    let ldCourseTag = Object; // Object
    let ldCourseTagExclude = Object; // Object

    let mut context = GroupCoursesApi::Context::default();
    let result = client.getLdlmsV2GroupsCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_course_category
Object
Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
ld_course_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
ld_course_tag
Object
Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
ld_course_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

Responses


Update associated courses for a group

Adds courses to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/courses

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupCoursesApi;

import java.io.File;
import java.util.*;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#patchLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2GroupsCoursesById: $e\n');
}

import org.openapitools.client.api.GroupCoursesApi;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#patchLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupCoursesApi *apiInstance = [[GroupCoursesApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsCoursesByIdRequest *updateLdlmsV2GroupsCoursesByIdRequest = ; //  (optional)

// Update associated courses for a group
[apiInstance patchLdlmsV2GroupsCoursesByIdWith:id
    updateLdlmsV2GroupsCoursesByIdRequest:updateLdlmsV2GroupsCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupCoursesApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsCoursesByIdRequest':  // {UpdateLdlmsV2GroupsCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2GroupsCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2GroupsCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupCoursesApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a group
                array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupCoursesApi.patchLdlmsV2GroupsCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupCoursesApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2GroupsCoursesById($id, $updateLdlmsV2GroupsCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupCoursesApi->patchLdlmsV2GroupsCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupCoursesApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsCoursesByIdRequest->new(); # UpdateLdlmsV2GroupsCoursesByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2GroupsCoursesById(id => $id, updateLdlmsV2GroupsCoursesByIdRequest => $updateLdlmsV2GroupsCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupCoursesApi->patchLdlmsV2GroupsCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupCoursesApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsCoursesByIdRequest =  # UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a group
    api_response = api_instance.patch_ldlms_v2_groups_courses_by_id(id, updateLdlmsV2GroupsCoursesByIdRequest=updateLdlmsV2GroupsCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupCoursesApi->patchLdlmsV2GroupsCoursesById: %s\n" % e)
extern crate GroupCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest

    let mut context = GroupCoursesApi::Context::default();
    let result = client.patchLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Update associated courses for a group

Adds courses to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/courses

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupCoursesApi;

import java.io.File;
import java.util.*;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#updateLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2GroupsCoursesById: $e\n');
}

import org.openapitools.client.api.GroupCoursesApi;

public class GroupCoursesApiExample {
    public static void main(String[] args) {
        GroupCoursesApi apiInstance = new GroupCoursesApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsCoursesByIdRequest updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupCoursesApi#updateLdlmsV2GroupsCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupCoursesApi *apiInstance = [[GroupCoursesApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsCoursesByIdRequest *updateLdlmsV2GroupsCoursesByIdRequest = ; //  (optional)

// Update associated courses for a group
[apiInstance updateLdlmsV2GroupsCoursesByIdWith:id
    updateLdlmsV2GroupsCoursesByIdRequest:updateLdlmsV2GroupsCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupCoursesApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsCoursesByIdRequest':  // {UpdateLdlmsV2GroupsCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2GroupsCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2GroupsCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupCoursesApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsCoursesByIdRequest = new UpdateLdlmsV2GroupsCoursesByIdRequest(); // UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a group
                array[update_ldlms_v2_groups_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupCoursesApi.updateLdlmsV2GroupsCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupCoursesApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2GroupsCoursesById($id, $updateLdlmsV2GroupsCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupCoursesApi->updateLdlmsV2GroupsCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupCoursesApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsCoursesByIdRequest->new(); # UpdateLdlmsV2GroupsCoursesByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2GroupsCoursesById(id => $id, updateLdlmsV2GroupsCoursesByIdRequest => $updateLdlmsV2GroupsCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupCoursesApi->updateLdlmsV2GroupsCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupCoursesApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsCoursesByIdRequest =  # UpdateLdlmsV2GroupsCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a group
    api_response = api_instance.update_ldlms_v2_groups_courses_by_id(id, updateLdlmsV2GroupsCoursesByIdRequest=updateLdlmsV2GroupsCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupCoursesApi->updateLdlmsV2GroupsCoursesById: %s\n" % e)
extern crate GroupCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsCoursesByIdRequest = ; // UpdateLdlmsV2GroupsCoursesByIdRequest

    let mut context = GroupCoursesApi::Context::default();
    let result = client.updateLdlmsV2GroupsCoursesById(id, updateLdlmsV2GroupsCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Group Leaders

Update associated group leader users for a group

Adds group leader users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/leaders

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/leaders" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupLeadersApi;

import java.io.File;
import java.util.*;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#createLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2GroupsLeadersById: $e\n');
}

import org.openapitools.client.api.GroupLeadersApi;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#createLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupLeadersApi *apiInstance = [[GroupLeadersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsLeadersByIdRequest *updateLdlmsV2GroupsLeadersByIdRequest = ; //  (optional)

// Update associated group leader users for a group
[apiInstance createLdlmsV2GroupsLeadersByIdWith:id
    updateLdlmsV2GroupsLeadersByIdRequest:updateLdlmsV2GroupsLeadersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupLeadersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsLeadersByIdRequest':  // {UpdateLdlmsV2GroupsLeadersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2GroupsLeadersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2GroupsLeadersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupLeadersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional) 

            try {
                // Update associated group leader users for a group
                array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupLeadersApi.createLdlmsV2GroupsLeadersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupLeadersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2GroupsLeadersById($id, $updateLdlmsV2GroupsLeadersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupLeadersApi->createLdlmsV2GroupsLeadersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupLeadersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupLeadersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsLeadersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsLeadersByIdRequest->new(); # UpdateLdlmsV2GroupsLeadersByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2GroupsLeadersById(id => $id, updateLdlmsV2GroupsLeadersByIdRequest => $updateLdlmsV2GroupsLeadersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupLeadersApi->createLdlmsV2GroupsLeadersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupLeadersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsLeadersByIdRequest =  # UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional)

try:
    # Update associated group leader users for a group
    api_response = api_instance.create_ldlms_v2_groups_leaders_by_id(id, updateLdlmsV2GroupsLeadersByIdRequest=updateLdlmsV2GroupsLeadersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupLeadersApi->createLdlmsV2GroupsLeadersById: %s\n" % e)
extern crate GroupLeadersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest

    let mut context = GroupLeadersApi::Context::default();
    let result = client.createLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Delete associated group leader users for a group

Removes group leader users from a specific group.


/learndash/v1/ldlms/v2/groups/{id}/leaders

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/leaders?user_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupLeadersApi;

import java.io.File;
import java.util.*;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] userIds = ; // array[Integer] | Group Leader User IDs to remove from Group

        try {
            array[delete_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsLeadersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#deleteLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final array[Integer] userIds = new array[Integer](); // array[Integer] | Group Leader User IDs to remove from Group

try {
    final result = await api_instance.deleteLdlmsV2GroupsLeadersById(id, userIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2GroupsLeadersById: $e\n');
}

import org.openapitools.client.api.GroupLeadersApi;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] userIds = ; // array[Integer] | Group Leader User IDs to remove from Group

        try {
            array[delete_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsLeadersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#deleteLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupLeadersApi *apiInstance = [[GroupLeadersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
array[Integer] *userIds = ; // Group Leader User IDs to remove from Group (optional) (default to null)

// Delete associated group leader users for a group
[apiInstance deleteLdlmsV2GroupsLeadersByIdWith:id
    userIds:userIds
              completionHandler: ^(array[delete_ldlms_v2_groups_leaders_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupLeadersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'userIds':  // {array[Integer]} Group Leader User IDs to remove from Group
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2GroupsLeadersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2GroupsLeadersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupLeadersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var userIds = new array[Integer](); // array[Integer] | Group Leader User IDs to remove from Group (optional)  (default to null)

            try {
                // Delete associated group leader users for a group
                array[delete_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsLeadersById(id, userIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupLeadersApi.deleteLdlmsV2GroupsLeadersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupLeadersApi();
$id = 56; // Integer | Group ID
$userIds = ; // array[Integer] | Group Leader User IDs to remove from Group

try {
    $result = $api_instance->deleteLdlmsV2GroupsLeadersById($id, $userIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupLeadersApi->deleteLdlmsV2GroupsLeadersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupLeadersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupLeadersApi->new();
my $id = 56; # Integer | Group ID
my $userIds = []; # array[Integer] | Group Leader User IDs to remove from Group

eval {
    my $result = $api_instance->deleteLdlmsV2GroupsLeadersById(id => $id, userIds => $userIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupLeadersApi->deleteLdlmsV2GroupsLeadersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupLeadersApi()
id = 56 # Integer | Group ID (default to null)
userIds =  # array[Integer] | Group Leader User IDs to remove from Group (optional) (default to null)

try:
    # Delete associated group leader users for a group
    api_response = api_instance.delete_ldlms_v2_groups_leaders_by_id(id, userIds=userIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupLeadersApi->deleteLdlmsV2GroupsLeadersById: %s\n" % e)
extern crate GroupLeadersApi;

pub fn main() {
    let id = 56; // Integer
    let userIds = ; // array[Integer]

    let mut context = GroupLeadersApi::Context::default();
    let result = client.deleteLdlmsV2GroupsLeadersById(id, userIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
user_ids
array[Integer]
Group Leader User IDs to remove from Group

Responses


Get associated group leader users for a group

Retrieves the group leader users for a specific group.


/learndash/v1/ldlms/v2/groups/{id}/leaders

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/leaders?context=view&page=1&per_page=10&search=search_example&exclude=[]&include=[]&offset=56&order=asc&orderby=name&slug=&roles=&capabilities=&who=who_example&has_published_posts=&search_columns=[]"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupLeadersApi;

import java.io.File;
import java.util.*;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsLeadersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#getLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by user attribute.
final array[String] slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs.
final array[String] roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
final array[String] capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
final String who = new String(); // String | Limit result set to users who are considered authors.
final array[String] hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.

try {
    final result = await api_instance.getLdlmsV2GroupsLeadersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2GroupsLeadersById: $e\n');
}

import org.openapitools.client.api.GroupLeadersApi;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsLeadersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#getLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupLeadersApi *apiInstance = [[GroupLeadersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = name; // Sort collection by user attribute. (optional) (default to name)
array[String] *slug = ; // Limit result set to users with one or more specific slugs. (optional) (default to null)
array[String] *roles = ; // Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
array[String] *capabilities = ; // Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
String *who = who_example; // Limit result set to users who are considered authors. (optional) (default to null)
array[String] *hasPublishedPosts = ; // Limit result set to users who have published posts. (optional) (default to null)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])

// Get associated group leader users for a group
[apiInstance getLdlmsV2GroupsLeadersByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    exclude:exclude
    include:include
    offset:offset
    order:order
    orderby:orderby
    slug:slug
    roles:roles
    capabilities:capabilities
    who:who
    hasPublishedPosts:hasPublishedPosts
    searchColumns:searchColumns
              completionHandler: ^(array[LDLMS_v2_User] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupLeadersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': name, // {String} Sort collection by user attribute.
  'slug': , // {array[String]} Limit result set to users with one or more specific slugs.
  'roles': , // {array[String]} Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
  'capabilities': , // {array[String]} Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
  'who': who_example, // {String} Limit result set to users who are considered authors.
  'hasPublishedPosts': , // {array[String]} Limit result set to users who have published posts.
  'searchColumns': [] // {array[String]} Array of column names to be searched.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2GroupsLeadersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2GroupsLeadersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupLeadersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = name;  // String | Sort collection by user attribute. (optional)  (default to name)
            var slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs. (optional)  (default to null)
            var roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional)  (default to null)
            var capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional)  (default to null)
            var who = who_example;  // String | Limit result set to users who are considered authors. (optional)  (default to null)
            var hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts. (optional)  (default to null)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])

            try {
                // Get associated group leader users for a group
                array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsLeadersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupLeadersApi.getLdlmsV2GroupsLeadersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupLeadersApi();
$id = 56; // Integer | Group ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = name; // String | Sort collection by user attribute.
$slug = ; // array[String] | Limit result set to users with one or more specific slugs.
$roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
$capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
$who = who_example; // String | Limit result set to users who are considered authors.
$hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
$searchColumns = []; // array[String] | Array of column names to be searched.

try {
    $result = $api_instance->getLdlmsV2GroupsLeadersById($id, $context, $page, $perPage, $search, $exclude, $include, $offset, $order, $orderby, $slug, $roles, $capabilities, $who, $hasPublishedPosts, $searchColumns);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupLeadersApi->getLdlmsV2GroupsLeadersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupLeadersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupLeadersApi->new();
my $id = 56; # Integer | Group ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = name; # String | Sort collection by user attribute.
my $slug = []; # array[String] | Limit result set to users with one or more specific slugs.
my $roles = []; # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
my $capabilities = []; # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
my $who = who_example; # String | Limit result set to users who are considered authors.
my $hasPublishedPosts = []; # array[String] | Limit result set to users who have published posts.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.

eval {
    my $result = $api_instance->getLdlmsV2GroupsLeadersById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, exclude => $exclude, include => $include, offset => $offset, order => $order, orderby => $orderby, slug => $slug, roles => $roles, capabilities => $capabilities, who => $who, hasPublishedPosts => $hasPublishedPosts, searchColumns => $searchColumns);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupLeadersApi->getLdlmsV2GroupsLeadersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupLeadersApi()
id = 56 # Integer | Group ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = name # String | Sort collection by user attribute. (optional) (default to name)
slug =  # array[String] | Limit result set to users with one or more specific slugs. (optional) (default to null)
roles =  # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
capabilities =  # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
who = who_example # String | Limit result set to users who are considered authors. (optional) (default to null)
hasPublishedPosts =  # array[String] | Limit result set to users who have published posts. (optional) (default to null)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])

try:
    # Get associated group leader users for a group
    api_response = api_instance.get_ldlms_v2_groups_leaders_by_id(id, context=context, page=page, perPage=perPage, search=search, exclude=exclude, include=include, offset=offset, order=order, orderby=orderby, slug=slug, roles=roles, capabilities=capabilities, who=who, hasPublishedPosts=hasPublishedPosts, searchColumns=searchColumns)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupLeadersApi->getLdlmsV2GroupsLeadersById: %s\n" % e)
extern crate GroupLeadersApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = name; // String
    let slug = ; // array[String]
    let roles = ; // array[String]
    let capabilities = ; // array[String]
    let who = who_example; // String
    let hasPublishedPosts = ; // array[String]
    let searchColumns = []; // array[String]

    let mut context = GroupLeadersApi::Context::default();
    let result = client.getLdlmsV2GroupsLeadersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by user attribute.
slug
array[String]
Limit result set to users with one or more specific slugs.
roles
array[String]
Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
capabilities
array[String]
Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
who
String
Limit result set to users who are considered authors.
has_published_posts
array[String]
Limit result set to users who have published posts.
search_columns
array[String]
Array of column names to be searched.

Responses


Update associated group leader users for a group

Adds group leader users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/leaders

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/leaders" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupLeadersApi;

import java.io.File;
import java.util.*;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#patchLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2GroupsLeadersById: $e\n');
}

import org.openapitools.client.api.GroupLeadersApi;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#patchLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupLeadersApi *apiInstance = [[GroupLeadersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsLeadersByIdRequest *updateLdlmsV2GroupsLeadersByIdRequest = ; //  (optional)

// Update associated group leader users for a group
[apiInstance patchLdlmsV2GroupsLeadersByIdWith:id
    updateLdlmsV2GroupsLeadersByIdRequest:updateLdlmsV2GroupsLeadersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupLeadersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsLeadersByIdRequest':  // {UpdateLdlmsV2GroupsLeadersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2GroupsLeadersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2GroupsLeadersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupLeadersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional) 

            try {
                // Update associated group leader users for a group
                array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupLeadersApi.patchLdlmsV2GroupsLeadersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupLeadersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2GroupsLeadersById($id, $updateLdlmsV2GroupsLeadersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupLeadersApi->patchLdlmsV2GroupsLeadersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupLeadersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupLeadersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsLeadersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsLeadersByIdRequest->new(); # UpdateLdlmsV2GroupsLeadersByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2GroupsLeadersById(id => $id, updateLdlmsV2GroupsLeadersByIdRequest => $updateLdlmsV2GroupsLeadersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupLeadersApi->patchLdlmsV2GroupsLeadersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupLeadersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsLeadersByIdRequest =  # UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional)

try:
    # Update associated group leader users for a group
    api_response = api_instance.patch_ldlms_v2_groups_leaders_by_id(id, updateLdlmsV2GroupsLeadersByIdRequest=updateLdlmsV2GroupsLeadersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupLeadersApi->patchLdlmsV2GroupsLeadersById: %s\n" % e)
extern crate GroupLeadersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest

    let mut context = GroupLeadersApi::Context::default();
    let result = client.patchLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Update associated group leader users for a group

Adds group leader users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/leaders

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/leaders" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupLeadersApi;

import java.io.File;
import java.util.*;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#updateLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2GroupsLeadersById: $e\n');
}

import org.openapitools.client.api.GroupLeadersApi;

public class GroupLeadersApiExample {
    public static void main(String[] args) {
        GroupLeadersApi apiInstance = new GroupLeadersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsLeadersByIdRequest updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupLeadersApi#updateLdlmsV2GroupsLeadersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupLeadersApi *apiInstance = [[GroupLeadersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsLeadersByIdRequest *updateLdlmsV2GroupsLeadersByIdRequest = ; //  (optional)

// Update associated group leader users for a group
[apiInstance updateLdlmsV2GroupsLeadersByIdWith:id
    updateLdlmsV2GroupsLeadersByIdRequest:updateLdlmsV2GroupsLeadersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupLeadersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsLeadersByIdRequest':  // {UpdateLdlmsV2GroupsLeadersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2GroupsLeadersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2GroupsLeadersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupLeadersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsLeadersByIdRequest = new UpdateLdlmsV2GroupsLeadersByIdRequest(); // UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional) 

            try {
                // Update associated group leader users for a group
                array[update_ldlms_v2_groups_leaders_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupLeadersApi.updateLdlmsV2GroupsLeadersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupLeadersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2GroupsLeadersById($id, $updateLdlmsV2GroupsLeadersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupLeadersApi->updateLdlmsV2GroupsLeadersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupLeadersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupLeadersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsLeadersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsLeadersByIdRequest->new(); # UpdateLdlmsV2GroupsLeadersByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2GroupsLeadersById(id => $id, updateLdlmsV2GroupsLeadersByIdRequest => $updateLdlmsV2GroupsLeadersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupLeadersApi->updateLdlmsV2GroupsLeadersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupLeadersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsLeadersByIdRequest =  # UpdateLdlmsV2GroupsLeadersByIdRequest |  (optional)

try:
    # Update associated group leader users for a group
    api_response = api_instance.update_ldlms_v2_groups_leaders_by_id(id, updateLdlmsV2GroupsLeadersByIdRequest=updateLdlmsV2GroupsLeadersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupLeadersApi->updateLdlmsV2GroupsLeadersById: %s\n" % e)
extern crate GroupLeadersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsLeadersByIdRequest = ; // UpdateLdlmsV2GroupsLeadersByIdRequest

    let mut context = GroupLeadersApi::Context::default();
    let result = client.updateLdlmsV2GroupsLeadersById(id, updateLdlmsV2GroupsLeadersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Group Users

Update associated users for a group

Adds users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/users

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupUsersApi;

import java.io.File;
import java.util.*;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#createLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2GroupsUsersById: $e\n');
}

import org.openapitools.client.api.GroupUsersApi;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#createLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupUsersApi *apiInstance = [[GroupUsersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsUsersByIdRequest *updateLdlmsV2GroupsUsersByIdRequest = ; //  (optional)

// Update associated users for a group
[apiInstance createLdlmsV2GroupsUsersByIdWith:id
    updateLdlmsV2GroupsUsersByIdRequest:updateLdlmsV2GroupsUsersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_users_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupUsersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsUsersByIdRequest':  // {UpdateLdlmsV2GroupsUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2GroupsUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2GroupsUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupUsersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a group
                array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.createLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupUsersApi.createLdlmsV2GroupsUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupUsersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2GroupsUsersById($id, $updateLdlmsV2GroupsUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupUsersApi->createLdlmsV2GroupsUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupUsersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsUsersByIdRequest->new(); # UpdateLdlmsV2GroupsUsersByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2GroupsUsersById(id => $id, updateLdlmsV2GroupsUsersByIdRequest => $updateLdlmsV2GroupsUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupUsersApi->createLdlmsV2GroupsUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupUsersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsUsersByIdRequest =  # UpdateLdlmsV2GroupsUsersByIdRequest |  (optional)

try:
    # Update associated users for a group
    api_response = api_instance.create_ldlms_v2_groups_users_by_id(id, updateLdlmsV2GroupsUsersByIdRequest=updateLdlmsV2GroupsUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupUsersApi->createLdlmsV2GroupsUsersById: %s\n" % e)
extern crate GroupUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest

    let mut context = GroupUsersApi::Context::default();
    let result = client.createLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Delete associated users for a group

Removes users from a specific group.


/learndash/v1/ldlms/v2/groups/{id}/users

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/users?user_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupUsersApi;

import java.io.File;
import java.util.*;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] userIds = ; // array[Integer] | User IDs to remove from Group.

        try {
            array[delete_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsUsersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#deleteLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final array[Integer] userIds = new array[Integer](); // array[Integer] | User IDs to remove from Group.

try {
    final result = await api_instance.deleteLdlmsV2GroupsUsersById(id, userIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2GroupsUsersById: $e\n');
}

import org.openapitools.client.api.GroupUsersApi;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        array[Integer] userIds = ; // array[Integer] | User IDs to remove from Group.

        try {
            array[delete_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsUsersById(id, userIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#deleteLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupUsersApi *apiInstance = [[GroupUsersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
array[Integer] *userIds = ; // User IDs to remove from Group. (optional) (default to null)

// Delete associated users for a group
[apiInstance deleteLdlmsV2GroupsUsersByIdWith:id
    userIds:userIds
              completionHandler: ^(array[delete_ldlms_v2_groups_users_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupUsersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'userIds':  // {array[Integer]} User IDs to remove from Group.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2GroupsUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2GroupsUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupUsersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var userIds = new array[Integer](); // array[Integer] | User IDs to remove from Group. (optional)  (default to null)

            try {
                // Delete associated users for a group
                array[delete_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2GroupsUsersById(id, userIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupUsersApi.deleteLdlmsV2GroupsUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupUsersApi();
$id = 56; // Integer | Group ID
$userIds = ; // array[Integer] | User IDs to remove from Group.

try {
    $result = $api_instance->deleteLdlmsV2GroupsUsersById($id, $userIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupUsersApi->deleteLdlmsV2GroupsUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupUsersApi->new();
my $id = 56; # Integer | Group ID
my $userIds = []; # array[Integer] | User IDs to remove from Group.

eval {
    my $result = $api_instance->deleteLdlmsV2GroupsUsersById(id => $id, userIds => $userIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupUsersApi->deleteLdlmsV2GroupsUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupUsersApi()
id = 56 # Integer | Group ID (default to null)
userIds =  # array[Integer] | User IDs to remove from Group. (optional) (default to null)

try:
    # Delete associated users for a group
    api_response = api_instance.delete_ldlms_v2_groups_users_by_id(id, userIds=userIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupUsersApi->deleteLdlmsV2GroupsUsersById: %s\n" % e)
extern crate GroupUsersApi;

pub fn main() {
    let id = 56; // Integer
    let userIds = ; // array[Integer]

    let mut context = GroupUsersApi::Context::default();
    let result = client.deleteLdlmsV2GroupsUsersById(id, userIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
user_ids
array[Integer]
User IDs to remove from Group.

Responses


Get associated users for a group

Retrieves the users for a specific group.


/learndash/v1/ldlms/v2/groups/{id}/users

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/users?context=view&page=1&per_page=10&search=search_example&exclude=[]&include=[]&offset=56&order=asc&orderby=name&slug=&roles=&capabilities=&who=who_example&has_published_posts=&search_columns=[]"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupUsersApi;

import java.io.File;
import java.util.*;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#getLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by user attribute.
final array[String] slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs.
final array[String] roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
final array[String] capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
final String who = new String(); // String | Limit result set to users who are considered authors.
final array[String] hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.

try {
    final result = await api_instance.getLdlmsV2GroupsUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2GroupsUsersById: $e\n');
}

import org.openapitools.client.api.GroupUsersApi;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = name; // String | Sort collection by user attribute.
        array[String] slug = ; // array[String] | Limit result set to users with one or more specific slugs.
        array[String] roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
        array[String] capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
        String who = who_example; // String | Limit result set to users who are considered authors.
        array[String] hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.

        try {
            array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#getLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupUsersApi *apiInstance = [[GroupUsersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = name; // Sort collection by user attribute. (optional) (default to name)
array[String] *slug = ; // Limit result set to users with one or more specific slugs. (optional) (default to null)
array[String] *roles = ; // Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
array[String] *capabilities = ; // Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
String *who = who_example; // Limit result set to users who are considered authors. (optional) (default to null)
array[String] *hasPublishedPosts = ; // Limit result set to users who have published posts. (optional) (default to null)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])

// Get associated users for a group
[apiInstance getLdlmsV2GroupsUsersByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    exclude:exclude
    include:include
    offset:offset
    order:order
    orderby:orderby
    slug:slug
    roles:roles
    capabilities:capabilities
    who:who
    hasPublishedPosts:hasPublishedPosts
    searchColumns:searchColumns
              completionHandler: ^(array[LDLMS_v2_User] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupUsersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': name, // {String} Sort collection by user attribute.
  'slug': , // {array[String]} Limit result set to users with one or more specific slugs.
  'roles': , // {array[String]} Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
  'capabilities': , // {array[String]} Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
  'who': who_example, // {String} Limit result set to users who are considered authors.
  'hasPublishedPosts': , // {array[String]} Limit result set to users who have published posts.
  'searchColumns': [] // {array[String]} Array of column names to be searched.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2GroupsUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2GroupsUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupUsersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = name;  // String | Sort collection by user attribute. (optional)  (default to name)
            var slug = new array[String](); // array[String] | Limit result set to users with one or more specific slugs. (optional)  (default to null)
            var roles = new array[String](); // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional)  (default to null)
            var capabilities = new array[String](); // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional)  (default to null)
            var who = who_example;  // String | Limit result set to users who are considered authors. (optional)  (default to null)
            var hasPublishedPosts = new array[String](); // array[String] | Limit result set to users who have published posts. (optional)  (default to null)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])

            try {
                // Get associated users for a group
                array[LDLMS_v2_User] result = apiInstance.getLdlmsV2GroupsUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupUsersApi.getLdlmsV2GroupsUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupUsersApi();
$id = 56; // Integer | Group ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = name; // String | Sort collection by user attribute.
$slug = ; // array[String] | Limit result set to users with one or more specific slugs.
$roles = ; // array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
$capabilities = ; // array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
$who = who_example; // String | Limit result set to users who are considered authors.
$hasPublishedPosts = ; // array[String] | Limit result set to users who have published posts.
$searchColumns = []; // array[String] | Array of column names to be searched.

try {
    $result = $api_instance->getLdlmsV2GroupsUsersById($id, $context, $page, $perPage, $search, $exclude, $include, $offset, $order, $orderby, $slug, $roles, $capabilities, $who, $hasPublishedPosts, $searchColumns);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupUsersApi->getLdlmsV2GroupsUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupUsersApi->new();
my $id = 56; # Integer | Group ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = name; # String | Sort collection by user attribute.
my $slug = []; # array[String] | Limit result set to users with one or more specific slugs.
my $roles = []; # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
my $capabilities = []; # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
my $who = who_example; # String | Limit result set to users who are considered authors.
my $hasPublishedPosts = []; # array[String] | Limit result set to users who have published posts.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.

eval {
    my $result = $api_instance->getLdlmsV2GroupsUsersById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, exclude => $exclude, include => $include, offset => $offset, order => $order, orderby => $orderby, slug => $slug, roles => $roles, capabilities => $capabilities, who => $who, hasPublishedPosts => $hasPublishedPosts, searchColumns => $searchColumns);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupUsersApi->getLdlmsV2GroupsUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupUsersApi()
id = 56 # Integer | Group ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = name # String | Sort collection by user attribute. (optional) (default to name)
slug =  # array[String] | Limit result set to users with one or more specific slugs. (optional) (default to null)
roles =  # array[String] | Limit result set to users matching at least one specific role provided. Accepts csv list or single role. (optional) (default to null)
capabilities =  # array[String] | Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability. (optional) (default to null)
who = who_example # String | Limit result set to users who are considered authors. (optional) (default to null)
hasPublishedPosts =  # array[String] | Limit result set to users who have published posts. (optional) (default to null)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])

try:
    # Get associated users for a group
    api_response = api_instance.get_ldlms_v2_groups_users_by_id(id, context=context, page=page, perPage=perPage, search=search, exclude=exclude, include=include, offset=offset, order=order, orderby=orderby, slug=slug, roles=roles, capabilities=capabilities, who=who, hasPublishedPosts=hasPublishedPosts, searchColumns=searchColumns)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupUsersApi->getLdlmsV2GroupsUsersById: %s\n" % e)
extern crate GroupUsersApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = name; // String
    let slug = ; // array[String]
    let roles = ; // array[String]
    let capabilities = ; // array[String]
    let who = who_example; // String
    let hasPublishedPosts = ; // array[String]
    let searchColumns = []; // array[String]

    let mut context = GroupUsersApi::Context::default();
    let result = client.getLdlmsV2GroupsUsersById(id, context, page, perPage, search, exclude, include, offset, order, orderby, slug, roles, capabilities, who, hasPublishedPosts, searchColumns, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by user attribute.
slug
array[String]
Limit result set to users with one or more specific slugs.
roles
array[String]
Limit result set to users matching at least one specific role provided. Accepts csv list or single role.
capabilities
array[String]
Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.
who
String
Limit result set to users who are considered authors.
has_published_posts
array[String]
Limit result set to users who have published posts.
search_columns
array[String]
Array of column names to be searched.

Responses


Update associated users for a group

Adds users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/users

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupUsersApi;

import java.io.File;
import java.util.*;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#patchLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2GroupsUsersById: $e\n');
}

import org.openapitools.client.api.GroupUsersApi;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#patchLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupUsersApi *apiInstance = [[GroupUsersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsUsersByIdRequest *updateLdlmsV2GroupsUsersByIdRequest = ; //  (optional)

// Update associated users for a group
[apiInstance patchLdlmsV2GroupsUsersByIdWith:id
    updateLdlmsV2GroupsUsersByIdRequest:updateLdlmsV2GroupsUsersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_users_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupUsersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsUsersByIdRequest':  // {UpdateLdlmsV2GroupsUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2GroupsUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2GroupsUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupUsersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a group
                array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.patchLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupUsersApi.patchLdlmsV2GroupsUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupUsersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2GroupsUsersById($id, $updateLdlmsV2GroupsUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupUsersApi->patchLdlmsV2GroupsUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupUsersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsUsersByIdRequest->new(); # UpdateLdlmsV2GroupsUsersByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2GroupsUsersById(id => $id, updateLdlmsV2GroupsUsersByIdRequest => $updateLdlmsV2GroupsUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupUsersApi->patchLdlmsV2GroupsUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupUsersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsUsersByIdRequest =  # UpdateLdlmsV2GroupsUsersByIdRequest |  (optional)

try:
    # Update associated users for a group
    api_response = api_instance.patch_ldlms_v2_groups_users_by_id(id, updateLdlmsV2GroupsUsersByIdRequest=updateLdlmsV2GroupsUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupUsersApi->patchLdlmsV2GroupsUsersById: %s\n" % e)
extern crate GroupUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest

    let mut context = GroupUsersApi::Context::default();
    let result = client.patchLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Update associated users for a group

Adds users to a specific group.


/learndash/v1/ldlms/v2/groups/{id}/users

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}/users" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupUsersApi;

import java.io.File;
import java.util.*;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#updateLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2GroupsUsersById: $e\n');
}

import org.openapitools.client.api.GroupUsersApi;

public class GroupUsersApiExample {
    public static void main(String[] args) {
        GroupUsersApi apiInstance = new GroupUsersApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsUsersByIdRequest updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

        try {
            array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupUsersApi#updateLdlmsV2GroupsUsersById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupUsersApi *apiInstance = [[GroupUsersApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsUsersByIdRequest *updateLdlmsV2GroupsUsersByIdRequest = ; //  (optional)

// Update associated users for a group
[apiInstance updateLdlmsV2GroupsUsersByIdWith:id
    updateLdlmsV2GroupsUsersByIdRequest:updateLdlmsV2GroupsUsersByIdRequest
              completionHandler: ^(array[update_ldlms_v2_groups_users_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupUsersApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsUsersByIdRequest':  // {UpdateLdlmsV2GroupsUsersByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2GroupsUsersById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2GroupsUsersByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupUsersApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsUsersByIdRequest = new UpdateLdlmsV2GroupsUsersByIdRequest(); // UpdateLdlmsV2GroupsUsersByIdRequest |  (optional) 

            try {
                // Update associated users for a group
                array[update_ldlms_v2_groups_users_by_id_200_response_inner] result = apiInstance.updateLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupUsersApi.updateLdlmsV2GroupsUsersById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupUsersApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2GroupsUsersById($id, $updateLdlmsV2GroupsUsersByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupUsersApi->updateLdlmsV2GroupsUsersById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupUsersApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupUsersApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsUsersByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsUsersByIdRequest->new(); # UpdateLdlmsV2GroupsUsersByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2GroupsUsersById(id => $id, updateLdlmsV2GroupsUsersByIdRequest => $updateLdlmsV2GroupsUsersByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupUsersApi->updateLdlmsV2GroupsUsersById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupUsersApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsUsersByIdRequest =  # UpdateLdlmsV2GroupsUsersByIdRequest |  (optional)

try:
    # Update associated users for a group
    api_response = api_instance.update_ldlms_v2_groups_users_by_id(id, updateLdlmsV2GroupsUsersByIdRequest=updateLdlmsV2GroupsUsersByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupUsersApi->updateLdlmsV2GroupsUsersById: %s\n" % e)
extern crate GroupUsersApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsUsersByIdRequest = ; // UpdateLdlmsV2GroupsUsersByIdRequest

    let mut context = GroupUsersApi::Context::default();
    let result = client.updateLdlmsV2GroupsUsersById(id, updateLdlmsV2GroupsUsersByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Groups

Create a new group

Creates a new group. Requires group data in the request body including title, content, and other group-specific fields.


/learndash/v1/ldlms/v2/groups

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        CreateLdlmsV2GroupsRequest createLdlmsV2GroupsRequest = ; // CreateLdlmsV2GroupsRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2Groups(createLdlmsV2GroupsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#createLdlmsV2Groups");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2GroupsRequest createLdlmsV2GroupsRequest = new CreateLdlmsV2GroupsRequest(); // CreateLdlmsV2GroupsRequest | 

try {
    final result = await api_instance.createLdlmsV2Groups(createLdlmsV2GroupsRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Groups: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        CreateLdlmsV2GroupsRequest createLdlmsV2GroupsRequest = ; // CreateLdlmsV2GroupsRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2Groups(createLdlmsV2GroupsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#createLdlmsV2Groups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
CreateLdlmsV2GroupsRequest *createLdlmsV2GroupsRequest = ; //  (optional)

// Create a new group
[apiInstance createLdlmsV2GroupsWith:createLdlmsV2GroupsRequest
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var opts = {
  'createLdlmsV2GroupsRequest':  // {CreateLdlmsV2GroupsRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Groups(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2GroupsExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var createLdlmsV2GroupsRequest = new CreateLdlmsV2GroupsRequest(); // CreateLdlmsV2GroupsRequest |  (optional) 

            try {
                // Create a new group
                array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2Groups(createLdlmsV2GroupsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.createLdlmsV2Groups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$createLdlmsV2GroupsRequest = ; // CreateLdlmsV2GroupsRequest | 

try {
    $result = $api_instance->createLdlmsV2Groups($createLdlmsV2GroupsRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->createLdlmsV2Groups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $createLdlmsV2GroupsRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2GroupsRequest->new(); # CreateLdlmsV2GroupsRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Groups(createLdlmsV2GroupsRequest => $createLdlmsV2GroupsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->createLdlmsV2Groups: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
createLdlmsV2GroupsRequest =  # CreateLdlmsV2GroupsRequest |  (optional)

try:
    # Create a new group
    api_response = api_instance.create_ldlms_v2_groups(createLdlmsV2GroupsRequest=createLdlmsV2GroupsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->createLdlmsV2Groups: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let createLdlmsV2GroupsRequest = ; // CreateLdlmsV2GroupsRequest

    let mut context = GroupsApi::Context::default();
    let result = client.createLdlmsV2Groups(createLdlmsV2GroupsRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a group

Partially updates an existing group. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/groups/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#createLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2GroupsById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#createLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsByIdRequest *updateLdlmsV2GroupsByIdRequest = ; //  (optional)

// Update a group
[apiInstance createLdlmsV2GroupsByIdWith:id
    updateLdlmsV2GroupsByIdRequest:updateLdlmsV2GroupsByIdRequest
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsByIdRequest':  // {UpdateLdlmsV2GroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2GroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2GroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest |  (optional) 

            try {
                // Update a group
                array[LDLMS_v2_Group] result = apiInstance.createLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.createLdlmsV2GroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2GroupsById($id, $updateLdlmsV2GroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->createLdlmsV2GroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsByIdRequest->new(); # UpdateLdlmsV2GroupsByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2GroupsById(id => $id, updateLdlmsV2GroupsByIdRequest => $updateLdlmsV2GroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->createLdlmsV2GroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsByIdRequest =  # UpdateLdlmsV2GroupsByIdRequest |  (optional)

try:
    # Update a group
    api_response = api_instance.create_ldlms_v2_groups_by_id(id, updateLdlmsV2GroupsByIdRequest=updateLdlmsV2GroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->createLdlmsV2GroupsById: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest

    let mut context = GroupsApi::Context::default();
    let result = client.createLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Delete a group

Deletes a group permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/groups/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Group] result = apiInstance.deleteLdlmsV2GroupsById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#deleteLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2GroupsById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2GroupsById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Group] result = apiInstance.deleteLdlmsV2GroupsById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#deleteLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
Integer *id = 56; // Group ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a group
[apiInstance deleteLdlmsV2GroupsByIdWith:id
    force:force
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var id = 56; // {Integer} Group ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2GroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2GroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var id = 56;  // Integer | Group ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a group
                array[LDLMS_v2_Group] result = apiInstance.deleteLdlmsV2GroupsById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.deleteLdlmsV2GroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$id = 56; // Integer | Group ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2GroupsById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->deleteLdlmsV2GroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $id = 56; # Integer | Group ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2GroupsById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->deleteLdlmsV2GroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
id = 56 # Integer | Group ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a group
    api_response = api_instance.delete_ldlms_v2_groups_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->deleteLdlmsV2GroupsById: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = GroupsApi::Context::default();
    let result = client.deleteLdlmsV2GroupsById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific group

Returns a specific group by ID. Returns the complete group data including all fields and metadata.


/learndash/v1/ldlms/v2/groups/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2GroupsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID

try {
    final result = await api_instance.getLdlmsV2GroupsById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2GroupsById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2GroupsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
Integer *id = 56; // Group ID (default to null)

// Get a specific group
[apiInstance getLdlmsV2GroupsByIdWith:id
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var id = 56; // {Integer} Group ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2GroupsById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2GroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var id = 56;  // Integer | Group ID (default to null)

            try {
                // Get a specific group
                array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2GroupsById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.getLdlmsV2GroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$id = 56; // Integer | Group ID

try {
    $result = $api_instance->getLdlmsV2GroupsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->getLdlmsV2GroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $id = 56; # Integer | Group ID

eval {
    my $result = $api_instance->getLdlmsV2GroupsById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->getLdlmsV2GroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
id = 56 # Integer | Group ID (default to null)

try:
    # Get a specific group
    api_response = api_instance.get_ldlms_v2_groups_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->getLdlmsV2GroupsById: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = GroupsApi::Context::default();
    let result = client.getLdlmsV2GroupsById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required

Responses


Get groups

Returns a list of groups. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/groups

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&parent=[]&parent_exclude=[]&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&categories=Object&categories_exclude=Object&tags=Object&tags_exclude=Object&ld_group_category=Object&ld_group_category_exclude=Object&ld_group_tag=Object&ld_group_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.listLdlmsV2Groups(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#listLdlmsV2Groups");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[Integer] parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs.
final array[Integer] parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
final Object categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
final Object tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
final Object tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
final Object ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
final Object ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    final result = await api_instance.listLdlmsV2Groups(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Groups: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.listLdlmsV2Groups(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#listLdlmsV2Groups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[Integer] *parent = []; // Limit result set to items with particular parent IDs. (optional) (default to [])
array[Integer] *parentExclude = []; // Limit result set to all items except those of a particular parent ID. (optional) (default to [])
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *categories = Object; // Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *categoriesExclude = Object; // Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *tags = Object; // Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *tagsExclude = Object; // Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *ldGroupCategory = Object; // Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupTag = Object; // Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
Object *ldGroupTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

// Get groups
[apiInstance listLdlmsV2GroupsWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    parent:parent
    parentExclude:parentExclude
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    categories:categories
    categoriesExclude:categoriesExclude
    tags:tags
    tagsExclude:tagsExclude
    ldGroupCategory:ldGroupCategory
    ldGroupCategoryExclude:ldGroupCategoryExclude
    ldGroupTag:ldGroupTag
    ldGroupTagExclude:ldGroupTagExclude
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'parent': [], // {array[Integer]} Limit result set to items with particular parent IDs.
  'parentExclude': [], // {array[Integer]} Limit result set to all items except those of a particular parent ID.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'categories': Object, // {Object} Limit result set to items with specific terms assigned in the categories taxonomy.
  'categoriesExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the categories taxonomy.
  'tags': Object, // {Object} Limit result set to items with specific terms assigned in the tags taxonomy.
  'tagsExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the tags taxonomy.
  'ldGroupCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
  'ldGroupTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Groups(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2GroupsExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs. (optional)  (default to [])
            var parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID. (optional)  (default to [])
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)
            var ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)

            try {
                // Get groups
                array[LDLMS_v2_Group] result = apiInstance.listLdlmsV2Groups(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.listLdlmsV2Groups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
$parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
$categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
$tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
$tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
$ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
$ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
$ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
$ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    $result = $api_instance->listLdlmsV2Groups($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $searchSemantics, $offset, $order, $orderby, $parent, $parentExclude, $searchColumns, $slug, $status, $taxRelation, $categories, $categoriesExclude, $tags, $tagsExclude, $ldGroupCategory, $ldGroupCategoryExclude, $ldGroupTag, $ldGroupTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->listLdlmsV2Groups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $parent = [[]]; # array[Integer] | Limit result set to items with particular parent IDs.
my $parentExclude = [[]]; # array[Integer] | Limit result set to all items except those of a particular parent ID.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $categories = Object; # Object | Limit result set to items with specific terms assigned in the categories taxonomy.
my $categoriesExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
my $tags = Object; # Object | Limit result set to items with specific terms assigned in the tags taxonomy.
my $tagsExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
my $ldGroupCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
my $ldGroupTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

eval {
    my $result = $api_instance->listLdlmsV2Groups(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, parent => $parent, parentExclude => $parentExclude, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, categories => $categories, categoriesExclude => $categoriesExclude, tags => $tags, tagsExclude => $tagsExclude, ldGroupCategory => $ldGroupCategory, ldGroupCategoryExclude => $ldGroupCategoryExclude, ldGroupTag => $ldGroupTag, ldGroupTagExclude => $ldGroupTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->listLdlmsV2Groups: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
parent = [] # array[Integer] | Limit result set to items with particular parent IDs. (optional) (default to [])
parentExclude = [] # array[Integer] | Limit result set to all items except those of a particular parent ID. (optional) (default to [])
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
categories = Object # Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
categoriesExclude = Object # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
tags = Object # Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
tagsExclude = Object # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
ldGroupCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupTag = Object # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
ldGroupTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

try:
    # Get groups
    api_response = api_instance.list_ldlms_v2_groups(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, parent=parent, parentExclude=parentExclude, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, categories=categories, categoriesExclude=categoriesExclude, tags=tags, tagsExclude=tagsExclude, ldGroupCategory=ldGroupCategory, ldGroupCategoryExclude=ldGroupCategoryExclude, ldGroupTag=ldGroupTag, ldGroupTagExclude=ldGroupTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->listLdlmsV2Groups: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let parent = []; // array[Integer]
    let parentExclude = []; // array[Integer]
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let categories = Object; // Object
    let categoriesExclude = Object; // Object
    let tags = Object; // Object
    let tagsExclude = Object; // Object
    let ldGroupCategory = Object; // Object
    let ldGroupCategoryExclude = Object; // Object
    let ldGroupTag = Object; // Object
    let ldGroupTagExclude = Object; // Object

    let mut context = GroupsApi::Context::default();
    let result = client.listLdlmsV2Groups(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
parent
array[Integer]
Limit result set to items with particular parent IDs.
parent_exclude
array[Integer]
Limit result set to all items except those of a particular parent ID.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
categories
Object
Limit result set to items with specific terms assigned in the categories taxonomy.
categories_exclude
Object
Limit result set to items except those with specific terms assigned in the categories taxonomy.
tags
Object
Limit result set to items with specific terms assigned in the tags taxonomy.
tags_exclude
Object
Limit result set to items except those with specific terms assigned in the tags taxonomy.
ld_group_category
Object
Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
ld_group_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
ld_group_tag
Object
Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
ld_group_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

Responses


Update a group

Partially updates an existing group. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/groups/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.patchLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#patchLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2GroupsById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.patchLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#patchLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsByIdRequest *updateLdlmsV2GroupsByIdRequest = ; //  (optional)

// Update a group
[apiInstance patchLdlmsV2GroupsByIdWith:id
    updateLdlmsV2GroupsByIdRequest:updateLdlmsV2GroupsByIdRequest
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsByIdRequest':  // {UpdateLdlmsV2GroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2GroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2GroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest |  (optional) 

            try {
                // Update a group
                array[LDLMS_v2_Group] result = apiInstance.patchLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.patchLdlmsV2GroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2GroupsById($id, $updateLdlmsV2GroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->patchLdlmsV2GroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsByIdRequest->new(); # UpdateLdlmsV2GroupsByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2GroupsById(id => $id, updateLdlmsV2GroupsByIdRequest => $updateLdlmsV2GroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->patchLdlmsV2GroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsByIdRequest =  # UpdateLdlmsV2GroupsByIdRequest |  (optional)

try:
    # Update a group
    api_response = api_instance.patch_ldlms_v2_groups_by_id(id, updateLdlmsV2GroupsByIdRequest=updateLdlmsV2GroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->patchLdlmsV2GroupsById: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest

    let mut context = GroupsApi::Context::default();
    let result = client.patchLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Update a group

Updates an existing group. Requires the complete group data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/groups/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/groups/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.updateLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#updateLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Group ID
final UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2GroupsById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        Integer id = 56; // Integer | Group ID
        UpdateLdlmsV2GroupsByIdRequest updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

        try {
            array[LDLMS_v2_Group] result = apiInstance.updateLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#updateLdlmsV2GroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
Integer *id = 56; // Group ID (default to null)
UpdateLdlmsV2GroupsByIdRequest *updateLdlmsV2GroupsByIdRequest = ; //  (optional)

// Update a group
[apiInstance updateLdlmsV2GroupsByIdWith:id
    updateLdlmsV2GroupsByIdRequest:updateLdlmsV2GroupsByIdRequest
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.GroupsApi()
var id = 56; // {Integer} Group ID
var opts = {
  'updateLdlmsV2GroupsByIdRequest':  // {UpdateLdlmsV2GroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2GroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2GroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var id = 56;  // Integer | Group ID (default to null)
            var updateLdlmsV2GroupsByIdRequest = new UpdateLdlmsV2GroupsByIdRequest(); // UpdateLdlmsV2GroupsByIdRequest |  (optional) 

            try {
                // Update a group
                array[LDLMS_v2_Group] result = apiInstance.updateLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.updateLdlmsV2GroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$id = 56; // Integer | Group ID
$updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2GroupsById($id, $updateLdlmsV2GroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->updateLdlmsV2GroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $id = 56; # Integer | Group ID
my $updateLdlmsV2GroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2GroupsByIdRequest->new(); # UpdateLdlmsV2GroupsByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2GroupsById(id => $id, updateLdlmsV2GroupsByIdRequest => $updateLdlmsV2GroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->updateLdlmsV2GroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
id = 56 # Integer | Group ID (default to null)
updateLdlmsV2GroupsByIdRequest =  # UpdateLdlmsV2GroupsByIdRequest |  (optional)

try:
    # Update a group
    api_response = api_instance.update_ldlms_v2_groups_by_id(id, updateLdlmsV2GroupsByIdRequest=updateLdlmsV2GroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->updateLdlmsV2GroupsById: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2GroupsByIdRequest = ; // UpdateLdlmsV2GroupsByIdRequest

    let mut context = GroupsApi::Context::default();
    let result = client.updateLdlmsV2GroupsById(id, updateLdlmsV2GroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Group ID
Required
Request body

Responses


Lessons

Create a new lesson

Creates a new lesson. Requires lesson data in the request body including title, content, and other lesson-specific fields.


/learndash/v1/ldlms/v2/sfwd-lessons

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        CreateLdlmsV2LessonsRequest createLdlmsV2LessonsRequest = ; // CreateLdlmsV2LessonsRequest | 

        try {
            array[LDLMS_v2_Lesson] result = apiInstance.createLdlmsV2Lessons(createLdlmsV2LessonsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#createLdlmsV2Lessons");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2LessonsRequest createLdlmsV2LessonsRequest = new CreateLdlmsV2LessonsRequest(); // CreateLdlmsV2LessonsRequest | 

try {
    final result = await api_instance.createLdlmsV2Lessons(createLdlmsV2LessonsRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Lessons: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        CreateLdlmsV2LessonsRequest createLdlmsV2LessonsRequest = ; // CreateLdlmsV2LessonsRequest | 

        try {
            array[LDLMS_v2_Lesson] result = apiInstance.createLdlmsV2Lessons(createLdlmsV2LessonsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#createLdlmsV2Lessons");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
CreateLdlmsV2LessonsRequest *createLdlmsV2LessonsRequest = ; //  (optional)

// Create a new lesson
[apiInstance createLdlmsV2LessonsWith:createLdlmsV2LessonsRequest
              completionHandler: ^(array[LDLMS_v2_Lesson] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var opts = {
  'createLdlmsV2LessonsRequest':  // {CreateLdlmsV2LessonsRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Lessons(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2LessonsExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var createLdlmsV2LessonsRequest = new CreateLdlmsV2LessonsRequest(); // CreateLdlmsV2LessonsRequest |  (optional) 

            try {
                // Create a new lesson
                array[LDLMS_v2_Lesson] result = apiInstance.createLdlmsV2Lessons(createLdlmsV2LessonsRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.createLdlmsV2Lessons: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$createLdlmsV2LessonsRequest = ; // CreateLdlmsV2LessonsRequest | 

try {
    $result = $api_instance->createLdlmsV2Lessons($createLdlmsV2LessonsRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->createLdlmsV2Lessons: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $createLdlmsV2LessonsRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2LessonsRequest->new(); # CreateLdlmsV2LessonsRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Lessons(createLdlmsV2LessonsRequest => $createLdlmsV2LessonsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->createLdlmsV2Lessons: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
createLdlmsV2LessonsRequest =  # CreateLdlmsV2LessonsRequest |  (optional)

try:
    # Create a new lesson
    api_response = api_instance.create_ldlms_v2_lessons(createLdlmsV2LessonsRequest=createLdlmsV2LessonsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->createLdlmsV2Lessons: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let createLdlmsV2LessonsRequest = ; // CreateLdlmsV2LessonsRequest

    let mut context = LessonsApi::Context::default();
    let result = client.createLdlmsV2Lessons(createLdlmsV2LessonsRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a lesson

Partially updates an existing lesson. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-lessons/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.createLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#createLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Lesson ID
final UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2LessonsById: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.createLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#createLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
Integer *id = 56; // Lesson ID (default to null)
UpdateLdlmsV2LessonsByIdRequest *updateLdlmsV2LessonsByIdRequest = ; //  (optional)

// Update a lesson
[apiInstance createLdlmsV2LessonsByIdWith:id
    updateLdlmsV2LessonsByIdRequest:updateLdlmsV2LessonsByIdRequest
              completionHandler: ^(LDLMS_v2_Lesson output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var id = 56; // {Integer} Lesson ID
var opts = {
  'updateLdlmsV2LessonsByIdRequest':  // {UpdateLdlmsV2LessonsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2LessonsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2LessonsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var id = 56;  // Integer | Lesson ID (default to null)
            var updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest |  (optional) 

            try {
                // Update a lesson
                LDLMS_v2_Lesson result = apiInstance.createLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.createLdlmsV2LessonsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$id = 56; // Integer | Lesson ID
$updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2LessonsById($id, $updateLdlmsV2LessonsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->createLdlmsV2LessonsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $id = 56; # Integer | Lesson ID
my $updateLdlmsV2LessonsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2LessonsByIdRequest->new(); # UpdateLdlmsV2LessonsByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2LessonsById(id => $id, updateLdlmsV2LessonsByIdRequest => $updateLdlmsV2LessonsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->createLdlmsV2LessonsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
id = 56 # Integer | Lesson ID (default to null)
updateLdlmsV2LessonsByIdRequest =  # UpdateLdlmsV2LessonsByIdRequest |  (optional)

try:
    # Update a lesson
    api_response = api_instance.create_ldlms_v2_lessons_by_id(id, updateLdlmsV2LessonsByIdRequest=updateLdlmsV2LessonsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->createLdlmsV2LessonsById: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest

    let mut context = LessonsApi::Context::default();
    let result = client.createLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Lesson ID
Required
Request body

Responses


Delete a lesson

Deletes a lesson permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/sfwd-lessons/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Lesson result = apiInstance.deleteLdlmsV2LessonsById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#deleteLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Lesson ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2LessonsById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2LessonsById: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Lesson result = apiInstance.deleteLdlmsV2LessonsById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#deleteLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
Integer *id = 56; // Lesson ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a lesson
[apiInstance deleteLdlmsV2LessonsByIdWith:id
    force:force
              completionHandler: ^(LDLMS_v2_Lesson output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var id = 56; // {Integer} Lesson ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2LessonsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2LessonsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var id = 56;  // Integer | Lesson ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a lesson
                LDLMS_v2_Lesson result = apiInstance.deleteLdlmsV2LessonsById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.deleteLdlmsV2LessonsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$id = 56; // Integer | Lesson ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2LessonsById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->deleteLdlmsV2LessonsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $id = 56; # Integer | Lesson ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2LessonsById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->deleteLdlmsV2LessonsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
id = 56 # Integer | Lesson ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a lesson
    api_response = api_instance.delete_ldlms_v2_lessons_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->deleteLdlmsV2LessonsById: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = LessonsApi::Context::default();
    let result = client.deleteLdlmsV2LessonsById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Lesson ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific lesson

Returns a specific lesson by ID. Returns the complete lesson data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-lessons/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID

        try {
            LDLMS_v2_Lesson result = apiInstance.getLdlmsV2LessonsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#getLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Lesson ID

try {
    final result = await api_instance.getLdlmsV2LessonsById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2LessonsById: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID

        try {
            LDLMS_v2_Lesson result = apiInstance.getLdlmsV2LessonsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#getLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
Integer *id = 56; // Lesson ID (default to null)

// Get a specific lesson
[apiInstance getLdlmsV2LessonsByIdWith:id
              completionHandler: ^(LDLMS_v2_Lesson output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var id = 56; // {Integer} Lesson ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2LessonsById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2LessonsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var id = 56;  // Integer | Lesson ID (default to null)

            try {
                // Get a specific lesson
                LDLMS_v2_Lesson result = apiInstance.getLdlmsV2LessonsById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.getLdlmsV2LessonsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$id = 56; // Integer | Lesson ID

try {
    $result = $api_instance->getLdlmsV2LessonsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->getLdlmsV2LessonsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $id = 56; # Integer | Lesson ID

eval {
    my $result = $api_instance->getLdlmsV2LessonsById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->getLdlmsV2LessonsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
id = 56 # Integer | Lesson ID (default to null)

try:
    # Get a specific lesson
    api_response = api_instance.get_ldlms_v2_lessons_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->getLdlmsV2LessonsById: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = LessonsApi::Context::default();
    let result = client.getLdlmsV2LessonsById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Lesson ID
Required

Responses


Get lessons

Returns a list of lessons. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/sfwd-lessons

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_lesson_category=Object&ld_lesson_category_exclude=Object&ld_lesson_tag=Object&ld_lesson_tag_exclude=Object&course=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldLessonCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
        Object ldLessonCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
        Object ldLessonTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
        Object ldLessonTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.

        try {
            array[LDLMS_v2_Lesson] result = apiInstance.listLdlmsV2Lessons(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldLessonCategory, ldLessonCategoryExclude, ldLessonTag, ldLessonTagExclude, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#listLdlmsV2Lessons");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldLessonCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
final Object ldLessonCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
final Object ldLessonTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
final Object ldLessonTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
final Integer course = new Integer(); // Integer | Limit results to be within a specific Course. Required for non-admin users.

try {
    final result = await api_instance.listLdlmsV2Lessons(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldLessonCategory, ldLessonCategoryExclude, ldLessonTag, ldLessonTagExclude, course);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Lessons: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldLessonCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
        Object ldLessonCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
        Object ldLessonTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
        Object ldLessonTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.

        try {
            array[LDLMS_v2_Lesson] result = apiInstance.listLdlmsV2Lessons(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldLessonCategory, ldLessonCategoryExclude, ldLessonTag, ldLessonTagExclude, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#listLdlmsV2Lessons");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldLessonCategory = Object; // Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy. (optional) (default to null)
Object *ldLessonCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy. (optional) (default to null)
Object *ldLessonTag = Object; // Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy. (optional) (default to null)
Object *ldLessonTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy. (optional) (default to null)
Integer *course = 56; // Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)

// Get lessons
[apiInstance listLdlmsV2LessonsWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldLessonCategory:ldLessonCategory
    ldLessonCategoryExclude:ldLessonCategoryExclude
    ldLessonTag:ldLessonTag
    ldLessonTagExclude:ldLessonTagExclude
    course:course
              completionHandler: ^(array[LDLMS_v2_Lesson] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldLessonCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
  'ldLessonCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
  'ldLessonTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
  'ldLessonTagExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
  'course': 56 // {Integer} Limit results to be within a specific Course. Required for non-admin users.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Lessons(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2LessonsExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldLessonCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy. (optional)  (default to null)
            var ldLessonCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy. (optional)  (default to null)
            var ldLessonTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy. (optional)  (default to null)
            var ldLessonTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy. (optional)  (default to null)
            var course = 56;  // Integer | Limit results to be within a specific Course. Required for non-admin users. (optional)  (default to null)

            try {
                // Get lessons
                array[LDLMS_v2_Lesson] result = apiInstance.listLdlmsV2Lessons(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldLessonCategory, ldLessonCategoryExclude, ldLessonTag, ldLessonTagExclude, course);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.listLdlmsV2Lessons: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldLessonCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
$ldLessonCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
$ldLessonTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
$ldLessonTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
$course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.

try {
    $result = $api_instance->listLdlmsV2Lessons($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldLessonCategory, $ldLessonCategoryExclude, $ldLessonTag, $ldLessonTagExclude, $course);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->listLdlmsV2Lessons: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldLessonCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
my $ldLessonCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
my $ldLessonTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
my $ldLessonTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
my $course = 56; # Integer | Limit results to be within a specific Course. Required for non-admin users.

eval {
    my $result = $api_instance->listLdlmsV2Lessons(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldLessonCategory => $ldLessonCategory, ldLessonCategoryExclude => $ldLessonCategoryExclude, ldLessonTag => $ldLessonTag, ldLessonTagExclude => $ldLessonTagExclude, course => $course);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->listLdlmsV2Lessons: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldLessonCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy. (optional) (default to null)
ldLessonCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy. (optional) (default to null)
ldLessonTag = Object # Object | Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy. (optional) (default to null)
ldLessonTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy. (optional) (default to null)
course = 56 # Integer | Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)

try:
    # Get lessons
    api_response = api_instance.list_ldlms_v2_lessons(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldLessonCategory=ldLessonCategory, ldLessonCategoryExclude=ldLessonCategoryExclude, ldLessonTag=ldLessonTag, ldLessonTagExclude=ldLessonTagExclude, course=course)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->listLdlmsV2Lessons: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldLessonCategory = Object; // Object
    let ldLessonCategoryExclude = Object; // Object
    let ldLessonTag = Object; // Object
    let ldLessonTagExclude = Object; // Object
    let course = 56; // Integer

    let mut context = LessonsApi::Context::default();
    let result = client.listLdlmsV2Lessons(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldLessonCategory, ldLessonCategoryExclude, ldLessonTag, ldLessonTagExclude, course, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_lesson_category
Object
Limit result set to items with specific terms assigned in the ld_lesson_category taxonomy.
ld_lesson_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_lesson_category taxonomy.
ld_lesson_tag
Object
Limit result set to items with specific terms assigned in the ld_lesson_tag taxonomy.
ld_lesson_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_lesson_tag taxonomy.
course
Integer
Limit results to be within a specific Course. Required for non-admin users.

Responses


Update a lesson

Partially updates an existing lesson. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-lessons/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.patchLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#patchLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Lesson ID
final UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2LessonsById: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.patchLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#patchLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
Integer *id = 56; // Lesson ID (default to null)
UpdateLdlmsV2LessonsByIdRequest *updateLdlmsV2LessonsByIdRequest = ; //  (optional)

// Update a lesson
[apiInstance patchLdlmsV2LessonsByIdWith:id
    updateLdlmsV2LessonsByIdRequest:updateLdlmsV2LessonsByIdRequest
              completionHandler: ^(LDLMS_v2_Lesson output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var id = 56; // {Integer} Lesson ID
var opts = {
  'updateLdlmsV2LessonsByIdRequest':  // {UpdateLdlmsV2LessonsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2LessonsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2LessonsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var id = 56;  // Integer | Lesson ID (default to null)
            var updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest |  (optional) 

            try {
                // Update a lesson
                LDLMS_v2_Lesson result = apiInstance.patchLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.patchLdlmsV2LessonsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$id = 56; // Integer | Lesson ID
$updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2LessonsById($id, $updateLdlmsV2LessonsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->patchLdlmsV2LessonsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $id = 56; # Integer | Lesson ID
my $updateLdlmsV2LessonsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2LessonsByIdRequest->new(); # UpdateLdlmsV2LessonsByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2LessonsById(id => $id, updateLdlmsV2LessonsByIdRequest => $updateLdlmsV2LessonsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->patchLdlmsV2LessonsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
id = 56 # Integer | Lesson ID (default to null)
updateLdlmsV2LessonsByIdRequest =  # UpdateLdlmsV2LessonsByIdRequest |  (optional)

try:
    # Update a lesson
    api_response = api_instance.patch_ldlms_v2_lessons_by_id(id, updateLdlmsV2LessonsByIdRequest=updateLdlmsV2LessonsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->patchLdlmsV2LessonsById: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest

    let mut context = LessonsApi::Context::default();
    let result = client.patchLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Lesson ID
Required
Request body

Responses


Update a lesson

Updates an existing lesson. Requires the complete lesson data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-lessons/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-lessons/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LessonsApi;

import java.io.File;
import java.util.*;

public class LessonsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.updateLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#updateLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Lesson ID
final UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2LessonsById: $e\n');
}

import org.openapitools.client.api.LessonsApi;

public class LessonsApiExample {
    public static void main(String[] args) {
        LessonsApi apiInstance = new LessonsApi();
        Integer id = 56; // Integer | Lesson ID
        UpdateLdlmsV2LessonsByIdRequest updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

        try {
            LDLMS_v2_Lesson result = apiInstance.updateLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LessonsApi#updateLdlmsV2LessonsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
LessonsApi *apiInstance = [[LessonsApi alloc] init];
Integer *id = 56; // Lesson ID (default to null)
UpdateLdlmsV2LessonsByIdRequest *updateLdlmsV2LessonsByIdRequest = ; //  (optional)

// Update a lesson
[apiInstance updateLdlmsV2LessonsByIdWith:id
    updateLdlmsV2LessonsByIdRequest:updateLdlmsV2LessonsByIdRequest
              completionHandler: ^(LDLMS_v2_Lesson output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.LessonsApi()
var id = 56; // {Integer} Lesson ID
var opts = {
  'updateLdlmsV2LessonsByIdRequest':  // {UpdateLdlmsV2LessonsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2LessonsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2LessonsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new LessonsApi();
            var id = 56;  // Integer | Lesson ID (default to null)
            var updateLdlmsV2LessonsByIdRequest = new UpdateLdlmsV2LessonsByIdRequest(); // UpdateLdlmsV2LessonsByIdRequest |  (optional) 

            try {
                // Update a lesson
                LDLMS_v2_Lesson result = apiInstance.updateLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LessonsApi.updateLdlmsV2LessonsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LessonsApi();
$id = 56; // Integer | Lesson ID
$updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2LessonsById($id, $updateLdlmsV2LessonsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LessonsApi->updateLdlmsV2LessonsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LessonsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LessonsApi->new();
my $id = 56; # Integer | Lesson ID
my $updateLdlmsV2LessonsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2LessonsByIdRequest->new(); # UpdateLdlmsV2LessonsByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2LessonsById(id => $id, updateLdlmsV2LessonsByIdRequest => $updateLdlmsV2LessonsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LessonsApi->updateLdlmsV2LessonsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.LessonsApi()
id = 56 # Integer | Lesson ID (default to null)
updateLdlmsV2LessonsByIdRequest =  # UpdateLdlmsV2LessonsByIdRequest |  (optional)

try:
    # Update a lesson
    api_response = api_instance.update_ldlms_v2_lessons_by_id(id, updateLdlmsV2LessonsByIdRequest=updateLdlmsV2LessonsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LessonsApi->updateLdlmsV2LessonsById: %s\n" % e)
extern crate LessonsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2LessonsByIdRequest = ; // UpdateLdlmsV2LessonsByIdRequest

    let mut context = LessonsApi::Context::default();
    let result = client.updateLdlmsV2LessonsById(id, updateLdlmsV2LessonsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Lesson ID
Required
Request body

Responses


Price Types

Get a specific price type

Returns a specific price type by its slug. A provided context will determine the fields present in the response.


/learndash/v1/ldlms/v2/price-types/{slug}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/price-types/{slug}?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PriceTypesApi;

import java.io.File;
import java.util.*;

public class PriceTypesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PriceTypesApi apiInstance = new PriceTypesApi();
        String slug = slug_example; // String | An alphanumeric identifier for the price type.
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            list_ldlms_v2_price_types_200_response_value result = apiInstance.getLdlmsV2PriceTypesBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceTypesApi#getLdlmsV2PriceTypesBySlug");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String slug = new String(); // String | An alphanumeric identifier for the price type.
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.getLdlmsV2PriceTypesBySlug(slug, context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2PriceTypesBySlug: $e\n');
}

import org.openapitools.client.api.PriceTypesApi;

public class PriceTypesApiExample {
    public static void main(String[] args) {
        PriceTypesApi apiInstance = new PriceTypesApi();
        String slug = slug_example; // String | An alphanumeric identifier for the price type.
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            list_ldlms_v2_price_types_200_response_value result = apiInstance.getLdlmsV2PriceTypesBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceTypesApi#getLdlmsV2PriceTypesBySlug");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PriceTypesApi *apiInstance = [[PriceTypesApi alloc] init];
String *slug = slug_example; // An alphanumeric identifier for the price type. (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Get a specific price type
[apiInstance getLdlmsV2PriceTypesBySlugWith:slug
    context:context
              completionHandler: ^(list_ldlms_v2_price_types_200_response_value output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.PriceTypesApi()
var slug = slug_example; // {String} An alphanumeric identifier for the price type.
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2PriceTypesBySlug(slug, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2PriceTypesBySlugExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PriceTypesApi();
            var slug = slug_example;  // String | An alphanumeric identifier for the price type. (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Get a specific price type
                list_ldlms_v2_price_types_200_response_value result = apiInstance.getLdlmsV2PriceTypesBySlug(slug, context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PriceTypesApi.getLdlmsV2PriceTypesBySlug: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PriceTypesApi();
$slug = slug_example; // String | An alphanumeric identifier for the price type.
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->getLdlmsV2PriceTypesBySlug($slug, $context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceTypesApi->getLdlmsV2PriceTypesBySlug: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PriceTypesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PriceTypesApi->new();
my $slug = slug_example; # String | An alphanumeric identifier for the price type.
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->getLdlmsV2PriceTypesBySlug(slug => $slug, context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PriceTypesApi->getLdlmsV2PriceTypesBySlug: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PriceTypesApi()
slug = slug_example # String | An alphanumeric identifier for the price type. (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Get a specific price type
    api_response = api_instance.get_ldlms_v2_price_types_by_slug(slug, context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PriceTypesApi->getLdlmsV2PriceTypesBySlug: %s\n" % e)
extern crate PriceTypesApi;

pub fn main() {
    let slug = slug_example; // String
    let context = view; // String

    let mut context = PriceTypesApi::Context::default();
    let result = client.getLdlmsV2PriceTypesBySlug(slug, context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
slug*
String
An alphanumeric identifier for the price type.
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Get price types

Returns a list of price types. A provided context will determine the fields present in the response.


/learndash/v1/ldlms/v2/price-types

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/price-types?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PriceTypesApi;

import java.io.File;
import java.util.*;

public class PriceTypesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PriceTypesApi apiInstance = new PriceTypesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_price_types_200_response_value] result = apiInstance.listLdlmsV2PriceTypes(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceTypesApi#listLdlmsV2PriceTypes");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.listLdlmsV2PriceTypes(context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2PriceTypes: $e\n');
}

import org.openapitools.client.api.PriceTypesApi;

public class PriceTypesApiExample {
    public static void main(String[] args) {
        PriceTypesApi apiInstance = new PriceTypesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_price_types_200_response_value] result = apiInstance.listLdlmsV2PriceTypes(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceTypesApi#listLdlmsV2PriceTypes");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PriceTypesApi *apiInstance = [[PriceTypesApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Get price types
[apiInstance listLdlmsV2PriceTypesWith:context
              completionHandler: ^(map['String', list_ldlms_v2_price_types_200_response_value] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.PriceTypesApi()
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2PriceTypes(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2PriceTypesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PriceTypesApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Get price types
                map['String', list_ldlms_v2_price_types_200_response_value] result = apiInstance.listLdlmsV2PriceTypes(context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PriceTypesApi.listLdlmsV2PriceTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PriceTypesApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->listLdlmsV2PriceTypes($context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PriceTypesApi->listLdlmsV2PriceTypes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PriceTypesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PriceTypesApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->listLdlmsV2PriceTypes(context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PriceTypesApi->listLdlmsV2PriceTypes: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PriceTypesApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Get price types
    api_response = api_instance.list_ldlms_v2_price_types(context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PriceTypesApi->listLdlmsV2PriceTypes: %s\n" % e)
extern crate PriceTypesApi;

pub fn main() {
    let context = view; // String

    let mut context = PriceTypesApi::Context::default();
    let result = client.listLdlmsV2PriceTypes(context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Profile

Remove a payment card

Removes a payment card for the current user.


/learndash/v1/learndash/v1/profile/remove-card

Usage and SDK Samples

curl -X DELETE \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/profile/remove-card?card_id=cardId_example&gateway_id=gatewayId_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProfileApi;

import java.io.File;
import java.util.*;

public class ProfileApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ProfileApi apiInstance = new ProfileApi();
        String cardId = cardId_example; // String | The ID of the card to remove.
        String gatewayId = gatewayId_example; // String | The ID of the payment gateway.

        try {
            delete_learndash_v1_profile_remove_card_200_response result = apiInstance.deleteLearndashV1ProfileRemoveCard(cardId, gatewayId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProfileApi#deleteLearndashV1ProfileRemoveCard");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String cardId = new String(); // String | The ID of the card to remove.
final String gatewayId = new String(); // String | The ID of the payment gateway.

try {
    final result = await api_instance.deleteLearndashV1ProfileRemoveCard(cardId, gatewayId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLearndashV1ProfileRemoveCard: $e\n');
}

import org.openapitools.client.api.ProfileApi;

public class ProfileApiExample {
    public static void main(String[] args) {
        ProfileApi apiInstance = new ProfileApi();
        String cardId = cardId_example; // String | The ID of the card to remove.
        String gatewayId = gatewayId_example; // String | The ID of the payment gateway.

        try {
            delete_learndash_v1_profile_remove_card_200_response result = apiInstance.deleteLearndashV1ProfileRemoveCard(cardId, gatewayId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProfileApi#deleteLearndashV1ProfileRemoveCard");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
ProfileApi *apiInstance = [[ProfileApi alloc] init];
String *cardId = cardId_example; // The ID of the card to remove. (optional) (default to null)
String *gatewayId = gatewayId_example; // The ID of the payment gateway. (optional) (default to null)

// Remove a payment card
[apiInstance deleteLearndashV1ProfileRemoveCardWith:cardId
    gatewayId:gatewayId
              completionHandler: ^(delete_learndash_v1_profile_remove_card_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.ProfileApi()
var opts = {
  'cardId': cardId_example, // {String} The ID of the card to remove.
  'gatewayId': gatewayId_example // {String} The ID of the payment gateway.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLearndashV1ProfileRemoveCard(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLearndashV1ProfileRemoveCardExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ProfileApi();
            var cardId = cardId_example;  // String | The ID of the card to remove. (optional)  (default to null)
            var gatewayId = gatewayId_example;  // String | The ID of the payment gateway. (optional)  (default to null)

            try {
                // Remove a payment card
                delete_learndash_v1_profile_remove_card_200_response result = apiInstance.deleteLearndashV1ProfileRemoveCard(cardId, gatewayId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProfileApi.deleteLearndashV1ProfileRemoveCard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProfileApi();
$cardId = cardId_example; // String | The ID of the card to remove.
$gatewayId = gatewayId_example; // String | The ID of the payment gateway.

try {
    $result = $api_instance->deleteLearndashV1ProfileRemoveCard($cardId, $gatewayId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfileApi->deleteLearndashV1ProfileRemoveCard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProfileApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProfileApi->new();
my $cardId = cardId_example; # String | The ID of the card to remove.
my $gatewayId = gatewayId_example; # String | The ID of the payment gateway.

eval {
    my $result = $api_instance->deleteLearndashV1ProfileRemoveCard(cardId => $cardId, gatewayId => $gatewayId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProfileApi->deleteLearndashV1ProfileRemoveCard: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ProfileApi()
cardId = cardId_example # String | The ID of the card to remove. (optional) (default to null)
gatewayId = gatewayId_example # String | The ID of the payment gateway. (optional) (default to null)

try:
    # Remove a payment card
    api_response = api_instance.delete_learndash_v1_profile_remove_card(cardId=cardId, gatewayId=gatewayId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProfileApi->deleteLearndashV1ProfileRemoveCard: %s\n" % e)
extern crate ProfileApi;

pub fn main() {
    let cardId = cardId_example; // String
    let gatewayId = gatewayId_example; // String

    let mut context = ProfileApi::Context::default();
    let result = client.deleteLearndashV1ProfileRemoveCard(cardId, gatewayId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
card_id
String
The ID of the card to remove.
gateway_id
String
The ID of the payment gateway.

Responses


Progress

Retrieve progress statuses for a given type

Retrieves the progress statuses for a given type.


/learndash/v1/learndash/v1/progress-status/{post_type}

Usage and SDK Samples

curl -X GET \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/progress-status/{post_type}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgressApi;

import java.io.File;
import java.util.*;

public class ProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ProgressApi apiInstance = new ProgressApi();
        String postType = postType_example; // String | The post type slug to retrieve statuses for.

        try {
            get_learndash_v1_progress_status_by_post_type_200_response result = apiInstance.getLearndashV1ProgressStatusByPostType(postType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#getLearndashV1ProgressStatusByPostType");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String postType = new String(); // String | The post type slug to retrieve statuses for.

try {
    final result = await api_instance.getLearndashV1ProgressStatusByPostType(postType);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLearndashV1ProgressStatusByPostType: $e\n');
}

import org.openapitools.client.api.ProgressApi;

public class ProgressApiExample {
    public static void main(String[] args) {
        ProgressApi apiInstance = new ProgressApi();
        String postType = postType_example; // String | The post type slug to retrieve statuses for.

        try {
            get_learndash_v1_progress_status_by_post_type_200_response result = apiInstance.getLearndashV1ProgressStatusByPostType(postType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#getLearndashV1ProgressStatusByPostType");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
ProgressApi *apiInstance = [[ProgressApi alloc] init];
String *postType = postType_example; // The post type slug to retrieve statuses for. (default to null)

// Retrieve progress statuses for a given type
[apiInstance getLearndashV1ProgressStatusByPostTypeWith:postType
              completionHandler: ^(get_learndash_v1_progress_status_by_post_type_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.ProgressApi()
var postType = postType_example; // {String} The post type slug to retrieve statuses for.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLearndashV1ProgressStatusByPostType(postType, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLearndashV1ProgressStatusByPostTypeExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ProgressApi();
            var postType = postType_example;  // String | The post type slug to retrieve statuses for. (default to null)

            try {
                // Retrieve progress statuses for a given type
                get_learndash_v1_progress_status_by_post_type_200_response result = apiInstance.getLearndashV1ProgressStatusByPostType(postType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgressApi.getLearndashV1ProgressStatusByPostType: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProgressApi();
$postType = postType_example; // String | The post type slug to retrieve statuses for.

try {
    $result = $api_instance->getLearndashV1ProgressStatusByPostType($postType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostType: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProgressApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProgressApi->new();
my $postType = postType_example; # String | The post type slug to retrieve statuses for.

eval {
    my $result = $api_instance->getLearndashV1ProgressStatusByPostType(postType => $postType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostType: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ProgressApi()
postType = postType_example # String | The post type slug to retrieve statuses for. (default to null)

try:
    # Retrieve progress statuses for a given type
    api_response = api_instance.get_learndash_v1_progress_status_by_post_type(postType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostType: %s\n" % e)
extern crate ProgressApi;

pub fn main() {
    let postType = postType_example; // String

    let mut context = ProgressApi::Context::default();
    let result = client.getLearndashV1ProgressStatusByPostType(postType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
post_type*
String
The post type slug to retrieve statuses for.
Required

Responses


Retrieve a specific progress status

Retrieves a specific progress status.


/learndash/v1/learndash/v1/progress-status/{post_type}/{slug}

Usage and SDK Samples

curl -X GET \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/progress-status/{post_type}/{slug}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgressApi;

import java.io.File;
import java.util.*;

public class ProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ProgressApi apiInstance = new ProgressApi();
        String postType = postType_example; // String | The post type slug to retrieve statuses for.
        String slug = slug_example; // String | The status slug to retrieve the status display name for.

        try {
            get_learndash_v1_progress_status_by_post_type_and_slug_200_response result = apiInstance.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#getLearndashV1ProgressStatusByPostTypeAndSlug");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String postType = new String(); // String | The post type slug to retrieve statuses for.
final String slug = new String(); // String | The status slug to retrieve the status display name for.

try {
    final result = await api_instance.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLearndashV1ProgressStatusByPostTypeAndSlug: $e\n');
}

import org.openapitools.client.api.ProgressApi;

public class ProgressApiExample {
    public static void main(String[] args) {
        ProgressApi apiInstance = new ProgressApi();
        String postType = postType_example; // String | The post type slug to retrieve statuses for.
        String slug = slug_example; // String | The status slug to retrieve the status display name for.

        try {
            get_learndash_v1_progress_status_by_post_type_and_slug_200_response result = apiInstance.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#getLearndashV1ProgressStatusByPostTypeAndSlug");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
ProgressApi *apiInstance = [[ProgressApi alloc] init];
String *postType = postType_example; // The post type slug to retrieve statuses for. (default to null)
String *slug = slug_example; // The status slug to retrieve the status display name for. (default to null)

// Retrieve a specific progress status
[apiInstance getLearndashV1ProgressStatusByPostTypeAndSlugWith:postType
    slug:slug
              completionHandler: ^(get_learndash_v1_progress_status_by_post_type_and_slug_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.ProgressApi()
var postType = postType_example; // {String} The post type slug to retrieve statuses for.
var slug = slug_example; // {String} The status slug to retrieve the status display name for.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLearndashV1ProgressStatusByPostTypeAndSlugExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ProgressApi();
            var postType = postType_example;  // String | The post type slug to retrieve statuses for. (default to null)
            var slug = slug_example;  // String | The status slug to retrieve the status display name for. (default to null)

            try {
                // Retrieve a specific progress status
                get_learndash_v1_progress_status_by_post_type_and_slug_200_response result = apiInstance.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgressApi.getLearndashV1ProgressStatusByPostTypeAndSlug: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProgressApi();
$postType = postType_example; // String | The post type slug to retrieve statuses for.
$slug = slug_example; // String | The status slug to retrieve the status display name for.

try {
    $result = $api_instance->getLearndashV1ProgressStatusByPostTypeAndSlug($postType, $slug);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostTypeAndSlug: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProgressApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProgressApi->new();
my $postType = postType_example; # String | The post type slug to retrieve statuses for.
my $slug = slug_example; # String | The status slug to retrieve the status display name for.

eval {
    my $result = $api_instance->getLearndashV1ProgressStatusByPostTypeAndSlug(postType => $postType, slug => $slug);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostTypeAndSlug: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ProgressApi()
postType = postType_example # String | The post type slug to retrieve statuses for. (default to null)
slug = slug_example # String | The status slug to retrieve the status display name for. (default to null)

try:
    # Retrieve a specific progress status
    api_response = api_instance.get_learndash_v1_progress_status_by_post_type_and_slug(postType, slug)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgressApi->getLearndashV1ProgressStatusByPostTypeAndSlug: %s\n" % e)
extern crate ProgressApi;

pub fn main() {
    let postType = postType_example; // String
    let slug = slug_example; // String

    let mut context = ProgressApi::Context::default();
    let result = client.getLearndashV1ProgressStatusByPostTypeAndSlug(postType, slug, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
post_type*
String
The post type slug to retrieve statuses for.
Required
slug*
String
The status slug to retrieve the status display name for.
Required

Responses


Retrieve progress status types

Retrieves the different progress status types.


/learndash/v1/learndash/v1/progress-status

Usage and SDK Samples

curl -X GET \
-H "Learndash-Experimental-Rest-Api: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/learndash/v1/progress-status"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgressApi;

import java.io.File;
import java.util.*;

public class ProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: experimentalAuth
        ApiKeyAuth experimentalAuth = (ApiKeyAuth) defaultClient.getAuthentication("experimentalAuth");
        experimentalAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //experimentalAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ProgressApi apiInstance = new ProgressApi();

        try {
            list_learndash_v1_progress_status_200_response result = apiInstance.listLearndashV1ProgressStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#listLearndashV1ProgressStatus");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.listLearndashV1ProgressStatus();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLearndashV1ProgressStatus: $e\n');
}

import org.openapitools.client.api.ProgressApi;

public class ProgressApiExample {
    public static void main(String[] args) {
        ProgressApi apiInstance = new ProgressApi();

        try {
            list_learndash_v1_progress_status_200_response result = apiInstance.listLearndashV1ProgressStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressApi#listLearndashV1ProgressStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: experimentalAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Learndash-Experimental-Rest-Api"];


// Create an instance of the API class
ProgressApi *apiInstance = [[ProgressApi alloc] init];

// Retrieve progress status types
[apiInstance listLearndashV1ProgressStatusWithCompletionHandler: 
              ^(list_learndash_v1_progress_status_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: experimentalAuth
var experimentalAuth = defaultClient.authentications['experimentalAuth'];
experimentalAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//experimentalAuth.apiKeyPrefix['Learndash-Experimental-Rest-Api'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.ProgressApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLearndashV1ProgressStatus(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLearndashV1ProgressStatusExample
    {
        public void main()
        {
            // Configure API key authorization: experimentalAuth
            Configuration.Default.ApiKey.Add("Learndash-Experimental-Rest-Api", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Learndash-Experimental-Rest-Api", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ProgressApi();

            try {
                // Retrieve progress status types
                list_learndash_v1_progress_status_200_response result = apiInstance.listLearndashV1ProgressStatus();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgressApi.listLearndashV1ProgressStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: experimentalAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Learndash-Experimental-Rest-Api', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Learndash-Experimental-Rest-Api', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProgressApi();

try {
    $result = $api_instance->listLearndashV1ProgressStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgressApi->listLearndashV1ProgressStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProgressApi;

# Configure API key authorization: experimentalAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Learndash-Experimental-Rest-Api'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Learndash-Experimental-Rest-Api'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProgressApi->new();

eval {
    my $result = $api_instance->listLearndashV1ProgressStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgressApi->listLearndashV1ProgressStatus: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: experimentalAuth
openapi_client.configuration.api_key['Learndash-Experimental-Rest-Api'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Learndash-Experimental-Rest-Api'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ProgressApi()

try:
    # Retrieve progress status types
    api_response = api_instance.list_learndash_v1_progress_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgressApi->listLearndashV1ProgressStatus: %s\n" % e)
extern crate ProgressApi;

pub fn main() {

    let mut context = ProgressApi::Context::default();
    let result = client.listLearndashV1ProgressStatus(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


Progress Statuses

Retrieve progress status

Retrieves the progress status.


/learndash/v1/ldlms/v2/progress-status/{slug}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/progress-status/{slug}?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgressStatusesApi;

import java.io.File;
import java.util.*;

public class ProgressStatusesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ProgressStatusesApi apiInstance = new ProgressStatusesApi();
        String slug = slug_example; // String | An alphanumeric identifier for the progress status.
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.getLdlmsV2ProgressStatusBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressStatusesApi#getLdlmsV2ProgressStatusBySlug");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String slug = new String(); // String | An alphanumeric identifier for the progress status.
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.getLdlmsV2ProgressStatusBySlug(slug, context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2ProgressStatusBySlug: $e\n');
}

import org.openapitools.client.api.ProgressStatusesApi;

public class ProgressStatusesApiExample {
    public static void main(String[] args) {
        ProgressStatusesApi apiInstance = new ProgressStatusesApi();
        String slug = slug_example; // String | An alphanumeric identifier for the progress status.
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.getLdlmsV2ProgressStatusBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressStatusesApi#getLdlmsV2ProgressStatusBySlug");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ProgressStatusesApi *apiInstance = [[ProgressStatusesApi alloc] init];
String *slug = slug_example; // An alphanumeric identifier for the progress status. (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Retrieve progress status
[apiInstance getLdlmsV2ProgressStatusBySlugWith:slug
    context:context
              completionHandler: ^(map['String', list_ldlms_v2_progress_status_200_response_value] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.ProgressStatusesApi()
var slug = slug_example; // {String} An alphanumeric identifier for the progress status.
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2ProgressStatusBySlug(slug, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2ProgressStatusBySlugExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ProgressStatusesApi();
            var slug = slug_example;  // String | An alphanumeric identifier for the progress status. (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Retrieve progress status
                map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.getLdlmsV2ProgressStatusBySlug(slug, context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgressStatusesApi.getLdlmsV2ProgressStatusBySlug: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProgressStatusesApi();
$slug = slug_example; // String | An alphanumeric identifier for the progress status.
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->getLdlmsV2ProgressStatusBySlug($slug, $context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgressStatusesApi->getLdlmsV2ProgressStatusBySlug: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProgressStatusesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProgressStatusesApi->new();
my $slug = slug_example; # String | An alphanumeric identifier for the progress status.
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->getLdlmsV2ProgressStatusBySlug(slug => $slug, context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgressStatusesApi->getLdlmsV2ProgressStatusBySlug: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ProgressStatusesApi()
slug = slug_example # String | An alphanumeric identifier for the progress status. (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Retrieve progress status
    api_response = api_instance.get_ldlms_v2_progress_status_by_slug(slug, context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgressStatusesApi->getLdlmsV2ProgressStatusBySlug: %s\n" % e)
extern crate ProgressStatusesApi;

pub fn main() {
    let slug = slug_example; // String
    let context = view; // String

    let mut context = ProgressStatusesApi::Context::default();
    let result = client.getLdlmsV2ProgressStatusBySlug(slug, context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
slug*
String
An alphanumeric identifier for the progress status.
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Retrieve progress statuses

Retrieves the progress statuses.


/learndash/v1/ldlms/v2/progress-status

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/progress-status?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgressStatusesApi;

import java.io.File;
import java.util.*;

public class ProgressStatusesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ProgressStatusesApi apiInstance = new ProgressStatusesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.listLdlmsV2ProgressStatus(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressStatusesApi#listLdlmsV2ProgressStatus");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.listLdlmsV2ProgressStatus(context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2ProgressStatus: $e\n');
}

import org.openapitools.client.api.ProgressStatusesApi;

public class ProgressStatusesApiExample {
    public static void main(String[] args) {
        ProgressStatusesApi apiInstance = new ProgressStatusesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.listLdlmsV2ProgressStatus(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgressStatusesApi#listLdlmsV2ProgressStatus");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ProgressStatusesApi *apiInstance = [[ProgressStatusesApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Retrieve progress statuses
[apiInstance listLdlmsV2ProgressStatusWith:context
              completionHandler: ^(map['String', list_ldlms_v2_progress_status_200_response_value] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.ProgressStatusesApi()
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2ProgressStatus(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2ProgressStatusExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ProgressStatusesApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Retrieve progress statuses
                map['String', list_ldlms_v2_progress_status_200_response_value] result = apiInstance.listLdlmsV2ProgressStatus(context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgressStatusesApi.listLdlmsV2ProgressStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProgressStatusesApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->listLdlmsV2ProgressStatus($context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgressStatusesApi->listLdlmsV2ProgressStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProgressStatusesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProgressStatusesApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->listLdlmsV2ProgressStatus(context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgressStatusesApi->listLdlmsV2ProgressStatus: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ProgressStatusesApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Retrieve progress statuses
    api_response = api_instance.list_ldlms_v2_progress_status(context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgressStatusesApi->listLdlmsV2ProgressStatus: %s\n" % e)
extern crate ProgressStatusesApi;

pub fn main() {
    let context = view; // String

    let mut context = ProgressStatusesApi::Context::default();
    let result = client.listLdlmsV2ProgressStatus(context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Question Types

Retrieve question type

Retrieves the question type.


/learndash/v1/ldlms/v2/question-types/{slug}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/question-types/{slug}?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionTypesApi;

import java.io.File;
import java.util.*;

public class QuestionTypesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        QuestionTypesApi apiInstance = new QuestionTypesApi();
        String slug = slug_example; // String | An alphanumeric slug for the question type
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.getLdlmsV2QuestionTypesBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionTypesApi#getLdlmsV2QuestionTypesBySlug");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String slug = new String(); // String | An alphanumeric slug for the question type
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.getLdlmsV2QuestionTypesBySlug(slug, context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuestionTypesBySlug: $e\n');
}

import org.openapitools.client.api.QuestionTypesApi;

public class QuestionTypesApiExample {
    public static void main(String[] args) {
        QuestionTypesApi apiInstance = new QuestionTypesApi();
        String slug = slug_example; // String | An alphanumeric slug for the question type
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.getLdlmsV2QuestionTypesBySlug(slug, context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionTypesApi#getLdlmsV2QuestionTypesBySlug");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
QuestionTypesApi *apiInstance = [[QuestionTypesApi alloc] init];
String *slug = slug_example; // An alphanumeric slug for the question type (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Retrieve question type
[apiInstance getLdlmsV2QuestionTypesBySlugWith:slug
    context:context
              completionHandler: ^(map['String', list_ldlms_v2_question_types_200_response_value] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionTypesApi()
var slug = slug_example; // {String} An alphanumeric slug for the question type
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuestionTypesBySlug(slug, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuestionTypesBySlugExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new QuestionTypesApi();
            var slug = slug_example;  // String | An alphanumeric slug for the question type (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Retrieve question type
                map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.getLdlmsV2QuestionTypesBySlug(slug, context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionTypesApi.getLdlmsV2QuestionTypesBySlug: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionTypesApi();
$slug = slug_example; // String | An alphanumeric slug for the question type
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->getLdlmsV2QuestionTypesBySlug($slug, $context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionTypesApi->getLdlmsV2QuestionTypesBySlug: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionTypesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionTypesApi->new();
my $slug = slug_example; # String | An alphanumeric slug for the question type
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->getLdlmsV2QuestionTypesBySlug(slug => $slug, context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionTypesApi->getLdlmsV2QuestionTypesBySlug: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.QuestionTypesApi()
slug = slug_example # String | An alphanumeric slug for the question type (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Retrieve question type
    api_response = api_instance.get_ldlms_v2_question_types_by_slug(slug, context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionTypesApi->getLdlmsV2QuestionTypesBySlug: %s\n" % e)
extern crate QuestionTypesApi;

pub fn main() {
    let slug = slug_example; // String
    let context = view; // String

    let mut context = QuestionTypesApi::Context::default();
    let result = client.getLdlmsV2QuestionTypesBySlug(slug, context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
slug*
String
An alphanumeric slug for the question type
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Retrieve question types

Retrieves the question types.


/learndash/v1/ldlms/v2/question-types

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/question-types?context=view"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionTypesApi;

import java.io.File;
import java.util.*;

public class QuestionTypesApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        QuestionTypesApi apiInstance = new QuestionTypesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.listLdlmsV2QuestionTypes(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionTypesApi#listLdlmsV2QuestionTypes");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.

try {
    final result = await api_instance.listLdlmsV2QuestionTypes(context);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2QuestionTypes: $e\n');
}

import org.openapitools.client.api.QuestionTypesApi;

public class QuestionTypesApiExample {
    public static void main(String[] args) {
        QuestionTypesApi apiInstance = new QuestionTypesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.

        try {
            map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.listLdlmsV2QuestionTypes(context);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionTypesApi#listLdlmsV2QuestionTypes");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
QuestionTypesApi *apiInstance = [[QuestionTypesApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)

// Retrieve question types
[apiInstance listLdlmsV2QuestionTypesWith:context
              completionHandler: ^(map['String', list_ldlms_v2_question_types_200_response_value] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionTypesApi()
var opts = {
  'context': view // {String} Scope under which the request is made; determines fields present in response.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2QuestionTypes(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2QuestionTypesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new QuestionTypesApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)

            try {
                // Retrieve question types
                map['String', list_ldlms_v2_question_types_200_response_value] result = apiInstance.listLdlmsV2QuestionTypes(context);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionTypesApi.listLdlmsV2QuestionTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionTypesApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.

try {
    $result = $api_instance->listLdlmsV2QuestionTypes($context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionTypesApi->listLdlmsV2QuestionTypes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionTypesApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionTypesApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.

eval {
    my $result = $api_instance->listLdlmsV2QuestionTypes(context => $context);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionTypesApi->listLdlmsV2QuestionTypes: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.QuestionTypesApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)

try:
    # Retrieve question types
    api_response = api_instance.list_ldlms_v2_question_types(context=context)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionTypesApi->listLdlmsV2QuestionTypes: %s\n" % e)
extern crate QuestionTypesApi;

pub fn main() {
    let context = view; // String

    let mut context = QuestionTypesApi::Context::default();
    let result = client.listLdlmsV2QuestionTypes(context, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.

Responses


Questions

Create a new question

Creates a new question. Requires question data in the request body including title, content, and other question-specific fields.


/learndash/v1/ldlms/v2/sfwd-question

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        CreateLdlmsV2QuestionRequest createLdlmsV2QuestionRequest = ; // CreateLdlmsV2QuestionRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2Question(createLdlmsV2QuestionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#createLdlmsV2Question");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2QuestionRequest createLdlmsV2QuestionRequest = new CreateLdlmsV2QuestionRequest(); // CreateLdlmsV2QuestionRequest | 

try {
    final result = await api_instance.createLdlmsV2Question(createLdlmsV2QuestionRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Question: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        CreateLdlmsV2QuestionRequest createLdlmsV2QuestionRequest = ; // CreateLdlmsV2QuestionRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2Question(createLdlmsV2QuestionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#createLdlmsV2Question");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
CreateLdlmsV2QuestionRequest *createLdlmsV2QuestionRequest = ; //  (optional)

// Create a new question
[apiInstance createLdlmsV2QuestionWith:createLdlmsV2QuestionRequest
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var opts = {
  'createLdlmsV2QuestionRequest':  // {CreateLdlmsV2QuestionRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Question(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2QuestionExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var createLdlmsV2QuestionRequest = new CreateLdlmsV2QuestionRequest(); // CreateLdlmsV2QuestionRequest |  (optional) 

            try {
                // Create a new question
                array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2Question(createLdlmsV2QuestionRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.createLdlmsV2Question: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$createLdlmsV2QuestionRequest = ; // CreateLdlmsV2QuestionRequest | 

try {
    $result = $api_instance->createLdlmsV2Question($createLdlmsV2QuestionRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->createLdlmsV2Question: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $createLdlmsV2QuestionRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2QuestionRequest->new(); # CreateLdlmsV2QuestionRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Question(createLdlmsV2QuestionRequest => $createLdlmsV2QuestionRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->createLdlmsV2Question: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
createLdlmsV2QuestionRequest =  # CreateLdlmsV2QuestionRequest |  (optional)

try:
    # Create a new question
    api_response = api_instance.create_ldlms_v2_question(createLdlmsV2QuestionRequest=createLdlmsV2QuestionRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->createLdlmsV2Question: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let createLdlmsV2QuestionRequest = ; // CreateLdlmsV2QuestionRequest

    let mut context = QuestionsApi::Context::default();
    let result = client.createLdlmsV2Question(createLdlmsV2QuestionRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a question

Partially updates an existing question. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-question/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#createLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Question ID
final UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2QuestionById: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#createLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
Integer *id = 56; // Question ID (default to null)
UpdateLdlmsV2QuestionByIdRequest *updateLdlmsV2QuestionByIdRequest = ; //  (optional)

// Update a question
[apiInstance createLdlmsV2QuestionByIdWith:id
    updateLdlmsV2QuestionByIdRequest:updateLdlmsV2QuestionByIdRequest
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var id = 56; // {Integer} Question ID
var opts = {
  'updateLdlmsV2QuestionByIdRequest':  // {UpdateLdlmsV2QuestionByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2QuestionById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2QuestionByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var id = 56;  // Integer | Question ID (default to null)
            var updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest |  (optional) 

            try {
                // Update a question
                array[LDLMS_v2_Question] result = apiInstance.createLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.createLdlmsV2QuestionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$id = 56; // Integer | Question ID
$updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2QuestionById($id, $updateLdlmsV2QuestionByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->createLdlmsV2QuestionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $id = 56; # Integer | Question ID
my $updateLdlmsV2QuestionByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuestionByIdRequest->new(); # UpdateLdlmsV2QuestionByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2QuestionById(id => $id, updateLdlmsV2QuestionByIdRequest => $updateLdlmsV2QuestionByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->createLdlmsV2QuestionById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
id = 56 # Integer | Question ID (default to null)
updateLdlmsV2QuestionByIdRequest =  # UpdateLdlmsV2QuestionByIdRequest |  (optional)

try:
    # Update a question
    api_response = api_instance.create_ldlms_v2_question_by_id(id, updateLdlmsV2QuestionByIdRequest=updateLdlmsV2QuestionByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->createLdlmsV2QuestionById: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest

    let mut context = QuestionsApi::Context::default();
    let result = client.createLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Question ID
Required
Request body

Responses


Delete a question

Deletes a question permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/sfwd-question/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Question] result = apiInstance.deleteLdlmsV2QuestionById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#deleteLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Question ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2QuestionById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2QuestionById: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Question] result = apiInstance.deleteLdlmsV2QuestionById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#deleteLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
Integer *id = 56; // Question ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a question
[apiInstance deleteLdlmsV2QuestionByIdWith:id
    force:force
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var id = 56; // {Integer} Question ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2QuestionById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2QuestionByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var id = 56;  // Integer | Question ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a question
                array[LDLMS_v2_Question] result = apiInstance.deleteLdlmsV2QuestionById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.deleteLdlmsV2QuestionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$id = 56; // Integer | Question ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2QuestionById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->deleteLdlmsV2QuestionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $id = 56; # Integer | Question ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2QuestionById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->deleteLdlmsV2QuestionById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
id = 56 # Integer | Question ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a question
    api_response = api_instance.delete_ldlms_v2_question_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->deleteLdlmsV2QuestionById: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = QuestionsApi::Context::default();
    let result = client.deleteLdlmsV2QuestionById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Question ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific question

Returns a specific question by ID. Returns the complete question data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-question/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID

        try {
            array[LDLMS_v2_Question] result = apiInstance.getLdlmsV2QuestionById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#getLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Question ID

try {
    final result = await api_instance.getLdlmsV2QuestionById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuestionById: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID

        try {
            array[LDLMS_v2_Question] result = apiInstance.getLdlmsV2QuestionById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#getLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
Integer *id = 56; // Question ID (default to null)

// Get a specific question
[apiInstance getLdlmsV2QuestionByIdWith:id
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var id = 56; // {Integer} Question ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuestionById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuestionByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var id = 56;  // Integer | Question ID (default to null)

            try {
                // Get a specific question
                array[LDLMS_v2_Question] result = apiInstance.getLdlmsV2QuestionById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.getLdlmsV2QuestionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$id = 56; // Integer | Question ID

try {
    $result = $api_instance->getLdlmsV2QuestionById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->getLdlmsV2QuestionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $id = 56; # Integer | Question ID

eval {
    my $result = $api_instance->getLdlmsV2QuestionById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->getLdlmsV2QuestionById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
id = 56 # Integer | Question ID (default to null)

try:
    # Get a specific question
    api_response = api_instance.get_ldlms_v2_question_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->getLdlmsV2QuestionById: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = QuestionsApi::Context::default();
    let result = client.getLdlmsV2QuestionById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Question ID
Required

Responses


Get questions

Returns a list of questions. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/sfwd-question

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=desc&orderby=date&search_columns=[]&slug=&status=["publish"]"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.

        try {
            array[LDLMS_v2_Question] result = apiInstance.listLdlmsV2Question(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#listLdlmsV2Question");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.

try {
    final result = await api_instance.listLdlmsV2Question(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Question: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.

        try {
            array[LDLMS_v2_Question] result = apiInstance.listLdlmsV2Question(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#listLdlmsV2Question");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = desc; // Order sort attribute ascending or descending. (optional) (default to desc)
String *orderby = date; // Sort collection by post attribute. (optional) (default to date)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])

// Get questions
[apiInstance listLdlmsV2QuestionWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': desc, // {String} Order sort attribute ascending or descending.
  'orderby': date, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"] // {array[String]} Limit result set to posts assigned one or more statuses.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Question(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2QuestionExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = desc;  // String | Order sort attribute ascending or descending. (optional)  (default to desc)
            var orderby = date;  // String | Sort collection by post attribute. (optional)  (default to date)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])

            try {
                // Get questions
                array[LDLMS_v2_Question] result = apiInstance.listLdlmsV2Question(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.listLdlmsV2Question: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = desc; // String | Order sort attribute ascending or descending.
$orderby = date; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.

try {
    $result = $api_instance->listLdlmsV2Question($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->listLdlmsV2Question: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = desc; # String | Order sort attribute ascending or descending.
my $orderby = date; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.

eval {
    my $result = $api_instance->listLdlmsV2Question(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->listLdlmsV2Question: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = desc # String | Order sort attribute ascending or descending. (optional) (default to desc)
orderby = date # String | Sort collection by post attribute. (optional) (default to date)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])

try:
    # Get questions
    api_response = api_instance.list_ldlms_v2_question(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->listLdlmsV2Question: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = desc; // String
    let orderby = date; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]

    let mut context = QuestionsApi::Context::default();
    let result = client.listLdlmsV2Question(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.

Responses


Update a question

Partially updates an existing question. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-question/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.patchLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#patchLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Question ID
final UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2QuestionById: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.patchLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#patchLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
Integer *id = 56; // Question ID (default to null)
UpdateLdlmsV2QuestionByIdRequest *updateLdlmsV2QuestionByIdRequest = ; //  (optional)

// Update a question
[apiInstance patchLdlmsV2QuestionByIdWith:id
    updateLdlmsV2QuestionByIdRequest:updateLdlmsV2QuestionByIdRequest
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var id = 56; // {Integer} Question ID
var opts = {
  'updateLdlmsV2QuestionByIdRequest':  // {UpdateLdlmsV2QuestionByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2QuestionById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2QuestionByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var id = 56;  // Integer | Question ID (default to null)
            var updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest |  (optional) 

            try {
                // Update a question
                array[LDLMS_v2_Question] result = apiInstance.patchLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.patchLdlmsV2QuestionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$id = 56; // Integer | Question ID
$updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2QuestionById($id, $updateLdlmsV2QuestionByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->patchLdlmsV2QuestionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $id = 56; # Integer | Question ID
my $updateLdlmsV2QuestionByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuestionByIdRequest->new(); # UpdateLdlmsV2QuestionByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2QuestionById(id => $id, updateLdlmsV2QuestionByIdRequest => $updateLdlmsV2QuestionByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->patchLdlmsV2QuestionById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
id = 56 # Integer | Question ID (default to null)
updateLdlmsV2QuestionByIdRequest =  # UpdateLdlmsV2QuestionByIdRequest |  (optional)

try:
    # Update a question
    api_response = api_instance.patch_ldlms_v2_question_by_id(id, updateLdlmsV2QuestionByIdRequest=updateLdlmsV2QuestionByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->patchLdlmsV2QuestionById: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest

    let mut context = QuestionsApi::Context::default();
    let result = client.patchLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Question ID
Required
Request body

Responses


Update a question

Updates an existing question. Requires the complete question data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-question/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-question/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuestionsApi;

import java.io.File;
import java.util.*;

public class QuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.updateLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#updateLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Question ID
final UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2QuestionById: $e\n');
}

import org.openapitools.client.api.QuestionsApi;

public class QuestionsApiExample {
    public static void main(String[] args) {
        QuestionsApi apiInstance = new QuestionsApi();
        Integer id = 56; // Integer | Question ID
        UpdateLdlmsV2QuestionByIdRequest updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

        try {
            array[LDLMS_v2_Question] result = apiInstance.updateLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuestionsApi#updateLdlmsV2QuestionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuestionsApi *apiInstance = [[QuestionsApi alloc] init];
Integer *id = 56; // Question ID (default to null)
UpdateLdlmsV2QuestionByIdRequest *updateLdlmsV2QuestionByIdRequest = ; //  (optional)

// Update a question
[apiInstance updateLdlmsV2QuestionByIdWith:id
    updateLdlmsV2QuestionByIdRequest:updateLdlmsV2QuestionByIdRequest
              completionHandler: ^(array[LDLMS_v2_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuestionsApi()
var id = 56; // {Integer} Question ID
var opts = {
  'updateLdlmsV2QuestionByIdRequest':  // {UpdateLdlmsV2QuestionByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2QuestionById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2QuestionByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuestionsApi();
            var id = 56;  // Integer | Question ID (default to null)
            var updateLdlmsV2QuestionByIdRequest = new UpdateLdlmsV2QuestionByIdRequest(); // UpdateLdlmsV2QuestionByIdRequest |  (optional) 

            try {
                // Update a question
                array[LDLMS_v2_Question] result = apiInstance.updateLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuestionsApi.updateLdlmsV2QuestionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuestionsApi();
$id = 56; // Integer | Question ID
$updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2QuestionById($id, $updateLdlmsV2QuestionByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuestionsApi->updateLdlmsV2QuestionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuestionsApi->new();
my $id = 56; # Integer | Question ID
my $updateLdlmsV2QuestionByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuestionByIdRequest->new(); # UpdateLdlmsV2QuestionByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2QuestionById(id => $id, updateLdlmsV2QuestionByIdRequest => $updateLdlmsV2QuestionByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuestionsApi->updateLdlmsV2QuestionById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuestionsApi()
id = 56 # Integer | Question ID (default to null)
updateLdlmsV2QuestionByIdRequest =  # UpdateLdlmsV2QuestionByIdRequest |  (optional)

try:
    # Update a question
    api_response = api_instance.update_ldlms_v2_question_by_id(id, updateLdlmsV2QuestionByIdRequest=updateLdlmsV2QuestionByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuestionsApi->updateLdlmsV2QuestionById: %s\n" % e)
extern crate QuestionsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuestionByIdRequest = ; // UpdateLdlmsV2QuestionByIdRequest

    let mut context = QuestionsApi::Context::default();
    let result = client.updateLdlmsV2QuestionById(id, updateLdlmsV2QuestionByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Question ID
Required
Request body

Responses


Quiz Statistics

Get statistics for a quiz

Retrieves the statistics for a specific quiz.


/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics?context=context_example&page=1&per_page=10&order=desc&orderby=date&user=56&after=after_example&before=before_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizStatisticsApi;

import java.io.File;
import java.util.*;

public class QuizStatisticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizStatisticsApi apiInstance = new QuizStatisticsApi();
        Integer quiz = 56; // Integer | Filter by Quiz ID
        String context = context_example; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by object attribute.
        Integer user = 56; // Integer | Filter by User ID
        String after = after_example; // String | Limit response items after a given ISO8601 compliant date.
        String before = before_example; // String | Limit response to items before a given ISO8601 compliant date.

        try {
            array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuiz(quiz, context, page, perPage, order, orderby, user, after, before);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsApi#getLdlmsV2QuizStatisticsByQuiz");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer quiz = new Integer(); // Integer | Filter by Quiz ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by object attribute.
final Integer user = new Integer(); // Integer | Filter by User ID
final String after = new String(); // String | Limit response items after a given ISO8601 compliant date.
final String before = new String(); // String | Limit response to items before a given ISO8601 compliant date.

try {
    final result = await api_instance.getLdlmsV2QuizStatisticsByQuiz(quiz, context, page, perPage, order, orderby, user, after, before);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuizStatisticsByQuiz: $e\n');
}

import org.openapitools.client.api.QuizStatisticsApi;

public class QuizStatisticsApiExample {
    public static void main(String[] args) {
        QuizStatisticsApi apiInstance = new QuizStatisticsApi();
        Integer quiz = 56; // Integer | Filter by Quiz ID
        String context = context_example; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String order = desc; // String | Order sort attribute ascending or descending.
        String orderby = date; // String | Sort collection by object attribute.
        Integer user = 56; // Integer | Filter by User ID
        String after = after_example; // String | Limit response items after a given ISO8601 compliant date.
        String before = before_example; // String | Limit response to items before a given ISO8601 compliant date.

        try {
            array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuiz(quiz, context, page, perPage, order, orderby, user, after, before);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsApi#getLdlmsV2QuizStatisticsByQuiz");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizStatisticsApi *apiInstance = [[QuizStatisticsApi alloc] init];
Integer *quiz = 56; // Filter by Quiz ID (default to null)
String *context = context_example; // Scope under which the request is made; determines fields present in response. (optional) (default to null)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *order = desc; // Order sort attribute ascending or descending. (optional) (default to desc)
String *orderby = date; // Sort collection by object attribute. (optional) (default to date)
Integer *user = 56; // Filter by User ID (optional) (default to null)
String *after = after_example; // Limit response items after a given ISO8601 compliant date. (optional) (default to null)
String *before = before_example; // Limit response to items before a given ISO8601 compliant date. (optional) (default to null)

// Get statistics for a quiz
[apiInstance getLdlmsV2QuizStatisticsByQuizWith:quiz
    context:context
    page:page
    perPage:perPage
    order:order
    orderby:orderby
    user:user
    after:after
    before:before
              completionHandler: ^(array[LDLMS_v2_Quiz_Statistic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizStatisticsApi()
var quiz = 56; // {Integer} Filter by Quiz ID
var opts = {
  'context': context_example, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'order': desc, // {String} Order sort attribute ascending or descending.
  'orderby': date, // {String} Sort collection by object attribute.
  'user': 56, // {Integer} Filter by User ID
  'after': after_example, // {String} Limit response items after a given ISO8601 compliant date.
  'before': before_example // {String} Limit response to items before a given ISO8601 compliant date.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuizStatisticsByQuiz(quiz, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuizStatisticsByQuizExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizStatisticsApi();
            var quiz = 56;  // Integer | Filter by Quiz ID (default to null)
            var context = context_example;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to null)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var order = desc;  // String | Order sort attribute ascending or descending. (optional)  (default to desc)
            var orderby = date;  // String | Sort collection by object attribute. (optional)  (default to date)
            var user = 56;  // Integer | Filter by User ID (optional)  (default to null)
            var after = after_example;  // String | Limit response items after a given ISO8601 compliant date. (optional)  (default to null)
            var before = before_example;  // String | Limit response to items before a given ISO8601 compliant date. (optional)  (default to null)

            try {
                // Get statistics for a quiz
                array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuiz(quiz, context, page, perPage, order, orderby, user, after, before);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizStatisticsApi.getLdlmsV2QuizStatisticsByQuiz: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizStatisticsApi();
$quiz = 56; // Integer | Filter by Quiz ID
$context = context_example; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$order = desc; // String | Order sort attribute ascending or descending.
$orderby = date; // String | Sort collection by object attribute.
$user = 56; // Integer | Filter by User ID
$after = after_example; // String | Limit response items after a given ISO8601 compliant date.
$before = before_example; // String | Limit response to items before a given ISO8601 compliant date.

try {
    $result = $api_instance->getLdlmsV2QuizStatisticsByQuiz($quiz, $context, $page, $perPage, $order, $orderby, $user, $after, $before);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuiz: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizStatisticsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizStatisticsApi->new();
my $quiz = 56; # Integer | Filter by Quiz ID
my $context = context_example; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $order = desc; # String | Order sort attribute ascending or descending.
my $orderby = date; # String | Sort collection by object attribute.
my $user = 56; # Integer | Filter by User ID
my $after = after_example; # String | Limit response items after a given ISO8601 compliant date.
my $before = before_example; # String | Limit response to items before a given ISO8601 compliant date.

eval {
    my $result = $api_instance->getLdlmsV2QuizStatisticsByQuiz(quiz => $quiz, context => $context, page => $page, perPage => $perPage, order => $order, orderby => $orderby, user => $user, after => $after, before => $before);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuiz: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizStatisticsApi()
quiz = 56 # Integer | Filter by Quiz ID (default to null)
context = context_example # String | Scope under which the request is made; determines fields present in response. (optional) (default to null)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
order = desc # String | Order sort attribute ascending or descending. (optional) (default to desc)
orderby = date # String | Sort collection by object attribute. (optional) (default to date)
user = 56 # Integer | Filter by User ID (optional) (default to null)
after = after_example # String | Limit response items after a given ISO8601 compliant date. (optional) (default to null)
before = before_example # String | Limit response to items before a given ISO8601 compliant date. (optional) (default to null)

try:
    # Get statistics for a quiz
    api_response = api_instance.get_ldlms_v2_quiz_statistics_by_quiz(quiz, context=context, page=page, perPage=perPage, order=order, orderby=orderby, user=user, after=after, before=before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuiz: %s\n" % e)
extern crate QuizStatisticsApi;

pub fn main() {
    let quiz = 56; // Integer
    let context = context_example; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let order = desc; // String
    let orderby = date; // String
    let user = 56; // Integer
    let after = after_example; // String
    let before = before_example; // String

    let mut context = QuizStatisticsApi::Context::default();
    let result = client.getLdlmsV2QuizStatisticsByQuiz(quiz, context, page, perPage, order, orderby, user, after, before, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
quiz*
Integer
Filter by Quiz ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by object attribute.
user
Integer
Filter by User ID
after
String
Limit response items after a given ISO8601 compliant date.
before
String
Limit response to items before a given ISO8601 compliant date.

Responses


Get a specific statistic for a quiz

Retrieves a specific statistic for a quiz.


/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizStatisticsApi;

import java.io.File;
import java.util.*;

public class QuizStatisticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizStatisticsApi apiInstance = new QuizStatisticsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.

        try {
            array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsApi#getLdlmsV2QuizStatisticsByQuizAndStatistic");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer quiz = new Integer(); // Integer | Quiz ID.
final Integer statistic = new Integer(); // Integer | Quiz Statistic ID.

try {
    final result = await api_instance.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuizStatisticsByQuizAndStatistic: $e\n');
}

import org.openapitools.client.api.QuizStatisticsApi;

public class QuizStatisticsApiExample {
    public static void main(String[] args) {
        QuizStatisticsApi apiInstance = new QuizStatisticsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.

        try {
            array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsApi#getLdlmsV2QuizStatisticsByQuizAndStatistic");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizStatisticsApi *apiInstance = [[QuizStatisticsApi alloc] init];
Integer *quiz = 56; // Quiz ID. (default to null)
Integer *statistic = 56; // Quiz Statistic ID. (default to null)

// Get a specific statistic for a quiz
[apiInstance getLdlmsV2QuizStatisticsByQuizAndStatisticWith:quiz
    statistic:statistic
              completionHandler: ^(array[LDLMS_v2_Quiz_Statistic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizStatisticsApi()
var quiz = 56; // {Integer} Quiz ID.
var statistic = 56; // {Integer} Quiz Statistic ID.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuizStatisticsByQuizAndStatisticExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizStatisticsApi();
            var quiz = 56;  // Integer | Quiz ID. (default to null)
            var statistic = 56;  // Integer | Quiz Statistic ID. (default to null)

            try {
                // Get a specific statistic for a quiz
                array[LDLMS_v2_Quiz_Statistic] result = apiInstance.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizStatisticsApi.getLdlmsV2QuizStatisticsByQuizAndStatistic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizStatisticsApi();
$quiz = 56; // Integer | Quiz ID.
$statistic = 56; // Integer | Quiz Statistic ID.

try {
    $result = $api_instance->getLdlmsV2QuizStatisticsByQuizAndStatistic($quiz, $statistic);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuizAndStatistic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizStatisticsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizStatisticsApi->new();
my $quiz = 56; # Integer | Quiz ID.
my $statistic = 56; # Integer | Quiz Statistic ID.

eval {
    my $result = $api_instance->getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz => $quiz, statistic => $statistic);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuizAndStatistic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizStatisticsApi()
quiz = 56 # Integer | Quiz ID. (default to null)
statistic = 56 # Integer | Quiz Statistic ID. (default to null)

try:
    # Get a specific statistic for a quiz
    api_response = api_instance.get_ldlms_v2_quiz_statistics_by_quiz_and_statistic(quiz, statistic)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizStatisticsApi->getLdlmsV2QuizStatisticsByQuizAndStatistic: %s\n" % e)
extern crate QuizStatisticsApi;

pub fn main() {
    let quiz = 56; // Integer
    let statistic = 56; // Integer

    let mut context = QuizStatisticsApi::Context::default();
    let result = client.getLdlmsV2QuizStatisticsByQuizAndStatistic(quiz, statistic, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
quiz*
Integer
Quiz ID.
Required
statistic*
Integer
Quiz Statistic ID.
Required

Responses


Quiz Statistics Questions

Get question statistics for a specific quiz

Retrieves the question statistics for a specific quiz statistic.


/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}/questions

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}/questions?context=context_example&page=1&per_page=10"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizStatisticsQuestionsApi;

import java.io.File;
import java.util.*;

public class QuizStatisticsQuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizStatisticsQuestionsApi apiInstance = new QuizStatisticsQuestionsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.
        String context = context_example; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.

        try {
            array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, context, page, perPage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsQuestionsApi#getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer quiz = new Integer(); // Integer | Quiz ID.
final Integer statistic = new Integer(); // Integer | Quiz Statistic ID.
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.

try {
    final result = await api_instance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, context, page, perPage);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic: $e\n');
}

import org.openapitools.client.api.QuizStatisticsQuestionsApi;

public class QuizStatisticsQuestionsApiExample {
    public static void main(String[] args) {
        QuizStatisticsQuestionsApi apiInstance = new QuizStatisticsQuestionsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.
        String context = context_example; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.

        try {
            array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, context, page, perPage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsQuestionsApi#getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizStatisticsQuestionsApi *apiInstance = [[QuizStatisticsQuestionsApi alloc] init];
Integer *quiz = 56; // Quiz ID. (default to null)
Integer *statistic = 56; // Quiz Statistic ID. (default to null)
String *context = context_example; // Scope under which the request is made; determines fields present in response. (optional) (default to null)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)

// Get question statistics for a specific quiz
[apiInstance getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticWith:quiz
    statistic:statistic
    context:context
    page:page
    perPage:perPage
              completionHandler: ^(array[LDLMS_v2_Quiz_Statistic_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizStatisticsQuestionsApi()
var quiz = 56; // {Integer} Quiz ID.
var statistic = 56; // {Integer} Quiz Statistic ID.
var opts = {
  'context': context_example, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10 // {Integer} Maximum number of items to be returned in result set.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizStatisticsQuestionsApi();
            var quiz = 56;  // Integer | Quiz ID. (default to null)
            var statistic = 56;  // Integer | Quiz Statistic ID. (default to null)
            var context = context_example;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to null)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)

            try {
                // Get question statistics for a specific quiz
                array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, context, page, perPage);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizStatisticsQuestionsApi.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizStatisticsQuestionsApi();
$quiz = 56; // Integer | Quiz ID.
$statistic = 56; // Integer | Quiz Statistic ID.
$context = context_example; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.

try {
    $result = $api_instance->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic($quiz, $statistic, $context, $page, $perPage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizStatisticsQuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizStatisticsQuestionsApi->new();
my $quiz = 56; # Integer | Quiz ID.
my $statistic = 56; # Integer | Quiz Statistic ID.
my $context = context_example; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.

eval {
    my $result = $api_instance->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz => $quiz, statistic => $statistic, context => $context, page => $page, perPage => $perPage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizStatisticsQuestionsApi()
quiz = 56 # Integer | Quiz ID. (default to null)
statistic = 56 # Integer | Quiz Statistic ID. (default to null)
context = context_example # String | Scope under which the request is made; determines fields present in response. (optional) (default to null)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)

try:
    # Get question statistics for a specific quiz
    api_response = api_instance.get_ldlms_v2_quiz_statistics_questions_by_quiz_and_statistic(quiz, statistic, context=context, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic: %s\n" % e)
extern crate QuizStatisticsQuestionsApi;

pub fn main() {
    let quiz = 56; // Integer
    let statistic = 56; // Integer
    let context = context_example; // String
    let page = 1; // Integer
    let perPage = 10; // Integer

    let mut context = QuizStatisticsQuestionsApi::Context::default();
    let result = client.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatistic(quiz, statistic, context, page, perPage, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
quiz*
Integer
Quiz ID.
Required
statistic*
Integer
Quiz Statistic ID.
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.

Responses


Get question statistics for a specific quiz and question

Retrieves a specific question statistics for a quiz statistic and question.


/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}/questions/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{quiz}/statistics/{statistic}/questions/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizStatisticsQuestionsApi;

import java.io.File;
import java.util.*;

public class QuizStatisticsQuestionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizStatisticsQuestionsApi apiInstance = new QuizStatisticsQuestionsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.
        String id = id_example; // String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

        try {
            array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsQuestionsApi#getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer quiz = new Integer(); // Integer | Quiz ID.
final Integer statistic = new Integer(); // Integer | Quiz Statistic ID.
final String id = new String(); // String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

try {
    final result = await api_instance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId: $e\n');
}

import org.openapitools.client.api.QuizStatisticsQuestionsApi;

public class QuizStatisticsQuestionsApiExample {
    public static void main(String[] args) {
        QuizStatisticsQuestionsApi apiInstance = new QuizStatisticsQuestionsApi();
        Integer quiz = 56; // Integer | Quiz ID.
        Integer statistic = 56; // Integer | Quiz Statistic ID.
        String id = id_example; // String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

        try {
            array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizStatisticsQuestionsApi#getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizStatisticsQuestionsApi *apiInstance = [[QuizStatisticsQuestionsApi alloc] init];
Integer *quiz = 56; // Quiz ID. (default to null)
Integer *statistic = 56; // Quiz Statistic ID. (default to null)
String *id = id_example; // Quiz Statistic Question ID (Statistics ID + "_" + Question ID) (default to null)

// Get question statistics for a specific quiz and question
[apiInstance getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndIdWith:quiz
    statistic:statistic
    id:id
              completionHandler: ^(array[LDLMS_v2_Quiz_Statistic_Question] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizStatisticsQuestionsApi()
var quiz = 56; // {Integer} Quiz ID.
var statistic = 56; // {Integer} Quiz Statistic ID.
var id = id_example; // {String} Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizStatisticsQuestionsApi();
            var quiz = 56;  // Integer | Quiz ID. (default to null)
            var statistic = 56;  // Integer | Quiz Statistic ID. (default to null)
            var id = id_example;  // String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID) (default to null)

            try {
                // Get question statistics for a specific quiz and question
                array[LDLMS_v2_Quiz_Statistic_Question] result = apiInstance.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizStatisticsQuestionsApi.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizStatisticsQuestionsApi();
$quiz = 56; // Integer | Quiz ID.
$statistic = 56; // Integer | Quiz Statistic ID.
$id = id_example; // String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

try {
    $result = $api_instance->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId($quiz, $statistic, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizStatisticsQuestionsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizStatisticsQuestionsApi->new();
my $quiz = 56; # Integer | Quiz ID.
my $statistic = 56; # Integer | Quiz Statistic ID.
my $id = id_example; # String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID)

eval {
    my $result = $api_instance->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz => $quiz, statistic => $statistic, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizStatisticsQuestionsApi()
quiz = 56 # Integer | Quiz ID. (default to null)
statistic = 56 # Integer | Quiz Statistic ID. (default to null)
id = id_example # String | Quiz Statistic Question ID (Statistics ID + "_" + Question ID) (default to null)

try:
    # Get question statistics for a specific quiz and question
    api_response = api_instance.get_ldlms_v2_quiz_statistics_questions_by_quiz_and_statistic_and_id(quiz, statistic, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizStatisticsQuestionsApi->getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId: %s\n" % e)
extern crate QuizStatisticsQuestionsApi;

pub fn main() {
    let quiz = 56; // Integer
    let statistic = 56; // Integer
    let id = id_example; // String

    let mut context = QuizStatisticsQuestionsApi::Context::default();
    let result = client.getLdlmsV2QuizStatisticsQuestionsByQuizAndStatisticAndId(quiz, statistic, id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
quiz*
Integer
Quiz ID.
Required
statistic*
Integer
Quiz Statistic ID.
Required
id*
String
Quiz Statistic Question ID (Statistics ID + &quot;_&quot; + Question ID)
Required

Responses


Quizzes

Create a new quiz

Creates a new quiz. Requires quiz data in the request body including title, content, and other quiz-specific fields.


/learndash/v1/ldlms/v2/sfwd-quiz

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        CreateLdlmsV2QuizRequest createLdlmsV2QuizRequest = ; // CreateLdlmsV2QuizRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2Quiz(createLdlmsV2QuizRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#createLdlmsV2Quiz");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2QuizRequest createLdlmsV2QuizRequest = new CreateLdlmsV2QuizRequest(); // CreateLdlmsV2QuizRequest | 

try {
    final result = await api_instance.createLdlmsV2Quiz(createLdlmsV2QuizRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Quiz: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        CreateLdlmsV2QuizRequest createLdlmsV2QuizRequest = ; // CreateLdlmsV2QuizRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2Quiz(createLdlmsV2QuizRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#createLdlmsV2Quiz");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
CreateLdlmsV2QuizRequest *createLdlmsV2QuizRequest = ; //  (optional)

// Create a new quiz
[apiInstance createLdlmsV2QuizWith:createLdlmsV2QuizRequest
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var opts = {
  'createLdlmsV2QuizRequest':  // {CreateLdlmsV2QuizRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Quiz(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2QuizExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var createLdlmsV2QuizRequest = new CreateLdlmsV2QuizRequest(); // CreateLdlmsV2QuizRequest |  (optional) 

            try {
                // Create a new quiz
                array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2Quiz(createLdlmsV2QuizRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.createLdlmsV2Quiz: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$createLdlmsV2QuizRequest = ; // CreateLdlmsV2QuizRequest | 

try {
    $result = $api_instance->createLdlmsV2Quiz($createLdlmsV2QuizRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->createLdlmsV2Quiz: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $createLdlmsV2QuizRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2QuizRequest->new(); # CreateLdlmsV2QuizRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Quiz(createLdlmsV2QuizRequest => $createLdlmsV2QuizRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->createLdlmsV2Quiz: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
createLdlmsV2QuizRequest =  # CreateLdlmsV2QuizRequest |  (optional)

try:
    # Create a new quiz
    api_response = api_instance.create_ldlms_v2_quiz(createLdlmsV2QuizRequest=createLdlmsV2QuizRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->createLdlmsV2Quiz: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let createLdlmsV2QuizRequest = ; // CreateLdlmsV2QuizRequest

    let mut context = QuizzesApi::Context::default();
    let result = client.createLdlmsV2Quiz(createLdlmsV2QuizRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a quiz

Partially updates an existing quiz. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-quiz/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#createLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Quiz ID
final UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2QuizById: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#createLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
Integer *id = 56; // Quiz ID (default to null)
UpdateLdlmsV2QuizByIdRequest *updateLdlmsV2QuizByIdRequest = ; //  (optional)

// Update a quiz
[apiInstance createLdlmsV2QuizByIdWith:id
    updateLdlmsV2QuizByIdRequest:updateLdlmsV2QuizByIdRequest
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var id = 56; // {Integer} Quiz ID
var opts = {
  'updateLdlmsV2QuizByIdRequest':  // {UpdateLdlmsV2QuizByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2QuizById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2QuizByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var id = 56;  // Integer | Quiz ID (default to null)
            var updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest |  (optional) 

            try {
                // Update a quiz
                array[LDLMS_v2_Quiz] result = apiInstance.createLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.createLdlmsV2QuizById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$id = 56; // Integer | Quiz ID
$updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2QuizById($id, $updateLdlmsV2QuizByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->createLdlmsV2QuizById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $id = 56; # Integer | Quiz ID
my $updateLdlmsV2QuizByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuizByIdRequest->new(); # UpdateLdlmsV2QuizByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2QuizById(id => $id, updateLdlmsV2QuizByIdRequest => $updateLdlmsV2QuizByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->createLdlmsV2QuizById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
id = 56 # Integer | Quiz ID (default to null)
updateLdlmsV2QuizByIdRequest =  # UpdateLdlmsV2QuizByIdRequest |  (optional)

try:
    # Update a quiz
    api_response = api_instance.create_ldlms_v2_quiz_by_id(id, updateLdlmsV2QuizByIdRequest=updateLdlmsV2QuizByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->createLdlmsV2QuizById: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest

    let mut context = QuizzesApi::Context::default();
    let result = client.createLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Quiz ID
Required
Request body

Responses


Delete a quiz

Deletes a quiz permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/sfwd-quiz/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.deleteLdlmsV2QuizById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#deleteLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Quiz ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2QuizById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2QuizById: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.deleteLdlmsV2QuizById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#deleteLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
Integer *id = 56; // Quiz ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a quiz
[apiInstance deleteLdlmsV2QuizByIdWith:id
    force:force
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var id = 56; // {Integer} Quiz ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2QuizById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2QuizByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var id = 56;  // Integer | Quiz ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a quiz
                array[LDLMS_v2_Quiz] result = apiInstance.deleteLdlmsV2QuizById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.deleteLdlmsV2QuizById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$id = 56; // Integer | Quiz ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2QuizById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->deleteLdlmsV2QuizById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $id = 56; # Integer | Quiz ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2QuizById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->deleteLdlmsV2QuizById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
id = 56 # Integer | Quiz ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a quiz
    api_response = api_instance.delete_ldlms_v2_quiz_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->deleteLdlmsV2QuizById: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = QuizzesApi::Context::default();
    let result = client.deleteLdlmsV2QuizById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Quiz ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific quiz

Returns a specific quiz by ID. Returns the complete quiz data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-quiz/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.getLdlmsV2QuizById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#getLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Quiz ID

try {
    final result = await api_instance.getLdlmsV2QuizById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2QuizById: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.getLdlmsV2QuizById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#getLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
Integer *id = 56; // Quiz ID (default to null)

// Get a specific quiz
[apiInstance getLdlmsV2QuizByIdWith:id
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var id = 56; // {Integer} Quiz ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2QuizById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2QuizByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var id = 56;  // Integer | Quiz ID (default to null)

            try {
                // Get a specific quiz
                array[LDLMS_v2_Quiz] result = apiInstance.getLdlmsV2QuizById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.getLdlmsV2QuizById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$id = 56; // Integer | Quiz ID

try {
    $result = $api_instance->getLdlmsV2QuizById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->getLdlmsV2QuizById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $id = 56; # Integer | Quiz ID

eval {
    my $result = $api_instance->getLdlmsV2QuizById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->getLdlmsV2QuizById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
id = 56 # Integer | Quiz ID (default to null)

try:
    # Get a specific quiz
    api_response = api_instance.get_ldlms_v2_quiz_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->getLdlmsV2QuizById: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = QuizzesApi::Context::default();
    let result = client.getLdlmsV2QuizById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Quiz ID
Required

Responses


Get quizzes

Returns a list of quizzes. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/sfwd-quiz

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&course=56&lesson=56&topic=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
        Integer topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.listLdlmsV2Quiz(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#listLdlmsV2Quiz");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final Integer course = new Integer(); // Integer | Limit results to be within a specific Course. Required for non-admin users.
final Integer lesson = new Integer(); // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
final Integer topic = new Integer(); // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.

try {
    final result = await api_instance.listLdlmsV2Quiz(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Quiz: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
        Integer topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.listLdlmsV2Quiz(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#listLdlmsV2Quiz");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
Integer *course = 56; // Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)
Integer *lesson = 56; // Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional) (default to null)
Integer *topic = 56; // Limit results to be within a specific Topic. Must be used with Course parameter. (optional) (default to null)

// Get quizzes
[apiInstance listLdlmsV2QuizWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    course:course
    lesson:lesson
    topic:topic
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'course': 56, // {Integer} Limit results to be within a specific Course. Required for non-admin users.
  'lesson': 56, // {Integer} Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
  'topic': 56 // {Integer} Limit results to be within a specific Topic. Must be used with Course parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Quiz(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2QuizExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var course = 56;  // Integer | Limit results to be within a specific Course. Required for non-admin users. (optional)  (default to null)
            var lesson = 56;  // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional)  (default to null)
            var topic = 56;  // Integer | Limit results to be within a specific Topic. Must be used with Course parameter. (optional)  (default to null)

            try {
                // Get quizzes
                array[LDLMS_v2_Quiz] result = apiInstance.listLdlmsV2Quiz(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.listLdlmsV2Quiz: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
$lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
$topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.

try {
    $result = $api_instance->listLdlmsV2Quiz($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $course, $lesson, $topic);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->listLdlmsV2Quiz: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $course = 56; # Integer | Limit results to be within a specific Course. Required for non-admin users.
my $lesson = 56; # Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
my $topic = 56; # Integer | Limit results to be within a specific Topic. Must be used with Course parameter.

eval {
    my $result = $api_instance->listLdlmsV2Quiz(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, course => $course, lesson => $lesson, topic => $topic);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->listLdlmsV2Quiz: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
course = 56 # Integer | Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)
lesson = 56 # Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional) (default to null)
topic = 56 # Integer | Limit results to be within a specific Topic. Must be used with Course parameter. (optional) (default to null)

try:
    # Get quizzes
    api_response = api_instance.list_ldlms_v2_quiz(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, course=course, lesson=lesson, topic=topic)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->listLdlmsV2Quiz: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let course = 56; // Integer
    let lesson = 56; // Integer
    let topic = 56; // Integer

    let mut context = QuizzesApi::Context::default();
    let result = client.listLdlmsV2Quiz(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, course, lesson, topic, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
course
Integer
Limit results to be within a specific Course. Required for non-admin users.
lesson
Integer
Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
topic
Integer
Limit results to be within a specific Topic. Must be used with Course parameter.

Responses


Update a quiz

Partially updates an existing quiz. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-quiz/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.patchLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#patchLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Quiz ID
final UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2QuizById: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.patchLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#patchLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
Integer *id = 56; // Quiz ID (default to null)
UpdateLdlmsV2QuizByIdRequest *updateLdlmsV2QuizByIdRequest = ; //  (optional)

// Update a quiz
[apiInstance patchLdlmsV2QuizByIdWith:id
    updateLdlmsV2QuizByIdRequest:updateLdlmsV2QuizByIdRequest
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var id = 56; // {Integer} Quiz ID
var opts = {
  'updateLdlmsV2QuizByIdRequest':  // {UpdateLdlmsV2QuizByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2QuizById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2QuizByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var id = 56;  // Integer | Quiz ID (default to null)
            var updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest |  (optional) 

            try {
                // Update a quiz
                array[LDLMS_v2_Quiz] result = apiInstance.patchLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.patchLdlmsV2QuizById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$id = 56; // Integer | Quiz ID
$updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2QuizById($id, $updateLdlmsV2QuizByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->patchLdlmsV2QuizById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $id = 56; # Integer | Quiz ID
my $updateLdlmsV2QuizByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuizByIdRequest->new(); # UpdateLdlmsV2QuizByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2QuizById(id => $id, updateLdlmsV2QuizByIdRequest => $updateLdlmsV2QuizByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->patchLdlmsV2QuizById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
id = 56 # Integer | Quiz ID (default to null)
updateLdlmsV2QuizByIdRequest =  # UpdateLdlmsV2QuizByIdRequest |  (optional)

try:
    # Update a quiz
    api_response = api_instance.patch_ldlms_v2_quiz_by_id(id, updateLdlmsV2QuizByIdRequest=updateLdlmsV2QuizByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->patchLdlmsV2QuizById: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest

    let mut context = QuizzesApi::Context::default();
    let result = client.patchLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Quiz ID
Required
Request body

Responses


Update a quiz

Updates an existing quiz. Requires the complete quiz data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-quiz/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-quiz/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QuizzesApi;

import java.io.File;
import java.util.*;

public class QuizzesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.updateLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#updateLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Quiz ID
final UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2QuizById: $e\n');
}

import org.openapitools.client.api.QuizzesApi;

public class QuizzesApiExample {
    public static void main(String[] args) {
        QuizzesApi apiInstance = new QuizzesApi();
        Integer id = 56; // Integer | Quiz ID
        UpdateLdlmsV2QuizByIdRequest updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

        try {
            array[LDLMS_v2_Quiz] result = apiInstance.updateLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuizzesApi#updateLdlmsV2QuizById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
QuizzesApi *apiInstance = [[QuizzesApi alloc] init];
Integer *id = 56; // Quiz ID (default to null)
UpdateLdlmsV2QuizByIdRequest *updateLdlmsV2QuizByIdRequest = ; //  (optional)

// Update a quiz
[apiInstance updateLdlmsV2QuizByIdWith:id
    updateLdlmsV2QuizByIdRequest:updateLdlmsV2QuizByIdRequest
              completionHandler: ^(array[LDLMS_v2_Quiz] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.QuizzesApi()
var id = 56; // {Integer} Quiz ID
var opts = {
  'updateLdlmsV2QuizByIdRequest':  // {UpdateLdlmsV2QuizByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2QuizById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2QuizByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new QuizzesApi();
            var id = 56;  // Integer | Quiz ID (default to null)
            var updateLdlmsV2QuizByIdRequest = new UpdateLdlmsV2QuizByIdRequest(); // UpdateLdlmsV2QuizByIdRequest |  (optional) 

            try {
                // Update a quiz
                array[LDLMS_v2_Quiz] result = apiInstance.updateLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling QuizzesApi.updateLdlmsV2QuizById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\QuizzesApi();
$id = 56; // Integer | Quiz ID
$updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2QuizById($id, $updateLdlmsV2QuizByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuizzesApi->updateLdlmsV2QuizById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::QuizzesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::QuizzesApi->new();
my $id = 56; # Integer | Quiz ID
my $updateLdlmsV2QuizByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2QuizByIdRequest->new(); # UpdateLdlmsV2QuizByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2QuizById(id => $id, updateLdlmsV2QuizByIdRequest => $updateLdlmsV2QuizByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QuizzesApi->updateLdlmsV2QuizById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.QuizzesApi()
id = 56 # Integer | Quiz ID (default to null)
updateLdlmsV2QuizByIdRequest =  # UpdateLdlmsV2QuizByIdRequest |  (optional)

try:
    # Update a quiz
    api_response = api_instance.update_ldlms_v2_quiz_by_id(id, updateLdlmsV2QuizByIdRequest=updateLdlmsV2QuizByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QuizzesApi->updateLdlmsV2QuizById: %s\n" % e)
extern crate QuizzesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2QuizByIdRequest = ; // UpdateLdlmsV2QuizByIdRequest

    let mut context = QuizzesApi::Context::default();
    let result = client.updateLdlmsV2QuizById(id, updateLdlmsV2QuizByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Quiz ID
Required
Request body

Responses


Topics

Create a new topic

Creates a new topic. Requires topic data in the request body including title, content, and other topic-specific fields.


/learndash/v1/ldlms/v2/sfwd-topic

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        CreateLdlmsV2TopicRequest createLdlmsV2TopicRequest = ; // CreateLdlmsV2TopicRequest | 

        try {
            array[LDLMS_v2_Topic] result = apiInstance.createLdlmsV2Topic(createLdlmsV2TopicRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#createLdlmsV2Topic");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLdlmsV2TopicRequest createLdlmsV2TopicRequest = new CreateLdlmsV2TopicRequest(); // CreateLdlmsV2TopicRequest | 

try {
    final result = await api_instance.createLdlmsV2Topic(createLdlmsV2TopicRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2Topic: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        CreateLdlmsV2TopicRequest createLdlmsV2TopicRequest = ; // CreateLdlmsV2TopicRequest | 

        try {
            array[LDLMS_v2_Topic] result = apiInstance.createLdlmsV2Topic(createLdlmsV2TopicRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#createLdlmsV2Topic");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
CreateLdlmsV2TopicRequest *createLdlmsV2TopicRequest = ; //  (optional)

// Create a new topic
[apiInstance createLdlmsV2TopicWith:createLdlmsV2TopicRequest
              completionHandler: ^(array[LDLMS_v2_Topic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var opts = {
  'createLdlmsV2TopicRequest':  // {CreateLdlmsV2TopicRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2Topic(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2TopicExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var createLdlmsV2TopicRequest = new CreateLdlmsV2TopicRequest(); // CreateLdlmsV2TopicRequest |  (optional) 

            try {
                // Create a new topic
                array[LDLMS_v2_Topic] result = apiInstance.createLdlmsV2Topic(createLdlmsV2TopicRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.createLdlmsV2Topic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$createLdlmsV2TopicRequest = ; // CreateLdlmsV2TopicRequest | 

try {
    $result = $api_instance->createLdlmsV2Topic($createLdlmsV2TopicRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->createLdlmsV2Topic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $createLdlmsV2TopicRequest = WWW::OPenAPIClient::Object::CreateLdlmsV2TopicRequest->new(); # CreateLdlmsV2TopicRequest | 

eval {
    my $result = $api_instance->createLdlmsV2Topic(createLdlmsV2TopicRequest => $createLdlmsV2TopicRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->createLdlmsV2Topic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
createLdlmsV2TopicRequest =  # CreateLdlmsV2TopicRequest |  (optional)

try:
    # Create a new topic
    api_response = api_instance.create_ldlms_v2_topic(createLdlmsV2TopicRequest=createLdlmsV2TopicRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->createLdlmsV2Topic: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let createLdlmsV2TopicRequest = ; // CreateLdlmsV2TopicRequest

    let mut context = TopicsApi::Context::default();
    let result = client.createLdlmsV2Topic(createLdlmsV2TopicRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Request body

Responses


Update a topic

Partially updates an existing topic. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-topic/{id}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.createLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#createLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Topic ID
final UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2TopicById: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.createLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#createLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
Integer *id = 56; // Topic ID (default to null)
UpdateLdlmsV2TopicByIdRequest *updateLdlmsV2TopicByIdRequest = ; //  (optional)

// Update a topic
[apiInstance createLdlmsV2TopicByIdWith:id
    updateLdlmsV2TopicByIdRequest:updateLdlmsV2TopicByIdRequest
              completionHandler: ^(LDLMS_v2_Topic output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var id = 56; // {Integer} Topic ID
var opts = {
  'updateLdlmsV2TopicByIdRequest':  // {UpdateLdlmsV2TopicByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2TopicById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2TopicByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var id = 56;  // Integer | Topic ID (default to null)
            var updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest |  (optional) 

            try {
                // Update a topic
                LDLMS_v2_Topic result = apiInstance.createLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.createLdlmsV2TopicById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$id = 56; // Integer | Topic ID
$updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2TopicById($id, $updateLdlmsV2TopicByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->createLdlmsV2TopicById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $id = 56; # Integer | Topic ID
my $updateLdlmsV2TopicByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2TopicByIdRequest->new(); # UpdateLdlmsV2TopicByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2TopicById(id => $id, updateLdlmsV2TopicByIdRequest => $updateLdlmsV2TopicByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->createLdlmsV2TopicById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
id = 56 # Integer | Topic ID (default to null)
updateLdlmsV2TopicByIdRequest =  # UpdateLdlmsV2TopicByIdRequest |  (optional)

try:
    # Update a topic
    api_response = api_instance.create_ldlms_v2_topic_by_id(id, updateLdlmsV2TopicByIdRequest=updateLdlmsV2TopicByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->createLdlmsV2TopicById: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest

    let mut context = TopicsApi::Context::default();
    let result = client.createLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Topic ID
Required
Request body

Responses


Delete a topic

Deletes a topic permanently. This action cannot be undone.


/learndash/v1/ldlms/v2/sfwd-topic/{id}

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic/{id}?force=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Topic result = apiInstance.deleteLdlmsV2TopicById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#deleteLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Topic ID
final Boolean force = new Boolean(); // Boolean | Whether to bypass trash and force deletion.

try {
    final result = await api_instance.deleteLdlmsV2TopicById(id, force);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2TopicById: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        Boolean force = false; // Boolean | Whether to bypass trash and force deletion.

        try {
            LDLMS_v2_Topic result = apiInstance.deleteLdlmsV2TopicById(id, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#deleteLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
Integer *id = 56; // Topic ID (default to null)
Boolean *force = false; // Whether to bypass trash and force deletion. (optional) (default to false)

// Delete a topic
[apiInstance deleteLdlmsV2TopicByIdWith:id
    force:force
              completionHandler: ^(LDLMS_v2_Topic output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var id = 56; // {Integer} Topic ID
var opts = {
  'force': false // {Boolean} Whether to bypass trash and force deletion.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2TopicById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2TopicByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var id = 56;  // Integer | Topic ID (default to null)
            var force = false;  // Boolean | Whether to bypass trash and force deletion. (optional)  (default to false)

            try {
                // Delete a topic
                LDLMS_v2_Topic result = apiInstance.deleteLdlmsV2TopicById(id, force);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.deleteLdlmsV2TopicById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$id = 56; // Integer | Topic ID
$force = false; // Boolean | Whether to bypass trash and force deletion.

try {
    $result = $api_instance->deleteLdlmsV2TopicById($id, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->deleteLdlmsV2TopicById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $id = 56; # Integer | Topic ID
my $force = false; # Boolean | Whether to bypass trash and force deletion.

eval {
    my $result = $api_instance->deleteLdlmsV2TopicById(id => $id, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->deleteLdlmsV2TopicById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
id = 56 # Integer | Topic ID (default to null)
force = false # Boolean | Whether to bypass trash and force deletion. (optional) (default to false)

try:
    # Delete a topic
    api_response = api_instance.delete_ldlms_v2_topic_by_id(id, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->deleteLdlmsV2TopicById: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let id = 56; // Integer
    let force = false; // Boolean

    let mut context = TopicsApi::Context::default();
    let result = client.deleteLdlmsV2TopicById(id, force, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Topic ID
Required
Query parameters
Name Description
force
Boolean
Whether to bypass trash and force deletion.

Responses


Get a specific topic

Returns a specific topic by ID. Returns the complete topic data including all fields and metadata.


/learndash/v1/ldlms/v2/sfwd-topic/{id}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID

        try {
            LDLMS_v2_Topic result = apiInstance.getLdlmsV2TopicById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#getLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Topic ID

try {
    final result = await api_instance.getLdlmsV2TopicById(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2TopicById: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID

        try {
            LDLMS_v2_Topic result = apiInstance.getLdlmsV2TopicById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#getLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
Integer *id = 56; // Topic ID (default to null)

// Get a specific topic
[apiInstance getLdlmsV2TopicByIdWith:id
              completionHandler: ^(LDLMS_v2_Topic output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var id = 56; // {Integer} Topic ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2TopicById(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2TopicByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var id = 56;  // Integer | Topic ID (default to null)

            try {
                // Get a specific topic
                LDLMS_v2_Topic result = apiInstance.getLdlmsV2TopicById(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.getLdlmsV2TopicById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$id = 56; // Integer | Topic ID

try {
    $result = $api_instance->getLdlmsV2TopicById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->getLdlmsV2TopicById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $id = 56; # Integer | Topic ID

eval {
    my $result = $api_instance->getLdlmsV2TopicById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->getLdlmsV2TopicById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
id = 56 # Integer | Topic ID (default to null)

try:
    # Get a specific topic
    api_response = api_instance.get_ldlms_v2_topic_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->getLdlmsV2TopicById: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let id = 56; // Integer

    let mut context = TopicsApi::Context::default();
    let result = client.getLdlmsV2TopicById(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Topic ID
Required

Responses


Get topics

Returns a list of topics. You can filter the results using query parameters such as per_page, page, search, and orderby.


/learndash/v1/ldlms/v2/sfwd-topic

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_topic_category=Object&ld_topic_category_exclude=Object&ld_topic_tag=Object&ld_topic_tag_exclude=Object&course=56&lesson=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldTopicCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
        Object ldTopicCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
        Object ldTopicTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
        Object ldTopicTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Must be used with Course parameter.

        try {
            array[LDLMS_v2_Topic] result = apiInstance.listLdlmsV2Topic(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldTopicCategory, ldTopicCategoryExclude, ldTopicTag, ldTopicTagExclude, course, lesson);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#listLdlmsV2Topic");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldTopicCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
final Object ldTopicCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
final Object ldTopicTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
final Object ldTopicTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
final Integer course = new Integer(); // Integer | Limit results to be within a specific Course. Required for non-admin users.
final Integer lesson = new Integer(); // Integer | Limit results to be within a specific Lesson. Must be used with Course parameter.

try {
    final result = await api_instance.listLdlmsV2Topic(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldTopicCategory, ldTopicCategoryExclude, ldTopicTag, ldTopicTagExclude, course, lesson);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listLdlmsV2Topic: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldTopicCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
        Object ldTopicCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
        Object ldTopicTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
        Object ldTopicTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
        Integer course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Must be used with Course parameter.

        try {
            array[LDLMS_v2_Topic] result = apiInstance.listLdlmsV2Topic(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldTopicCategory, ldTopicCategoryExclude, ldTopicTag, ldTopicTagExclude, course, lesson);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#listLdlmsV2Topic");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldTopicCategory = Object; // Limit result set to items with specific terms assigned in the ld_topic_category taxonomy. (optional) (default to null)
Object *ldTopicCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy. (optional) (default to null)
Object *ldTopicTag = Object; // Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy. (optional) (default to null)
Object *ldTopicTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy. (optional) (default to null)
Integer *course = 56; // Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)
Integer *lesson = 56; // Limit results to be within a specific Lesson. Must be used with Course parameter. (optional) (default to null)

// Get topics
[apiInstance listLdlmsV2TopicWith:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldTopicCategory:ldTopicCategory
    ldTopicCategoryExclude:ldTopicCategoryExclude
    ldTopicTag:ldTopicTag
    ldTopicTagExclude:ldTopicTagExclude
    course:course
    lesson:lesson
              completionHandler: ^(array[LDLMS_v2_Topic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldTopicCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
  'ldTopicCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
  'ldTopicTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
  'ldTopicTagExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
  'course': 56, // {Integer} Limit results to be within a specific Course. Required for non-admin users.
  'lesson': 56 // {Integer} Limit results to be within a specific Lesson. Must be used with Course parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLdlmsV2Topic(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listLdlmsV2TopicExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldTopicCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy. (optional)  (default to null)
            var ldTopicCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy. (optional)  (default to null)
            var ldTopicTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy. (optional)  (default to null)
            var ldTopicTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy. (optional)  (default to null)
            var course = 56;  // Integer | Limit results to be within a specific Course. Required for non-admin users. (optional)  (default to null)
            var lesson = 56;  // Integer | Limit results to be within a specific Lesson. Must be used with Course parameter. (optional)  (default to null)

            try {
                // Get topics
                array[LDLMS_v2_Topic] result = apiInstance.listLdlmsV2Topic(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldTopicCategory, ldTopicCategoryExclude, ldTopicTag, ldTopicTagExclude, course, lesson);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.listLdlmsV2Topic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldTopicCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
$ldTopicCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
$ldTopicTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
$ldTopicTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
$course = 56; // Integer | Limit results to be within a specific Course. Required for non-admin users.
$lesson = 56; // Integer | Limit results to be within a specific Lesson. Must be used with Course parameter.

try {
    $result = $api_instance->listLdlmsV2Topic($context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldTopicCategory, $ldTopicCategoryExclude, $ldTopicTag, $ldTopicTagExclude, $course, $lesson);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->listLdlmsV2Topic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldTopicCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
my $ldTopicCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
my $ldTopicTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
my $ldTopicTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
my $course = 56; # Integer | Limit results to be within a specific Course. Required for non-admin users.
my $lesson = 56; # Integer | Limit results to be within a specific Lesson. Must be used with Course parameter.

eval {
    my $result = $api_instance->listLdlmsV2Topic(context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldTopicCategory => $ldTopicCategory, ldTopicCategoryExclude => $ldTopicCategoryExclude, ldTopicTag => $ldTopicTag, ldTopicTagExclude => $ldTopicTagExclude, course => $course, lesson => $lesson);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->listLdlmsV2Topic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldTopicCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_topic_category taxonomy. (optional) (default to null)
ldTopicCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy. (optional) (default to null)
ldTopicTag = Object # Object | Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy. (optional) (default to null)
ldTopicTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy. (optional) (default to null)
course = 56 # Integer | Limit results to be within a specific Course. Required for non-admin users. (optional) (default to null)
lesson = 56 # Integer | Limit results to be within a specific Lesson. Must be used with Course parameter. (optional) (default to null)

try:
    # Get topics
    api_response = api_instance.list_ldlms_v2_topic(context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldTopicCategory=ldTopicCategory, ldTopicCategoryExclude=ldTopicCategoryExclude, ldTopicTag=ldTopicTag, ldTopicTagExclude=ldTopicTagExclude, course=course, lesson=lesson)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->listLdlmsV2Topic: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldTopicCategory = Object; // Object
    let ldTopicCategoryExclude = Object; // Object
    let ldTopicTag = Object; // Object
    let ldTopicTagExclude = Object; // Object
    let course = 56; // Integer
    let lesson = 56; // Integer

    let mut context = TopicsApi::Context::default();
    let result = client.listLdlmsV2Topic(context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldTopicCategory, ldTopicCategoryExclude, ldTopicTag, ldTopicTagExclude, course, lesson, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_topic_category
Object
Limit result set to items with specific terms assigned in the ld_topic_category taxonomy.
ld_topic_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_topic_category taxonomy.
ld_topic_tag
Object
Limit result set to items with specific terms assigned in the ld_topic_tag taxonomy.
ld_topic_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_topic_tag taxonomy.
course
Integer
Limit results to be within a specific Course. Required for non-admin users.
lesson
Integer
Limit results to be within a specific Lesson. Must be used with Course parameter.

Responses


Update a topic

Partially updates an existing topic. Only the provided fields will be updated, leaving other fields unchanged.


/learndash/v1/ldlms/v2/sfwd-topic/{id}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.patchLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#patchLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Topic ID
final UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2TopicById: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.patchLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#patchLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
Integer *id = 56; // Topic ID (default to null)
UpdateLdlmsV2TopicByIdRequest *updateLdlmsV2TopicByIdRequest = ; //  (optional)

// Update a topic
[apiInstance patchLdlmsV2TopicByIdWith:id
    updateLdlmsV2TopicByIdRequest:updateLdlmsV2TopicByIdRequest
              completionHandler: ^(LDLMS_v2_Topic output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var id = 56; // {Integer} Topic ID
var opts = {
  'updateLdlmsV2TopicByIdRequest':  // {UpdateLdlmsV2TopicByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2TopicById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2TopicByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var id = 56;  // Integer | Topic ID (default to null)
            var updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest |  (optional) 

            try {
                // Update a topic
                LDLMS_v2_Topic result = apiInstance.patchLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.patchLdlmsV2TopicById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$id = 56; // Integer | Topic ID
$updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2TopicById($id, $updateLdlmsV2TopicByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->patchLdlmsV2TopicById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $id = 56; # Integer | Topic ID
my $updateLdlmsV2TopicByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2TopicByIdRequest->new(); # UpdateLdlmsV2TopicByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2TopicById(id => $id, updateLdlmsV2TopicByIdRequest => $updateLdlmsV2TopicByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->patchLdlmsV2TopicById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
id = 56 # Integer | Topic ID (default to null)
updateLdlmsV2TopicByIdRequest =  # UpdateLdlmsV2TopicByIdRequest |  (optional)

try:
    # Update a topic
    api_response = api_instance.patch_ldlms_v2_topic_by_id(id, updateLdlmsV2TopicByIdRequest=updateLdlmsV2TopicByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->patchLdlmsV2TopicById: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest

    let mut context = TopicsApi::Context::default();
    let result = client.patchLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Topic ID
Required
Request body

Responses


Update a topic

Updates an existing topic. Requires the complete topic data in the request body. All fields will be replaced with the provided values.


/learndash/v1/ldlms/v2/sfwd-topic/{id}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/sfwd-topic/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicsApi;

import java.io.File;
import java.util.*;

public class TopicsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.updateLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#updateLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | Topic ID
final UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2TopicById: $e\n');
}

import org.openapitools.client.api.TopicsApi;

public class TopicsApiExample {
    public static void main(String[] args) {
        TopicsApi apiInstance = new TopicsApi();
        Integer id = 56; // Integer | Topic ID
        UpdateLdlmsV2TopicByIdRequest updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

        try {
            LDLMS_v2_Topic result = apiInstance.updateLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicsApi#updateLdlmsV2TopicById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
TopicsApi *apiInstance = [[TopicsApi alloc] init];
Integer *id = 56; // Topic ID (default to null)
UpdateLdlmsV2TopicByIdRequest *updateLdlmsV2TopicByIdRequest = ; //  (optional)

// Update a topic
[apiInstance updateLdlmsV2TopicByIdWith:id
    updateLdlmsV2TopicByIdRequest:updateLdlmsV2TopicByIdRequest
              completionHandler: ^(LDLMS_v2_Topic output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.TopicsApi()
var id = 56; // {Integer} Topic ID
var opts = {
  'updateLdlmsV2TopicByIdRequest':  // {UpdateLdlmsV2TopicByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2TopicById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2TopicByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new TopicsApi();
            var id = 56;  // Integer | Topic ID (default to null)
            var updateLdlmsV2TopicByIdRequest = new UpdateLdlmsV2TopicByIdRequest(); // UpdateLdlmsV2TopicByIdRequest |  (optional) 

            try {
                // Update a topic
                LDLMS_v2_Topic result = apiInstance.updateLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicsApi.updateLdlmsV2TopicById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicsApi();
$id = 56; // Integer | Topic ID
$updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2TopicById($id, $updateLdlmsV2TopicByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicsApi->updateLdlmsV2TopicById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicsApi->new();
my $id = 56; # Integer | Topic ID
my $updateLdlmsV2TopicByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2TopicByIdRequest->new(); # UpdateLdlmsV2TopicByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2TopicById(id => $id, updateLdlmsV2TopicByIdRequest => $updateLdlmsV2TopicByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicsApi->updateLdlmsV2TopicById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.TopicsApi()
id = 56 # Integer | Topic ID (default to null)
updateLdlmsV2TopicByIdRequest =  # UpdateLdlmsV2TopicByIdRequest |  (optional)

try:
    # Update a topic
    api_response = api_instance.update_ldlms_v2_topic_by_id(id, updateLdlmsV2TopicByIdRequest=updateLdlmsV2TopicByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicsApi->updateLdlmsV2TopicById: %s\n" % e)
extern crate TopicsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2TopicByIdRequest = ; // UpdateLdlmsV2TopicByIdRequest

    let mut context = TopicsApi::Context::default();
    let result = client.updateLdlmsV2TopicById(id, updateLdlmsV2TopicByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
Topic ID
Required
Request body

Responses


User Course Progress

Get courses progress for a user

Retrieves the courses progress for a specific user.


/learndash/v1/ldlms/v2/users/{id}/course-progress

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/course-progress?context=view&exclude=[]&include=[]&per_page=10&page=1"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseProgressApi;

import java.io.File;
import java.util.*;

public class UserCourseProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseProgressApi apiInstance = new UserCourseProgressApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressById(id, context, exclude, include, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressApi#getLdlmsV2UsersCourseProgressById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final Integer page = new Integer(); // Integer | Current page of the collection.

try {
    final result = await api_instance.getLdlmsV2UsersCourseProgressById(id, context, exclude, include, perPage, page);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersCourseProgressById: $e\n');
}

import org.openapitools.client.api.UserCourseProgressApi;

public class UserCourseProgressApiExample {
    public static void main(String[] args) {
        UserCourseProgressApi apiInstance = new UserCourseProgressApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressById(id, context, exclude, include, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressApi#getLdlmsV2UsersCourseProgressById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseProgressApi *apiInstance = [[UserCourseProgressApi alloc] init];
Integer *id = 56; // User ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)

// Get courses progress for a user
[apiInstance getLdlmsV2UsersCourseProgressByIdWith:id
    context:context
    exclude:exclude
    include:include
    perPage:perPage
    page:page
              completionHandler: ^(array[LDLMS_v2_User_Course_Progress] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseProgressApi()
var id = 56; // {Integer} User ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'page': 1 // {Integer} Current page of the collection.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersCourseProgressById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersCourseProgressByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseProgressApi();
            var id = 56;  // Integer | User ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)

            try {
                // Get courses progress for a user
                array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressById(id, context, exclude, include, perPage, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseProgressApi.getLdlmsV2UsersCourseProgressById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseProgressApi();
$id = 56; // Integer | User ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$page = 1; // Integer | Current page of the collection.

try {
    $result = $api_instance->getLdlmsV2UsersCourseProgressById($id, $context, $exclude, $include, $perPage, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseProgressApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseProgressApi->new();
my $id = 56; # Integer | User ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $page = 1; # Integer | Current page of the collection.

eval {
    my $result = $api_instance->getLdlmsV2UsersCourseProgressById(id => $id, context => $context, exclude => $exclude, include => $include, perPage => $perPage, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseProgressApi()
id = 56 # Integer | User ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)

try:
    # Get courses progress for a user
    api_response = api_instance.get_ldlms_v2_users_course_progress_by_id(id, context=context, exclude=exclude, include=include, perPage=perPage, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressById: %s\n" % e)
extern crate UserCourseProgressApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let perPage = 10; // Integer
    let page = 1; // Integer

    let mut context = UserCourseProgressApi::Context::default();
    let result = client.getLdlmsV2UsersCourseProgressById(id, context, exclude, include, perPage, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
per_page
Integer
Maximum number of items to be returned in result set.
page
Integer
Current page of the collection.

Responses


Get course progress for a user

Retrieves the course progress for a specific user.


/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseProgressApi;

import java.io.File;
import java.util.*;

public class UserCourseProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseProgressApi apiInstance = new UserCourseProgressApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID

        try {
            array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressApi#getLdlmsV2UsersCourseProgressByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID

try {
    final result = await api_instance.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersCourseProgressByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseProgressApi;

public class UserCourseProgressApiExample {
    public static void main(String[] args) {
        UserCourseProgressApi apiInstance = new UserCourseProgressApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID

        try {
            array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressApi#getLdlmsV2UsersCourseProgressByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseProgressApi *apiInstance = [[UserCourseProgressApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)

// Get course progress for a user
[apiInstance getLdlmsV2UsersCourseProgressByIdAndCourseWith:id
    course:course
              completionHandler: ^(array[LDLMS_v2_User_Course_Progress] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseProgressApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersCourseProgressByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseProgressApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)

            try {
                // Get course progress for a user
                array[LDLMS_v2_User_Course_Progress] result = apiInstance.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseProgressApi.getLdlmsV2UsersCourseProgressByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseProgressApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID

try {
    $result = $api_instance->getLdlmsV2UsersCourseProgressByIdAndCourse($id, $course);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseProgressApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseProgressApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID

eval {
    my $result = $api_instance->getLdlmsV2UsersCourseProgressByIdAndCourse(id => $id, course => $course);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseProgressApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)

try:
    # Get course progress for a user
    api_response = api_instance.get_ldlms_v2_users_course_progress_by_id_and_course(id, course)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseProgressApi->getLdlmsV2UsersCourseProgressByIdAndCourse: %s\n" % e)
extern crate UserCourseProgressApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer

    let mut context = UserCourseProgressApi::Context::default();
    let result = client.getLdlmsV2UsersCourseProgressByIdAndCourse(id, course, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required

Responses


User Course Progress Challenge Exam

Get challenge exam progress for a user in a course

Retrieves the challenge exam progress for a specific user in a specific course.


/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}/exam

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}/exam"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseProgressChallengeExamApi;

import java.io.File;
import java.util.*;

public class UserCourseProgressChallengeExamApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseProgressChallengeExamApi apiInstance = new UserCourseProgressChallengeExamApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID

        try {
            LDLMS_v2_User_Course_Progress_Exam result = apiInstance.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressChallengeExamApi#getLdlmsV2UsersCourseProgressExamByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID

try {
    final result = await api_instance.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersCourseProgressExamByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseProgressChallengeExamApi;

public class UserCourseProgressChallengeExamApiExample {
    public static void main(String[] args) {
        UserCourseProgressChallengeExamApi apiInstance = new UserCourseProgressChallengeExamApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID

        try {
            LDLMS_v2_User_Course_Progress_Exam result = apiInstance.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressChallengeExamApi#getLdlmsV2UsersCourseProgressExamByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseProgressChallengeExamApi *apiInstance = [[UserCourseProgressChallengeExamApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)

// Get challenge exam progress for a user in a course
[apiInstance getLdlmsV2UsersCourseProgressExamByIdAndCourseWith:id
    course:course
              completionHandler: ^(LDLMS_v2_User_Course_Progress_Exam output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseProgressChallengeExamApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersCourseProgressExamByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseProgressChallengeExamApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)

            try {
                // Get challenge exam progress for a user in a course
                LDLMS_v2_User_Course_Progress_Exam result = apiInstance.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseProgressChallengeExamApi.getLdlmsV2UsersCourseProgressExamByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseProgressChallengeExamApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID

try {
    $result = $api_instance->getLdlmsV2UsersCourseProgressExamByIdAndCourse($id, $course);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseProgressChallengeExamApi->getLdlmsV2UsersCourseProgressExamByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseProgressChallengeExamApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseProgressChallengeExamApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID

eval {
    my $result = $api_instance->getLdlmsV2UsersCourseProgressExamByIdAndCourse(id => $id, course => $course);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseProgressChallengeExamApi->getLdlmsV2UsersCourseProgressExamByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseProgressChallengeExamApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)

try:
    # Get challenge exam progress for a user in a course
    api_response = api_instance.get_ldlms_v2_users_course_progress_exam_by_id_and_course(id, course)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseProgressChallengeExamApi->getLdlmsV2UsersCourseProgressExamByIdAndCourse: %s\n" % e)
extern crate UserCourseProgressChallengeExamApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer

    let mut context = UserCourseProgressChallengeExamApi::Context::default();
    let result = client.getLdlmsV2UsersCourseProgressExamByIdAndCourse(id, course, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required

Responses


User Course Progress Steps

Get course progress steps for a user

Retrieves the course progress steps for a specific user.


/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}/steps

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/course-progress/{course}/steps?exclude=[]&include=[]&per_page=10&page=1"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseProgressStepsApi;

import java.io.File;
import java.util.*;

public class UserCourseProgressStepsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseProgressStepsApi apiInstance = new UserCourseProgressStepsApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[LDLMS_v2_User_Course_Progress_Step] result = apiInstance.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, exclude, include, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressStepsApi#getLdlmsV2UsersCourseProgressStepsByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final Integer page = new Integer(); // Integer | Current page of the collection.

try {
    final result = await api_instance.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, exclude, include, perPage, page);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersCourseProgressStepsByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseProgressStepsApi;

public class UserCourseProgressStepsApiExample {
    public static void main(String[] args) {
        UserCourseProgressStepsApi apiInstance = new UserCourseProgressStepsApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[LDLMS_v2_User_Course_Progress_Step] result = apiInstance.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, exclude, include, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseProgressStepsApi#getLdlmsV2UsersCourseProgressStepsByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseProgressStepsApi *apiInstance = [[UserCourseProgressStepsApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)

// Get course progress steps for a user
[apiInstance getLdlmsV2UsersCourseProgressStepsByIdAndCourseWith:id
    course:course
    exclude:exclude
    include:include
    perPage:perPage
    page:page
              completionHandler: ^(array[LDLMS_v2_User_Course_Progress_Step] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseProgressStepsApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID
var opts = {
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'page': 1 // {Integer} Current page of the collection.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersCourseProgressStepsByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseProgressStepsApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)

            try {
                // Get course progress steps for a user
                array[LDLMS_v2_User_Course_Progress_Step] result = apiInstance.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, exclude, include, perPage, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseProgressStepsApi.getLdlmsV2UsersCourseProgressStepsByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseProgressStepsApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$page = 1; // Integer | Current page of the collection.

try {
    $result = $api_instance->getLdlmsV2UsersCourseProgressStepsByIdAndCourse($id, $course, $exclude, $include, $perPage, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseProgressStepsApi->getLdlmsV2UsersCourseProgressStepsByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseProgressStepsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseProgressStepsApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $page = 1; # Integer | Current page of the collection.

eval {
    my $result = $api_instance->getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id => $id, course => $course, exclude => $exclude, include => $include, perPage => $perPage, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseProgressStepsApi->getLdlmsV2UsersCourseProgressStepsByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseProgressStepsApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)

try:
    # Get course progress steps for a user
    api_response = api_instance.get_ldlms_v2_users_course_progress_steps_by_id_and_course(id, course, exclude=exclude, include=include, perPage=perPage, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseProgressStepsApi->getLdlmsV2UsersCourseProgressStepsByIdAndCourse: %s\n" % e)
extern crate UserCourseProgressStepsApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let perPage = 10; // Integer
    let page = 1; // Integer

    let mut context = UserCourseProgressStepsApi::Context::default();
    let result = client.getLdlmsV2UsersCourseProgressStepsByIdAndCourse(id, course, exclude, include, perPage, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required
Query parameters
Name Description
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
per_page
Integer
Maximum number of items to be returned in result set.
page
Integer
Current page of the collection.

Responses


User Course Update

Update the course enrollment date for a user

Updates the enrollment date for a specific course for a user.


/learndash/v1/ldlms/v2/users/{id}/courses/{course}

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses/{course}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseUpdateApi;

import java.io.File;
import java.util.*;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.createLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#createLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID
final UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    final result = await api_instance.createLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2UsersCoursesByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseUpdateApi;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.createLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#createLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseUpdateApi *apiInstance = [[UserCourseUpdateApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)
UpdateLdlmsV2UsersCoursesByIdAndCourseRequest *updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; //  (optional)

// Update the course enrollment date for a user
[apiInstance createLdlmsV2UsersCoursesByIdAndCourseWith:id
    course:course
    updateLdlmsV2UsersCoursesByIdAndCourseRequest:updateLdlmsV2UsersCoursesByIdAndCourseRequest
              completionHandler: ^(update_ldlms_v2_users_courses_by_id_and_course_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseUpdateApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdAndCourseRequest':  // {UpdateLdlmsV2UsersCoursesByIdAndCourseRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2UsersCoursesByIdAndCourse(id, course, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2UsersCoursesByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseUpdateApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional) 

            try {
                // Update the course enrollment date for a user
                update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.createLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseUpdateApi.createLdlmsV2UsersCoursesByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseUpdateApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID
$updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    $result = $api_instance->createLdlmsV2UsersCoursesByIdAndCourse($id, $course, $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseUpdateApi->createLdlmsV2UsersCoursesByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseUpdateApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseUpdateApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID
my $updateLdlmsV2UsersCoursesByIdAndCourseRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdAndCourseRequest->new(); # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

eval {
    my $result = $api_instance->createLdlmsV2UsersCoursesByIdAndCourse(id => $id, course => $course, updateLdlmsV2UsersCoursesByIdAndCourseRequest => $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseUpdateApi->createLdlmsV2UsersCoursesByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseUpdateApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)
updateLdlmsV2UsersCoursesByIdAndCourseRequest =  # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional)

try:
    # Update the course enrollment date for a user
    api_response = api_instance.create_ldlms_v2_users_courses_by_id_and_course(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest=updateLdlmsV2UsersCoursesByIdAndCourseRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseUpdateApi->createLdlmsV2UsersCoursesByIdAndCourse: %s\n" % e)
extern crate UserCourseUpdateApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest

    let mut context = UserCourseUpdateApi::Context::default();
    let result = client.createLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required
Request body

Responses


Update the course enrollment date for a user

Updates the enrollment date for a specific course for a user.


/learndash/v1/ldlms/v2/users/{id}/courses/{course}

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses/{course}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseUpdateApi;

import java.io.File;
import java.util.*;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#patchLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID
final UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    final result = await api_instance.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2UsersCoursesByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseUpdateApi;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#patchLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseUpdateApi *apiInstance = [[UserCourseUpdateApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)
UpdateLdlmsV2UsersCoursesByIdAndCourseRequest *updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; //  (optional)

// Update the course enrollment date for a user
[apiInstance patchLdlmsV2UsersCoursesByIdAndCourseWith:id
    course:course
    updateLdlmsV2UsersCoursesByIdAndCourseRequest:updateLdlmsV2UsersCoursesByIdAndCourseRequest
              completionHandler: ^(update_ldlms_v2_users_courses_by_id_and_course_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseUpdateApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdAndCourseRequest':  // {UpdateLdlmsV2UsersCoursesByIdAndCourseRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2UsersCoursesByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseUpdateApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional) 

            try {
                // Update the course enrollment date for a user
                update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseUpdateApi.patchLdlmsV2UsersCoursesByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseUpdateApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID
$updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    $result = $api_instance->patchLdlmsV2UsersCoursesByIdAndCourse($id, $course, $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseUpdateApi->patchLdlmsV2UsersCoursesByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseUpdateApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseUpdateApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID
my $updateLdlmsV2UsersCoursesByIdAndCourseRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdAndCourseRequest->new(); # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2UsersCoursesByIdAndCourse(id => $id, course => $course, updateLdlmsV2UsersCoursesByIdAndCourseRequest => $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseUpdateApi->patchLdlmsV2UsersCoursesByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseUpdateApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)
updateLdlmsV2UsersCoursesByIdAndCourseRequest =  # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional)

try:
    # Update the course enrollment date for a user
    api_response = api_instance.patch_ldlms_v2_users_courses_by_id_and_course(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest=updateLdlmsV2UsersCoursesByIdAndCourseRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseUpdateApi->patchLdlmsV2UsersCoursesByIdAndCourse: %s\n" % e)
extern crate UserCourseUpdateApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest

    let mut context = UserCourseUpdateApi::Context::default();
    let result = client.patchLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required
Request body

Responses


Update the course enrollment date for a user

Updates the enrollment date for a specific course for a user.


/learndash/v1/ldlms/v2/users/{id}/courses/{course}

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses/{course}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCourseUpdateApi;

import java.io.File;
import java.util.*;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#updateLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer course = new Integer(); // Integer | Course ID
final UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    final result = await api_instance.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2UsersCoursesByIdAndCourse: $e\n');
}

import org.openapitools.client.api.UserCourseUpdateApi;

public class UserCourseUpdateApiExample {
    public static void main(String[] args) {
        UserCourseUpdateApi apiInstance = new UserCourseUpdateApi();
        Integer id = 56; // Integer | User ID
        Integer course = 56; // Integer | Course ID
        UpdateLdlmsV2UsersCoursesByIdAndCourseRequest updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

        try {
            update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCourseUpdateApi#updateLdlmsV2UsersCoursesByIdAndCourse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCourseUpdateApi *apiInstance = [[UserCourseUpdateApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *course = 56; // Course ID (default to null)
UpdateLdlmsV2UsersCoursesByIdAndCourseRequest *updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; //  (optional)

// Update the course enrollment date for a user
[apiInstance updateLdlmsV2UsersCoursesByIdAndCourseWith:id
    course:course
    updateLdlmsV2UsersCoursesByIdAndCourseRequest:updateLdlmsV2UsersCoursesByIdAndCourseRequest
              completionHandler: ^(update_ldlms_v2_users_courses_by_id_and_course_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCourseUpdateApi()
var id = 56; // {Integer} User ID
var course = 56; // {Integer} Course ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdAndCourseRequest':  // {UpdateLdlmsV2UsersCoursesByIdAndCourseRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2UsersCoursesByIdAndCourseExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCourseUpdateApi();
            var id = 56;  // Integer | User ID (default to null)
            var course = 56;  // Integer | Course ID (default to null)
            var updateLdlmsV2UsersCoursesByIdAndCourseRequest = new UpdateLdlmsV2UsersCoursesByIdAndCourseRequest(); // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional) 

            try {
                // Update the course enrollment date for a user
                update_ldlms_v2_users_courses_by_id_and_course_200_response result = apiInstance.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCourseUpdateApi.updateLdlmsV2UsersCoursesByIdAndCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCourseUpdateApi();
$id = 56; // Integer | User ID
$course = 56; // Integer | Course ID
$updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

try {
    $result = $api_instance->updateLdlmsV2UsersCoursesByIdAndCourse($id, $course, $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCourseUpdateApi->updateLdlmsV2UsersCoursesByIdAndCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCourseUpdateApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCourseUpdateApi->new();
my $id = 56; # Integer | User ID
my $course = 56; # Integer | Course ID
my $updateLdlmsV2UsersCoursesByIdAndCourseRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdAndCourseRequest->new(); # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2UsersCoursesByIdAndCourse(id => $id, course => $course, updateLdlmsV2UsersCoursesByIdAndCourseRequest => $updateLdlmsV2UsersCoursesByIdAndCourseRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCourseUpdateApi->updateLdlmsV2UsersCoursesByIdAndCourse: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCourseUpdateApi()
id = 56 # Integer | User ID (default to null)
course = 56 # Integer | Course ID (default to null)
updateLdlmsV2UsersCoursesByIdAndCourseRequest =  # UpdateLdlmsV2UsersCoursesByIdAndCourseRequest |  (optional)

try:
    # Update the course enrollment date for a user
    api_response = api_instance.update_ldlms_v2_users_courses_by_id_and_course(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest=updateLdlmsV2UsersCoursesByIdAndCourseRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCourseUpdateApi->updateLdlmsV2UsersCoursesByIdAndCourse: %s\n" % e)
extern crate UserCourseUpdateApi;

pub fn main() {
    let id = 56; // Integer
    let course = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdAndCourseRequest = ; // UpdateLdlmsV2UsersCoursesByIdAndCourseRequest

    let mut context = UserCourseUpdateApi::Context::default();
    let result = client.updateLdlmsV2UsersCoursesByIdAndCourse(id, course, updateLdlmsV2UsersCoursesByIdAndCourseRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
course*
Integer
Course ID
Required
Request body

Responses


User Courses

Update associated courses for a user

Adds courses to a specific user.


/learndash/v1/ldlms/v2/users/{id}/courses

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCoursesApi;

import java.io.File;
import java.util.*;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#createLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2UsersCoursesById: $e\n');
}

import org.openapitools.client.api.UserCoursesApi;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#createLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCoursesApi *apiInstance = [[UserCoursesApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersCoursesByIdRequest *updateLdlmsV2UsersCoursesByIdRequest = ; //  (optional)

// Update associated courses for a user
[apiInstance createLdlmsV2UsersCoursesByIdWith:id
    updateLdlmsV2UsersCoursesByIdRequest:updateLdlmsV2UsersCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCoursesApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdRequest':  // {UpdateLdlmsV2UsersCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2UsersCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2UsersCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCoursesApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a user
                array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCoursesApi.createLdlmsV2UsersCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCoursesApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2UsersCoursesById($id, $updateLdlmsV2UsersCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCoursesApi->createLdlmsV2UsersCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCoursesApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdRequest->new(); # UpdateLdlmsV2UsersCoursesByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2UsersCoursesById(id => $id, updateLdlmsV2UsersCoursesByIdRequest => $updateLdlmsV2UsersCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCoursesApi->createLdlmsV2UsersCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCoursesApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersCoursesByIdRequest =  # UpdateLdlmsV2UsersCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a user
    api_response = api_instance.create_ldlms_v2_users_courses_by_id(id, updateLdlmsV2UsersCoursesByIdRequest=updateLdlmsV2UsersCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCoursesApi->createLdlmsV2UsersCoursesById: %s\n" % e)
extern crate UserCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest

    let mut context = UserCoursesApi::Context::default();
    let result = client.createLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


Delete associated courses for a user

Removes courses from a specific user.


/learndash/v1/ldlms/v2/users/{id}/courses

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses?course_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCoursesApi;

import java.io.File;
import java.util.*;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        array[Integer] courseIds = ; // array[Integer] | Course IDs to remove from User.

        try {
            array[delete_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersCoursesById(id, courseIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#deleteLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final array[Integer] courseIds = new array[Integer](); // array[Integer] | Course IDs to remove from User.

try {
    final result = await api_instance.deleteLdlmsV2UsersCoursesById(id, courseIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2UsersCoursesById: $e\n');
}

import org.openapitools.client.api.UserCoursesApi;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        array[Integer] courseIds = ; // array[Integer] | Course IDs to remove from User.

        try {
            array[delete_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersCoursesById(id, courseIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#deleteLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCoursesApi *apiInstance = [[UserCoursesApi alloc] init];
Integer *id = 56; // User ID (default to null)
array[Integer] *courseIds = ; // Course IDs to remove from User. (optional) (default to null)

// Delete associated courses for a user
[apiInstance deleteLdlmsV2UsersCoursesByIdWith:id
    courseIds:courseIds
              completionHandler: ^(array[delete_ldlms_v2_users_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCoursesApi()
var id = 56; // {Integer} User ID
var opts = {
  'courseIds':  // {array[Integer]} Course IDs to remove from User.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2UsersCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2UsersCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCoursesApi();
            var id = 56;  // Integer | User ID (default to null)
            var courseIds = new array[Integer](); // array[Integer] | Course IDs to remove from User. (optional)  (default to null)

            try {
                // Delete associated courses for a user
                array[delete_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersCoursesById(id, courseIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCoursesApi.deleteLdlmsV2UsersCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCoursesApi();
$id = 56; // Integer | User ID
$courseIds = ; // array[Integer] | Course IDs to remove from User.

try {
    $result = $api_instance->deleteLdlmsV2UsersCoursesById($id, $courseIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCoursesApi->deleteLdlmsV2UsersCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCoursesApi->new();
my $id = 56; # Integer | User ID
my $courseIds = []; # array[Integer] | Course IDs to remove from User.

eval {
    my $result = $api_instance->deleteLdlmsV2UsersCoursesById(id => $id, courseIds => $courseIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCoursesApi->deleteLdlmsV2UsersCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCoursesApi()
id = 56 # Integer | User ID (default to null)
courseIds =  # array[Integer] | Course IDs to remove from User. (optional) (default to null)

try:
    # Delete associated courses for a user
    api_response = api_instance.delete_ldlms_v2_users_courses_by_id(id, courseIds=courseIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCoursesApi->deleteLdlmsV2UsersCoursesById: %s\n" % e)
extern crate UserCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let courseIds = ; // array[Integer]

    let mut context = UserCoursesApi::Context::default();
    let result = client.deleteLdlmsV2UsersCoursesById(id, courseIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
course_ids
array[Integer]
Course IDs to remove from User.

Responses


Get associated courses for a user

Retrieves the courses for a specific user.


/learndash/v1/ldlms/v2/users/{id}/courses

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&menu_order=56&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&ld_course_category=Object&ld_course_category_exclude=Object&ld_course_tag=Object&ld_course_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCoursesApi;

import java.io.File;
import java.util.*;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[get_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#getLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final Integer menuOrder = new Integer(); // Integer | Limit result set to posts with a specific menu_order value.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
final Object ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
final Object ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    final result = await api_instance.getLdlmsV2UsersCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersCoursesById: $e\n');
}

import org.openapitools.client.api.UserCoursesApi;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        Integer menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
        Object ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
        Object ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

        try {
            array[get_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#getLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCoursesApi *apiInstance = [[UserCoursesApi alloc] init];
Integer *id = 56; // User ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
Integer *menuOrder = 56; // Limit result set to posts with a specific menu_order value. (optional) (default to null)
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *ldCourseCategory = Object; // Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
Object *ldCourseTag = Object; // Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
Object *ldCourseTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

// Get associated courses for a user
[apiInstance getLdlmsV2UsersCoursesByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    menuOrder:menuOrder
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    ldCourseCategory:ldCourseCategory
    ldCourseCategoryExclude:ldCourseCategoryExclude
    ldCourseTag:ldCourseTag
    ldCourseTagExclude:ldCourseTagExclude
              completionHandler: ^(array[get_ldlms_v2_users_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCoursesApi()
var id = 56; // {Integer} User ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'menuOrder': 56, // {Integer} Limit result set to posts with a specific menu_order value.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'ldCourseCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
  'ldCourseTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
  'ldCourseTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCoursesApi();
            var id = 56;  // Integer | User ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var menuOrder = 56;  // Integer | Limit result set to posts with a specific menu_order value. (optional)  (default to null)
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var ldCourseCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional)  (default to null)
            var ldCourseTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)
            var ldCourseTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional)  (default to null)

            try {
                // Get associated courses for a user
                array[get_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCoursesApi.getLdlmsV2UsersCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCoursesApi();
$id = 56; // Integer | User ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$menuOrder = 56; // Integer | Limit result set to posts with a specific menu_order value.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$ldCourseCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
$ldCourseCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
$ldCourseTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
$ldCourseTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

try {
    $result = $api_instance->getLdlmsV2UsersCoursesById($id, $context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $menuOrder, $searchSemantics, $offset, $order, $orderby, $searchColumns, $slug, $status, $taxRelation, $ldCourseCategory, $ldCourseCategoryExclude, $ldCourseTag, $ldCourseTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCoursesApi->getLdlmsV2UsersCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCoursesApi->new();
my $id = 56; # Integer | User ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $menuOrder = 56; # Integer | Limit result set to posts with a specific menu_order value.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $ldCourseCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
my $ldCourseTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
my $ldCourseTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

eval {
    my $result = $api_instance->getLdlmsV2UsersCoursesById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, menuOrder => $menuOrder, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, ldCourseCategory => $ldCourseCategory, ldCourseCategoryExclude => $ldCourseCategoryExclude, ldCourseTag => $ldCourseTag, ldCourseTagExclude => $ldCourseTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCoursesApi->getLdlmsV2UsersCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCoursesApi()
id = 56 # Integer | User ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
menuOrder = 56 # Integer | Limit result set to posts with a specific menu_order value. (optional) (default to null)
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
ldCourseCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy. (optional) (default to null)
ldCourseTag = Object # Object | Limit result set to items with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)
ldCourseTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy. (optional) (default to null)

try:
    # Get associated courses for a user
    api_response = api_instance.get_ldlms_v2_users_courses_by_id(id, context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, menuOrder=menuOrder, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, ldCourseCategory=ldCourseCategory, ldCourseCategoryExclude=ldCourseCategoryExclude, ldCourseTag=ldCourseTag, ldCourseTagExclude=ldCourseTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCoursesApi->getLdlmsV2UsersCoursesById: %s\n" % e)
extern crate UserCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let menuOrder = 56; // Integer
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let ldCourseCategory = Object; // Object
    let ldCourseCategoryExclude = Object; // Object
    let ldCourseTag = Object; // Object
    let ldCourseTagExclude = Object; // Object

    let mut context = UserCoursesApi::Context::default();
    let result = client.getLdlmsV2UsersCoursesById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, menuOrder, searchSemantics, offset, order, orderby, searchColumns, slug, status, taxRelation, ldCourseCategory, ldCourseCategoryExclude, ldCourseTag, ldCourseTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
menu_order
Integer
Limit result set to posts with a specific menu_order value.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
ld_course_category
Object
Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
ld_course_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
ld_course_tag
Object
Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
ld_course_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

Responses


Update associated courses for a user

Update associated courses for a user.


/learndash/v1/ldlms/v2/users/{id}/courses

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCoursesApi;

import java.io.File;
import java.util.*;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#patchLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2UsersCoursesById: $e\n');
}

import org.openapitools.client.api.UserCoursesApi;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#patchLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCoursesApi *apiInstance = [[UserCoursesApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersCoursesByIdRequest *updateLdlmsV2UsersCoursesByIdRequest = ; //  (optional)

// Update associated courses for a user
[apiInstance patchLdlmsV2UsersCoursesByIdWith:id
    updateLdlmsV2UsersCoursesByIdRequest:updateLdlmsV2UsersCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCoursesApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdRequest':  // {UpdateLdlmsV2UsersCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2UsersCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2UsersCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCoursesApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a user
                array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCoursesApi.patchLdlmsV2UsersCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCoursesApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2UsersCoursesById($id, $updateLdlmsV2UsersCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCoursesApi->patchLdlmsV2UsersCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCoursesApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdRequest->new(); # UpdateLdlmsV2UsersCoursesByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2UsersCoursesById(id => $id, updateLdlmsV2UsersCoursesByIdRequest => $updateLdlmsV2UsersCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCoursesApi->patchLdlmsV2UsersCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCoursesApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersCoursesByIdRequest =  # UpdateLdlmsV2UsersCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a user
    api_response = api_instance.patch_ldlms_v2_users_courses_by_id(id, updateLdlmsV2UsersCoursesByIdRequest=updateLdlmsV2UsersCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCoursesApi->patchLdlmsV2UsersCoursesById: %s\n" % e)
extern crate UserCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest

    let mut context = UserCoursesApi::Context::default();
    let result = client.patchLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


Update associated courses for a user

Update associated courses for a user.


/learndash/v1/ldlms/v2/users/{id}/courses

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/courses" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserCoursesApi;

import java.io.File;
import java.util.*;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#updateLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2UsersCoursesById: $e\n');
}

import org.openapitools.client.api.UserCoursesApi;

public class UserCoursesApiExample {
    public static void main(String[] args) {
        UserCoursesApi apiInstance = new UserCoursesApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersCoursesByIdRequest updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

        try {
            array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserCoursesApi#updateLdlmsV2UsersCoursesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserCoursesApi *apiInstance = [[UserCoursesApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersCoursesByIdRequest *updateLdlmsV2UsersCoursesByIdRequest = ; //  (optional)

// Update associated courses for a user
[apiInstance updateLdlmsV2UsersCoursesByIdWith:id
    updateLdlmsV2UsersCoursesByIdRequest:updateLdlmsV2UsersCoursesByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_courses_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserCoursesApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersCoursesByIdRequest':  // {UpdateLdlmsV2UsersCoursesByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2UsersCoursesById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2UsersCoursesByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserCoursesApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersCoursesByIdRequest = new UpdateLdlmsV2UsersCoursesByIdRequest(); // UpdateLdlmsV2UsersCoursesByIdRequest |  (optional) 

            try {
                // Update associated courses for a user
                array[update_ldlms_v2_users_courses_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserCoursesApi.updateLdlmsV2UsersCoursesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserCoursesApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2UsersCoursesById($id, $updateLdlmsV2UsersCoursesByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserCoursesApi->updateLdlmsV2UsersCoursesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserCoursesApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserCoursesApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersCoursesByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersCoursesByIdRequest->new(); # UpdateLdlmsV2UsersCoursesByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2UsersCoursesById(id => $id, updateLdlmsV2UsersCoursesByIdRequest => $updateLdlmsV2UsersCoursesByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserCoursesApi->updateLdlmsV2UsersCoursesById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserCoursesApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersCoursesByIdRequest =  # UpdateLdlmsV2UsersCoursesByIdRequest |  (optional)

try:
    # Update associated courses for a user
    api_response = api_instance.update_ldlms_v2_users_courses_by_id(id, updateLdlmsV2UsersCoursesByIdRequest=updateLdlmsV2UsersCoursesByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserCoursesApi->updateLdlmsV2UsersCoursesById: %s\n" % e)
extern crate UserCoursesApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersCoursesByIdRequest = ; // UpdateLdlmsV2UsersCoursesByIdRequest

    let mut context = UserCoursesApi::Context::default();
    let result = client.updateLdlmsV2UsersCoursesById(id, updateLdlmsV2UsersCoursesByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


User Groups

Update associated groups for a user

Adds groups to a specific user.


/learndash/v1/ldlms/v2/users/{id}/groups

Usage and SDK Samples

curl -X POST \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserGroupsApi;

import java.io.File;
import java.util.*;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#createLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    final result = await api_instance.createLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createLdlmsV2UsersGroupsById: $e\n');
}

import org.openapitools.client.api.UserGroupsApi;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#createLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserGroupsApi *apiInstance = [[UserGroupsApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersGroupsByIdRequest *updateLdlmsV2UsersGroupsByIdRequest = ; //  (optional)

// Update associated groups for a user
[apiInstance createLdlmsV2UsersGroupsByIdWith:id
    updateLdlmsV2UsersGroupsByIdRequest:updateLdlmsV2UsersGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserGroupsApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersGroupsByIdRequest':  // {UpdateLdlmsV2UsersGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLdlmsV2UsersGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createLdlmsV2UsersGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserGroupsApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a user
                array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.createLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserGroupsApi.createLdlmsV2UsersGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserGroupsApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    $result = $api_instance->createLdlmsV2UsersGroupsById($id, $updateLdlmsV2UsersGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->createLdlmsV2UsersGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserGroupsApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersGroupsByIdRequest->new(); # UpdateLdlmsV2UsersGroupsByIdRequest | 

eval {
    my $result = $api_instance->createLdlmsV2UsersGroupsById(id => $id, updateLdlmsV2UsersGroupsByIdRequest => $updateLdlmsV2UsersGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserGroupsApi->createLdlmsV2UsersGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserGroupsApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersGroupsByIdRequest =  # UpdateLdlmsV2UsersGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a user
    api_response = api_instance.create_ldlms_v2_users_groups_by_id(id, updateLdlmsV2UsersGroupsByIdRequest=updateLdlmsV2UsersGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserGroupsApi->createLdlmsV2UsersGroupsById: %s\n" % e)
extern crate UserGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest

    let mut context = UserGroupsApi::Context::default();
    let result = client.createLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


Delete associated groups for a user

Removes groups from a specific user.


/learndash/v1/ldlms/v2/users/{id}/groups

Usage and SDK Samples

curl -X DELETE \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/groups?group_ids="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserGroupsApi;

import java.io.File;
import java.util.*;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        array[Integer] groupIds = ; // array[Integer] | Group IDs to remove from User.

        try {
            array[delete_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersGroupsById(id, groupIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#deleteLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final array[Integer] groupIds = new array[Integer](); // array[Integer] | Group IDs to remove from User.

try {
    final result = await api_instance.deleteLdlmsV2UsersGroupsById(id, groupIds);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteLdlmsV2UsersGroupsById: $e\n');
}

import org.openapitools.client.api.UserGroupsApi;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        array[Integer] groupIds = ; // array[Integer] | Group IDs to remove from User.

        try {
            array[delete_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersGroupsById(id, groupIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#deleteLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserGroupsApi *apiInstance = [[UserGroupsApi alloc] init];
Integer *id = 56; // User ID (default to null)
array[Integer] *groupIds = ; // Group IDs to remove from User. (optional) (default to null)

// Delete associated groups for a user
[apiInstance deleteLdlmsV2UsersGroupsByIdWith:id
    groupIds:groupIds
              completionHandler: ^(array[delete_ldlms_v2_users_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserGroupsApi()
var id = 56; // {Integer} User ID
var opts = {
  'groupIds':  // {array[Integer]} Group IDs to remove from User.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLdlmsV2UsersGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteLdlmsV2UsersGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserGroupsApi();
            var id = 56;  // Integer | User ID (default to null)
            var groupIds = new array[Integer](); // array[Integer] | Group IDs to remove from User. (optional)  (default to null)

            try {
                // Delete associated groups for a user
                array[delete_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.deleteLdlmsV2UsersGroupsById(id, groupIds);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserGroupsApi.deleteLdlmsV2UsersGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserGroupsApi();
$id = 56; // Integer | User ID
$groupIds = ; // array[Integer] | Group IDs to remove from User.

try {
    $result = $api_instance->deleteLdlmsV2UsersGroupsById($id, $groupIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->deleteLdlmsV2UsersGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserGroupsApi->new();
my $id = 56; # Integer | User ID
my $groupIds = []; # array[Integer] | Group IDs to remove from User.

eval {
    my $result = $api_instance->deleteLdlmsV2UsersGroupsById(id => $id, groupIds => $groupIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserGroupsApi->deleteLdlmsV2UsersGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserGroupsApi()
id = 56 # Integer | User ID (default to null)
groupIds =  # array[Integer] | Group IDs to remove from User. (optional) (default to null)

try:
    # Delete associated groups for a user
    api_response = api_instance.delete_ldlms_v2_users_groups_by_id(id, groupIds=groupIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserGroupsApi->deleteLdlmsV2UsersGroupsById: %s\n" % e)
extern crate UserGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let groupIds = ; // array[Integer]

    let mut context = UserGroupsApi::Context::default();
    let result = client.deleteLdlmsV2UsersGroupsById(id, groupIds, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
group_ids
array[Integer]
Group IDs to remove from User.

Responses


Get associated groups for a user

Retrieves the groups for a specific user.


/learndash/v1/ldlms/v2/users/{id}/groups

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/groups?context=view&page=1&per_page=10&search=search_example&after=after_example&modified_after=modifiedAfter_example&author=[]&author_exclude=[]&before=before_example&modified_before=modifiedBefore_example&exclude=[]&include=[]&search_semantics=searchSemantics_example&offset=56&order=asc&orderby=title&parent=[]&parent_exclude=[]&search_columns=[]&slug=&status=["publish"]&tax_relation=taxRelation_example&categories=Object&categories_exclude=Object&tags=Object&tags_exclude=Object&ld_group_category=Object&ld_group_category_exclude=Object&ld_group_tag=Object&ld_group_tag_exclude=Object"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserGroupsApi;

import java.io.File;
import java.util.*;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2UsersGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#getLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final Integer page = new Integer(); // Integer | Current page of the collection.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final String search = new String(); // String | Limit results to those matching a string.
final String after = new String(); // String | Limit response to posts published after a given ISO8601 compliant date.
final String modifiedAfter = new String(); // String | Limit response to posts modified after a given ISO8601 compliant date.
final array[Integer] author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors.
final array[Integer] authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors.
final String before = new String(); // String | Limit response to posts published before a given ISO8601 compliant date.
final String modifiedBefore = new String(); // String | Limit response to posts modified before a given ISO8601 compliant date.
final array[Integer] exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs.
final array[Integer] include = new array[Integer](); // array[Integer] | Limit result set to specific IDs.
final String searchSemantics = new String(); // String | How to interpret the search input.
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final String orderby = new String(); // String | Sort collection by post attribute.
final array[Integer] parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs.
final array[Integer] parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID.
final array[String] searchColumns = new array[String](); // array[String] | Array of column names to be searched.
final array[String] slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs.
final array[String] status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses.
final String taxRelation = new String(); // String | Limit result set based on relationship between multiple taxonomies.
final Object categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
final Object categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
final Object tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
final Object tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
final Object ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
final Object ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
final Object ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    final result = await api_instance.getLdlmsV2UsersGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersGroupsById: $e\n');
}

import org.openapitools.client.api.UserGroupsApi;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        Integer page = 1; // Integer | Current page of the collection.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        String search = search_example; // String | Limit results to those matching a string.
        String after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
        String modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
        array[Integer] author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
        array[Integer] authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
        String before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
        String modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
        array[Integer] exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
        array[Integer] include = []; // array[Integer] | Limit result set to specific IDs.
        String searchSemantics = searchSemantics_example; // String | How to interpret the search input.
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        String orderby = title; // String | Sort collection by post attribute.
        array[Integer] parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
        array[Integer] parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
        array[String] searchColumns = []; // array[String] | Array of column names to be searched.
        array[String] slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
        array[String] status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
        String taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
        Object categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
        Object categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
        Object tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
        Object tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
        Object ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
        Object ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
        Object ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

        try {
            array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2UsersGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#getLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserGroupsApi *apiInstance = [[UserGroupsApi alloc] init];
Integer *id = 56; // User ID (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
String *search = search_example; // Limit results to those matching a string. (optional) (default to null)
String *after = after_example; // Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
String *modifiedAfter = modifiedAfter_example; // Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *author = []; // Limit result set to posts assigned to specific authors. (optional) (default to [])
array[Integer] *authorExclude = []; // Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
String *before = before_example; // Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
String *modifiedBefore = modifiedBefore_example; // Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
array[Integer] *exclude = []; // Ensure result set excludes specific IDs. (optional) (default to [])
array[Integer] *include = []; // Limit result set to specific IDs. (optional) (default to [])
String *searchSemantics = searchSemantics_example; // How to interpret the search input. (optional) (default to null)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
String *orderby = title; // Sort collection by post attribute. (optional) (default to title)
array[Integer] *parent = []; // Limit result set to items with particular parent IDs. (optional) (default to [])
array[Integer] *parentExclude = []; // Limit result set to all items except those of a particular parent ID. (optional) (default to [])
array[String] *searchColumns = []; // Array of column names to be searched. (optional) (default to [])
array[String] *slug = ; // Limit result set to posts with one or more specific slugs. (optional) (default to null)
array[String] *status = ["publish"]; // Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
String *taxRelation = taxRelation_example; // Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
Object *categories = Object; // Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *categoriesExclude = Object; // Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
Object *tags = Object; // Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *tagsExclude = Object; // Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
Object *ldGroupCategory = Object; // Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupCategoryExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
Object *ldGroupTag = Object; // Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
Object *ldGroupTagExclude = Object; // Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

// Get associated groups for a user
[apiInstance getLdlmsV2UsersGroupsByIdWith:id
    context:context
    page:page
    perPage:perPage
    search:search
    after:after
    modifiedAfter:modifiedAfter
    author:author
    authorExclude:authorExclude
    before:before
    modifiedBefore:modifiedBefore
    exclude:exclude
    include:include
    searchSemantics:searchSemantics
    offset:offset
    order:order
    orderby:orderby
    parent:parent
    parentExclude:parentExclude
    searchColumns:searchColumns
    slug:slug
    status:status
    taxRelation:taxRelation
    categories:categories
    categoriesExclude:categoriesExclude
    tags:tags
    tagsExclude:tagsExclude
    ldGroupCategory:ldGroupCategory
    ldGroupCategoryExclude:ldGroupCategoryExclude
    ldGroupTag:ldGroupTag
    ldGroupTagExclude:ldGroupTagExclude
              completionHandler: ^(array[LDLMS_v2_Group] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserGroupsApi()
var id = 56; // {Integer} User ID
var opts = {
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'page': 1, // {Integer} Current page of the collection.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'search': search_example, // {String} Limit results to those matching a string.
  'after': after_example, // {String} Limit response to posts published after a given ISO8601 compliant date.
  'modifiedAfter': modifiedAfter_example, // {String} Limit response to posts modified after a given ISO8601 compliant date.
  'author': [], // {array[Integer]} Limit result set to posts assigned to specific authors.
  'authorExclude': [], // {array[Integer]} Ensure result set excludes posts assigned to specific authors.
  'before': before_example, // {String} Limit response to posts published before a given ISO8601 compliant date.
  'modifiedBefore': modifiedBefore_example, // {String} Limit response to posts modified before a given ISO8601 compliant date.
  'exclude': [], // {array[Integer]} Ensure result set excludes specific IDs.
  'include': [], // {array[Integer]} Limit result set to specific IDs.
  'searchSemantics': searchSemantics_example, // {String} How to interpret the search input.
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'orderby': title, // {String} Sort collection by post attribute.
  'parent': [], // {array[Integer]} Limit result set to items with particular parent IDs.
  'parentExclude': [], // {array[Integer]} Limit result set to all items except those of a particular parent ID.
  'searchColumns': [], // {array[String]} Array of column names to be searched.
  'slug': , // {array[String]} Limit result set to posts with one or more specific slugs.
  'status': ["publish"], // {array[String]} Limit result set to posts assigned one or more statuses.
  'taxRelation': taxRelation_example, // {String} Limit result set based on relationship between multiple taxonomies.
  'categories': Object, // {Object} Limit result set to items with specific terms assigned in the categories taxonomy.
  'categoriesExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the categories taxonomy.
  'tags': Object, // {Object} Limit result set to items with specific terms assigned in the tags taxonomy.
  'tagsExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the tags taxonomy.
  'ldGroupCategory': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupCategoryExclude': Object, // {Object} Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
  'ldGroupTag': Object, // {Object} Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
  'ldGroupTagExclude': Object // {Object} Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserGroupsApi();
            var id = 56;  // Integer | User ID (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var search = search_example;  // String | Limit results to those matching a string. (optional)  (default to null)
            var after = after_example;  // String | Limit response to posts published after a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedAfter = modifiedAfter_example;  // String | Limit response to posts modified after a given ISO8601 compliant date. (optional)  (default to null)
            var author = new array[Integer](); // array[Integer] | Limit result set to posts assigned to specific authors. (optional)  (default to [])
            var authorExclude = new array[Integer](); // array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional)  (default to [])
            var before = before_example;  // String | Limit response to posts published before a given ISO8601 compliant date. (optional)  (default to null)
            var modifiedBefore = modifiedBefore_example;  // String | Limit response to posts modified before a given ISO8601 compliant date. (optional)  (default to null)
            var exclude = new array[Integer](); // array[Integer] | Ensure result set excludes specific IDs. (optional)  (default to [])
            var include = new array[Integer](); // array[Integer] | Limit result set to specific IDs. (optional)  (default to [])
            var searchSemantics = searchSemantics_example;  // String | How to interpret the search input. (optional)  (default to null)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var orderby = title;  // String | Sort collection by post attribute. (optional)  (default to title)
            var parent = new array[Integer](); // array[Integer] | Limit result set to items with particular parent IDs. (optional)  (default to [])
            var parentExclude = new array[Integer](); // array[Integer] | Limit result set to all items except those of a particular parent ID. (optional)  (default to [])
            var searchColumns = new array[String](); // array[String] | Array of column names to be searched. (optional)  (default to [])
            var slug = new array[String](); // array[String] | Limit result set to posts with one or more specific slugs. (optional)  (default to null)
            var status = new array[String](); // array[String] | Limit result set to posts assigned one or more statuses. (optional)  (default to ["publish"])
            var taxRelation = taxRelation_example;  // String | Limit result set based on relationship between multiple taxonomies. (optional)  (default to null)
            var categories = new Object(); // Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var categoriesExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional)  (default to null)
            var tags = new Object(); // Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var tagsExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional)  (default to null)
            var ldGroupCategory = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupCategoryExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional)  (default to null)
            var ldGroupTag = new Object(); // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)
            var ldGroupTagExclude = new Object(); // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional)  (default to null)

            try {
                // Get associated groups for a user
                array[LDLMS_v2_Group] result = apiInstance.getLdlmsV2UsersGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserGroupsApi.getLdlmsV2UsersGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserGroupsApi();
$id = 56; // Integer | User ID
$context = view; // String | Scope under which the request is made; determines fields present in response.
$page = 1; // Integer | Current page of the collection.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$search = search_example; // String | Limit results to those matching a string.
$after = after_example; // String | Limit response to posts published after a given ISO8601 compliant date.
$modifiedAfter = modifiedAfter_example; // String | Limit response to posts modified after a given ISO8601 compliant date.
$author = []; // array[Integer] | Limit result set to posts assigned to specific authors.
$authorExclude = []; // array[Integer] | Ensure result set excludes posts assigned to specific authors.
$before = before_example; // String | Limit response to posts published before a given ISO8601 compliant date.
$modifiedBefore = modifiedBefore_example; // String | Limit response to posts modified before a given ISO8601 compliant date.
$exclude = []; // array[Integer] | Ensure result set excludes specific IDs.
$include = []; // array[Integer] | Limit result set to specific IDs.
$searchSemantics = searchSemantics_example; // String | How to interpret the search input.
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$orderby = title; // String | Sort collection by post attribute.
$parent = []; // array[Integer] | Limit result set to items with particular parent IDs.
$parentExclude = []; // array[Integer] | Limit result set to all items except those of a particular parent ID.
$searchColumns = []; // array[String] | Array of column names to be searched.
$slug = ; // array[String] | Limit result set to posts with one or more specific slugs.
$status = ["publish"]; // array[String] | Limit result set to posts assigned one or more statuses.
$taxRelation = taxRelation_example; // String | Limit result set based on relationship between multiple taxonomies.
$categories = Object; // Object | Limit result set to items with specific terms assigned in the categories taxonomy.
$categoriesExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
$tags = Object; // Object | Limit result set to items with specific terms assigned in the tags taxonomy.
$tagsExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
$ldGroupCategory = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
$ldGroupCategoryExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
$ldGroupTag = Object; // Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
$ldGroupTagExclude = Object; // Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

try {
    $result = $api_instance->getLdlmsV2UsersGroupsById($id, $context, $page, $perPage, $search, $after, $modifiedAfter, $author, $authorExclude, $before, $modifiedBefore, $exclude, $include, $searchSemantics, $offset, $order, $orderby, $parent, $parentExclude, $searchColumns, $slug, $status, $taxRelation, $categories, $categoriesExclude, $tags, $tagsExclude, $ldGroupCategory, $ldGroupCategoryExclude, $ldGroupTag, $ldGroupTagExclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->getLdlmsV2UsersGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserGroupsApi->new();
my $id = 56; # Integer | User ID
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $page = 1; # Integer | Current page of the collection.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $search = search_example; # String | Limit results to those matching a string.
my $after = after_example; # String | Limit response to posts published after a given ISO8601 compliant date.
my $modifiedAfter = modifiedAfter_example; # String | Limit response to posts modified after a given ISO8601 compliant date.
my $author = [[]]; # array[Integer] | Limit result set to posts assigned to specific authors.
my $authorExclude = [[]]; # array[Integer] | Ensure result set excludes posts assigned to specific authors.
my $before = before_example; # String | Limit response to posts published before a given ISO8601 compliant date.
my $modifiedBefore = modifiedBefore_example; # String | Limit response to posts modified before a given ISO8601 compliant date.
my $exclude = [[]]; # array[Integer] | Ensure result set excludes specific IDs.
my $include = [[]]; # array[Integer] | Limit result set to specific IDs.
my $searchSemantics = searchSemantics_example; # String | How to interpret the search input.
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $orderby = title; # String | Sort collection by post attribute.
my $parent = [[]]; # array[Integer] | Limit result set to items with particular parent IDs.
my $parentExclude = [[]]; # array[Integer] | Limit result set to all items except those of a particular parent ID.
my $searchColumns = [[]]; # array[String] | Array of column names to be searched.
my $slug = []; # array[String] | Limit result set to posts with one or more specific slugs.
my $status = [["publish"]]; # array[String] | Limit result set to posts assigned one or more statuses.
my $taxRelation = taxRelation_example; # String | Limit result set based on relationship between multiple taxonomies.
my $categories = Object; # Object | Limit result set to items with specific terms assigned in the categories taxonomy.
my $categoriesExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy.
my $tags = Object; # Object | Limit result set to items with specific terms assigned in the tags taxonomy.
my $tagsExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy.
my $ldGroupCategory = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupCategoryExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
my $ldGroupTag = Object; # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
my $ldGroupTagExclude = Object; # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

eval {
    my $result = $api_instance->getLdlmsV2UsersGroupsById(id => $id, context => $context, page => $page, perPage => $perPage, search => $search, after => $after, modifiedAfter => $modifiedAfter, author => $author, authorExclude => $authorExclude, before => $before, modifiedBefore => $modifiedBefore, exclude => $exclude, include => $include, searchSemantics => $searchSemantics, offset => $offset, order => $order, orderby => $orderby, parent => $parent, parentExclude => $parentExclude, searchColumns => $searchColumns, slug => $slug, status => $status, taxRelation => $taxRelation, categories => $categories, categoriesExclude => $categoriesExclude, tags => $tags, tagsExclude => $tagsExclude, ldGroupCategory => $ldGroupCategory, ldGroupCategoryExclude => $ldGroupCategoryExclude, ldGroupTag => $ldGroupTag, ldGroupTagExclude => $ldGroupTagExclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserGroupsApi->getLdlmsV2UsersGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserGroupsApi()
id = 56 # Integer | User ID (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
search = search_example # String | Limit results to those matching a string. (optional) (default to null)
after = after_example # String | Limit response to posts published after a given ISO8601 compliant date. (optional) (default to null)
modifiedAfter = modifiedAfter_example # String | Limit response to posts modified after a given ISO8601 compliant date. (optional) (default to null)
author = [] # array[Integer] | Limit result set to posts assigned to specific authors. (optional) (default to [])
authorExclude = [] # array[Integer] | Ensure result set excludes posts assigned to specific authors. (optional) (default to [])
before = before_example # String | Limit response to posts published before a given ISO8601 compliant date. (optional) (default to null)
modifiedBefore = modifiedBefore_example # String | Limit response to posts modified before a given ISO8601 compliant date. (optional) (default to null)
exclude = [] # array[Integer] | Ensure result set excludes specific IDs. (optional) (default to [])
include = [] # array[Integer] | Limit result set to specific IDs. (optional) (default to [])
searchSemantics = searchSemantics_example # String | How to interpret the search input. (optional) (default to null)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
orderby = title # String | Sort collection by post attribute. (optional) (default to title)
parent = [] # array[Integer] | Limit result set to items with particular parent IDs. (optional) (default to [])
parentExclude = [] # array[Integer] | Limit result set to all items except those of a particular parent ID. (optional) (default to [])
searchColumns = [] # array[String] | Array of column names to be searched. (optional) (default to [])
slug =  # array[String] | Limit result set to posts with one or more specific slugs. (optional) (default to null)
status = ["publish"] # array[String] | Limit result set to posts assigned one or more statuses. (optional) (default to ["publish"])
taxRelation = taxRelation_example # String | Limit result set based on relationship between multiple taxonomies. (optional) (default to null)
categories = Object # Object | Limit result set to items with specific terms assigned in the categories taxonomy. (optional) (default to null)
categoriesExclude = Object # Object | Limit result set to items except those with specific terms assigned in the categories taxonomy. (optional) (default to null)
tags = Object # Object | Limit result set to items with specific terms assigned in the tags taxonomy. (optional) (default to null)
tagsExclude = Object # Object | Limit result set to items except those with specific terms assigned in the tags taxonomy. (optional) (default to null)
ldGroupCategory = Object # Object | Limit result set to items with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupCategoryExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy. (optional) (default to null)
ldGroupTag = Object # Object | Limit result set to items with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)
ldGroupTagExclude = Object # Object | Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy. (optional) (default to null)

try:
    # Get associated groups for a user
    api_response = api_instance.get_ldlms_v2_users_groups_by_id(id, context=context, page=page, perPage=perPage, search=search, after=after, modifiedAfter=modifiedAfter, author=author, authorExclude=authorExclude, before=before, modifiedBefore=modifiedBefore, exclude=exclude, include=include, searchSemantics=searchSemantics, offset=offset, order=order, orderby=orderby, parent=parent, parentExclude=parentExclude, searchColumns=searchColumns, slug=slug, status=status, taxRelation=taxRelation, categories=categories, categoriesExclude=categoriesExclude, tags=tags, tagsExclude=tagsExclude, ldGroupCategory=ldGroupCategory, ldGroupCategoryExclude=ldGroupCategoryExclude, ldGroupTag=ldGroupTag, ldGroupTagExclude=ldGroupTagExclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserGroupsApi->getLdlmsV2UsersGroupsById: %s\n" % e)
extern crate UserGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let context = view; // String
    let page = 1; // Integer
    let perPage = 10; // Integer
    let search = search_example; // String
    let after = after_example; // String
    let modifiedAfter = modifiedAfter_example; // String
    let author = []; // array[Integer]
    let authorExclude = []; // array[Integer]
    let before = before_example; // String
    let modifiedBefore = modifiedBefore_example; // String
    let exclude = []; // array[Integer]
    let include = []; // array[Integer]
    let searchSemantics = searchSemantics_example; // String
    let offset = 56; // Integer
    let order = asc; // String
    let orderby = title; // String
    let parent = []; // array[Integer]
    let parentExclude = []; // array[Integer]
    let searchColumns = []; // array[String]
    let slug = ; // array[String]
    let status = ["publish"]; // array[String]
    let taxRelation = taxRelation_example; // String
    let categories = Object; // Object
    let categoriesExclude = Object; // Object
    let tags = Object; // Object
    let tagsExclude = Object; // Object
    let ldGroupCategory = Object; // Object
    let ldGroupCategoryExclude = Object; // Object
    let ldGroupTag = Object; // Object
    let ldGroupTagExclude = Object; // Object

    let mut context = UserGroupsApi::Context::default();
    let result = client.getLdlmsV2UsersGroupsById(id, context, page, perPage, search, after, modifiedAfter, author, authorExclude, before, modifiedBefore, exclude, include, searchSemantics, offset, order, orderby, parent, parentExclude, searchColumns, slug, status, taxRelation, categories, categoriesExclude, tags, tagsExclude, ldGroupCategory, ldGroupCategoryExclude, ldGroupTag, ldGroupTagExclude, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
context
String
Scope under which the request is made; determines fields present in response.
page
Integer
Current page of the collection.
per_page
Integer
Maximum number of items to be returned in result set.
search
after
String
Limit response to posts published after a given ISO8601 compliant date.
modified_after
String
Limit response to posts modified after a given ISO8601 compliant date.
author
array[Integer]
Limit result set to posts assigned to specific authors.
author_exclude
array[Integer]
Ensure result set excludes posts assigned to specific authors.
before
String
Limit response to posts published before a given ISO8601 compliant date.
modified_before
String
Limit response to posts modified before a given ISO8601 compliant date.
exclude
array[Integer]
Ensure result set excludes specific IDs.
include
array[Integer]
Limit result set to specific IDs.
search_semantics
String
How to interpret the search input.
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
orderby
String
Sort collection by post attribute.
parent
array[Integer]
Limit result set to items with particular parent IDs.
parent_exclude
array[Integer]
Limit result set to all items except those of a particular parent ID.
search_columns
array[String]
Array of column names to be searched.
slug
array[String]
Limit result set to posts with one or more specific slugs.
status
array[String]
Limit result set to posts assigned one or more statuses.
tax_relation
String
Limit result set based on relationship between multiple taxonomies.
categories
Object
Limit result set to items with specific terms assigned in the categories taxonomy.
categories_exclude
Object
Limit result set to items except those with specific terms assigned in the categories taxonomy.
tags
Object
Limit result set to items with specific terms assigned in the tags taxonomy.
tags_exclude
Object
Limit result set to items except those with specific terms assigned in the tags taxonomy.
ld_group_category
Object
Limit result set to items with specific terms assigned in the ld_group_category taxonomy.
ld_group_category_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_category taxonomy.
ld_group_tag
Object
Limit result set to items with specific terms assigned in the ld_group_tag taxonomy.
ld_group_tag_exclude
Object
Limit result set to items except those with specific terms assigned in the ld_group_tag taxonomy.

Responses


Update associated groups for a user

Update associated groups for a user.


/learndash/v1/ldlms/v2/users/{id}/groups

Usage and SDK Samples

curl -X PATCH \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserGroupsApi;

import java.io.File;
import java.util.*;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#patchLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    final result = await api_instance.patchLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->patchLdlmsV2UsersGroupsById: $e\n');
}

import org.openapitools.client.api.UserGroupsApi;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#patchLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserGroupsApi *apiInstance = [[UserGroupsApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersGroupsByIdRequest *updateLdlmsV2UsersGroupsByIdRequest = ; //  (optional)

// Update associated groups for a user
[apiInstance patchLdlmsV2UsersGroupsByIdWith:id
    updateLdlmsV2UsersGroupsByIdRequest:updateLdlmsV2UsersGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserGroupsApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersGroupsByIdRequest':  // {UpdateLdlmsV2UsersGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.patchLdlmsV2UsersGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class patchLdlmsV2UsersGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserGroupsApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a user
                array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.patchLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserGroupsApi.patchLdlmsV2UsersGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserGroupsApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    $result = $api_instance->patchLdlmsV2UsersGroupsById($id, $updateLdlmsV2UsersGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->patchLdlmsV2UsersGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserGroupsApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersGroupsByIdRequest->new(); # UpdateLdlmsV2UsersGroupsByIdRequest | 

eval {
    my $result = $api_instance->patchLdlmsV2UsersGroupsById(id => $id, updateLdlmsV2UsersGroupsByIdRequest => $updateLdlmsV2UsersGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserGroupsApi->patchLdlmsV2UsersGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserGroupsApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersGroupsByIdRequest =  # UpdateLdlmsV2UsersGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a user
    api_response = api_instance.patch_ldlms_v2_users_groups_by_id(id, updateLdlmsV2UsersGroupsByIdRequest=updateLdlmsV2UsersGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserGroupsApi->patchLdlmsV2UsersGroupsById: %s\n" % e)
extern crate UserGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest

    let mut context = UserGroupsApi::Context::default();
    let result = client.patchLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


Update associated groups for a user

Update associated groups for a user.


/learndash/v1/ldlms/v2/users/{id}/groups

Usage and SDK Samples

curl -X PUT \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/groups" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserGroupsApi;

import java.io.File;
import java.util.*;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#updateLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    final result = await api_instance.updateLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateLdlmsV2UsersGroupsById: $e\n');
}

import org.openapitools.client.api.UserGroupsApi;

public class UserGroupsApiExample {
    public static void main(String[] args) {
        UserGroupsApi apiInstance = new UserGroupsApi();
        Integer id = 56; // Integer | User ID
        UpdateLdlmsV2UsersGroupsByIdRequest updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

        try {
            array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserGroupsApi#updateLdlmsV2UsersGroupsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserGroupsApi *apiInstance = [[UserGroupsApi alloc] init];
Integer *id = 56; // User ID (default to null)
UpdateLdlmsV2UsersGroupsByIdRequest *updateLdlmsV2UsersGroupsByIdRequest = ; //  (optional)

// Update associated groups for a user
[apiInstance updateLdlmsV2UsersGroupsByIdWith:id
    updateLdlmsV2UsersGroupsByIdRequest:updateLdlmsV2UsersGroupsByIdRequest
              completionHandler: ^(array[update_ldlms_v2_users_groups_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserGroupsApi()
var id = 56; // {Integer} User ID
var opts = {
  'updateLdlmsV2UsersGroupsByIdRequest':  // {UpdateLdlmsV2UsersGroupsByIdRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLdlmsV2UsersGroupsById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateLdlmsV2UsersGroupsByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserGroupsApi();
            var id = 56;  // Integer | User ID (default to null)
            var updateLdlmsV2UsersGroupsByIdRequest = new UpdateLdlmsV2UsersGroupsByIdRequest(); // UpdateLdlmsV2UsersGroupsByIdRequest |  (optional) 

            try {
                // Update associated groups for a user
                array[update_ldlms_v2_users_groups_by_id_200_response_inner] result = apiInstance.updateLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserGroupsApi.updateLdlmsV2UsersGroupsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserGroupsApi();
$id = 56; // Integer | User ID
$updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest | 

try {
    $result = $api_instance->updateLdlmsV2UsersGroupsById($id, $updateLdlmsV2UsersGroupsByIdRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->updateLdlmsV2UsersGroupsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserGroupsApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserGroupsApi->new();
my $id = 56; # Integer | User ID
my $updateLdlmsV2UsersGroupsByIdRequest = WWW::OPenAPIClient::Object::UpdateLdlmsV2UsersGroupsByIdRequest->new(); # UpdateLdlmsV2UsersGroupsByIdRequest | 

eval {
    my $result = $api_instance->updateLdlmsV2UsersGroupsById(id => $id, updateLdlmsV2UsersGroupsByIdRequest => $updateLdlmsV2UsersGroupsByIdRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserGroupsApi->updateLdlmsV2UsersGroupsById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserGroupsApi()
id = 56 # Integer | User ID (default to null)
updateLdlmsV2UsersGroupsByIdRequest =  # UpdateLdlmsV2UsersGroupsByIdRequest |  (optional)

try:
    # Update associated groups for a user
    api_response = api_instance.update_ldlms_v2_users_groups_by_id(id, updateLdlmsV2UsersGroupsByIdRequest=updateLdlmsV2UsersGroupsByIdRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserGroupsApi->updateLdlmsV2UsersGroupsById: %s\n" % e)
extern crate UserGroupsApi;

pub fn main() {
    let id = 56; // Integer
    let updateLdlmsV2UsersGroupsByIdRequest = ; // UpdateLdlmsV2UsersGroupsByIdRequest

    let mut context = UserGroupsApi::Context::default();
    let result = client.updateLdlmsV2UsersGroupsById(id, updateLdlmsV2UsersGroupsByIdRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Request body

Responses


User Quiz Progress

Get the quiz progress for a user

Get the quiz progress for a user.


/learndash/v1/ldlms/v2/users/{id}/quiz-progress

Usage and SDK Samples

curl -X GET \
-H "X-WP-Nonce: [[apiKey]]" \
 \
 -H "Accept: application/json" \
 "https://localhost/wp-json/learndash/v1/ldlms/v2/users/{id}/quiz-progress?quiz=56&course=56&lesson=56&topic=56&context=view&orderby=taken&offset=56&order=asc&per_page=10&page=1"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserQuizProgressApi;

import java.io.File;
import java.util.*;

public class UserQuizProgressApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: nonceAuth
        ApiKeyAuth nonceAuth = (ApiKeyAuth) defaultClient.getAuthentication("nonceAuth");
        nonceAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //nonceAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserQuizProgressApi apiInstance = new UserQuizProgressApi();
        Integer id = 56; // Integer | User ID
        Integer quiz = 56; // Integer | Limit results to be within a specific Quiz.
        Integer course = 56; // Integer | Limit results to be within a specific Course.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
        Integer topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        String orderby = taken; // String | 
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[get_ldlms_v2_users_quiz_progress_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersQuizProgressById(id, quiz, course, lesson, topic, context, orderby, offset, order, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserQuizProgressApi#getLdlmsV2UsersQuizProgressById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | User ID
final Integer quiz = new Integer(); // Integer | Limit results to be within a specific Quiz.
final Integer course = new Integer(); // Integer | Limit results to be within a specific Course.
final Integer lesson = new Integer(); // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
final Integer topic = new Integer(); // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.
final String context = new String(); // String | Scope under which the request is made; determines fields present in response.
final String orderby = new String(); // String | 
final Integer offset = new Integer(); // Integer | Offset the result set by a specific number of items.
final String order = new String(); // String | Order sort attribute ascending or descending.
final Integer perPage = new Integer(); // Integer | Maximum number of items to be returned in result set.
final Integer page = new Integer(); // Integer | Current page of the collection.

try {
    final result = await api_instance.getLdlmsV2UsersQuizProgressById(id, quiz, course, lesson, topic, context, orderby, offset, order, perPage, page);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getLdlmsV2UsersQuizProgressById: $e\n');
}

import org.openapitools.client.api.UserQuizProgressApi;

public class UserQuizProgressApiExample {
    public static void main(String[] args) {
        UserQuizProgressApi apiInstance = new UserQuizProgressApi();
        Integer id = 56; // Integer | User ID
        Integer quiz = 56; // Integer | Limit results to be within a specific Quiz.
        Integer course = 56; // Integer | Limit results to be within a specific Course.
        Integer lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
        Integer topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.
        String context = view; // String | Scope under which the request is made; determines fields present in response.
        String orderby = taken; // String | 
        Integer offset = 56; // Integer | Offset the result set by a specific number of items.
        String order = asc; // String | Order sort attribute ascending or descending.
        Integer perPage = 10; // Integer | Maximum number of items to be returned in result set.
        Integer page = 1; // Integer | Current page of the collection.

        try {
            array[get_ldlms_v2_users_quiz_progress_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersQuizProgressById(id, quiz, course, lesson, topic, context, orderby, offset, order, perPage, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserQuizProgressApi#getLdlmsV2UsersQuizProgressById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: nonceAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-WP-Nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-WP-Nonce"];

// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"wordpress_logged_in"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"wordpress_logged_in"];


// Create an instance of the API class
UserQuizProgressApi *apiInstance = [[UserQuizProgressApi alloc] init];
Integer *id = 56; // User ID (default to null)
Integer *quiz = 56; // Limit results to be within a specific Quiz. (optional) (default to null)
Integer *course = 56; // Limit results to be within a specific Course. (optional) (default to null)
Integer *lesson = 56; // Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional) (default to null)
Integer *topic = 56; // Limit results to be within a specific Topic. Must be used with Course parameter. (optional) (default to null)
String *context = view; // Scope under which the request is made; determines fields present in response. (optional) (default to view)
String *orderby = taken; //  (optional) (default to taken)
Integer *offset = 56; // Offset the result set by a specific number of items. (optional) (default to null)
String *order = asc; // Order sort attribute ascending or descending. (optional) (default to asc)
Integer *perPage = 10; // Maximum number of items to be returned in result set. (optional) (default to 10)
Integer *page = 1; // Current page of the collection. (optional) (default to 1)

// Get the quiz progress for a user
[apiInstance getLdlmsV2UsersQuizProgressByIdWith:id
    quiz:quiz
    course:course
    lesson:lesson
    topic:topic
    context:context
    orderby:orderby
    offset:offset
    order:order
    perPage:perPage
    page:page
              completionHandler: ^(array[get_ldlms_v2_users_quiz_progress_by_id_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LearnDashRestApi = require('learn_dash_rest_api');
var defaultClient = LearnDashRestApi.ApiClient.instance;

// Configure API key authorization: nonceAuth
var nonceAuth = defaultClient.authentications['nonceAuth'];
nonceAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//nonceAuth.apiKeyPrefix['X-WP-Nonce'] = "Token";

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['wordpress_logged_in'] = "Token";

// Create an instance of the API class
var api = new LearnDashRestApi.UserQuizProgressApi()
var id = 56; // {Integer} User ID
var opts = {
  'quiz': 56, // {Integer} Limit results to be within a specific Quiz.
  'course': 56, // {Integer} Limit results to be within a specific Course.
  'lesson': 56, // {Integer} Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
  'topic': 56, // {Integer} Limit results to be within a specific Topic. Must be used with Course parameter.
  'context': view, // {String} Scope under which the request is made; determines fields present in response.
  'orderby': taken, // {String} 
  'offset': 56, // {Integer} Offset the result set by a specific number of items.
  'order': asc, // {String} Order sort attribute ascending or descending.
  'perPage': 10, // {Integer} Maximum number of items to be returned in result set.
  'page': 1 // {Integer} Current page of the collection.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLdlmsV2UsersQuizProgressById(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLdlmsV2UsersQuizProgressByIdExample
    {
        public void main()
        {
            // Configure API key authorization: nonceAuth
            Configuration.Default.ApiKey.Add("X-WP-Nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-WP-Nonce", "Bearer");
            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("wordpress_logged_in", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("wordpress_logged_in", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserQuizProgressApi();
            var id = 56;  // Integer | User ID (default to null)
            var quiz = 56;  // Integer | Limit results to be within a specific Quiz. (optional)  (default to null)
            var course = 56;  // Integer | Limit results to be within a specific Course. (optional)  (default to null)
            var lesson = 56;  // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional)  (default to null)
            var topic = 56;  // Integer | Limit results to be within a specific Topic. Must be used with Course parameter. (optional)  (default to null)
            var context = view;  // String | Scope under which the request is made; determines fields present in response. (optional)  (default to view)
            var orderby = taken;  // String |  (optional)  (default to taken)
            var offset = 56;  // Integer | Offset the result set by a specific number of items. (optional)  (default to null)
            var order = asc;  // String | Order sort attribute ascending or descending. (optional)  (default to asc)
            var perPage = 10;  // Integer | Maximum number of items to be returned in result set. (optional)  (default to 10)
            var page = 1;  // Integer | Current page of the collection. (optional)  (default to 1)

            try {
                // Get the quiz progress for a user
                array[get_ldlms_v2_users_quiz_progress_by_id_200_response_inner] result = apiInstance.getLdlmsV2UsersQuizProgressById(id, quiz, course, lesson, topic, context, orderby, offset, order, perPage, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserQuizProgressApi.getLdlmsV2UsersQuizProgressById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: nonceAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WP-Nonce', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WP-Nonce', 'Bearer');

// Configure API key authorization: cookieAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('wordpress_logged_in', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('wordpress_logged_in', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserQuizProgressApi();
$id = 56; // Integer | User ID
$quiz = 56; // Integer | Limit results to be within a specific Quiz.
$course = 56; // Integer | Limit results to be within a specific Course.
$lesson = 56; // Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
$topic = 56; // Integer | Limit results to be within a specific Topic. Must be used with Course parameter.
$context = view; // String | Scope under which the request is made; determines fields present in response.
$orderby = taken; // String | 
$offset = 56; // Integer | Offset the result set by a specific number of items.
$order = asc; // String | Order sort attribute ascending or descending.
$perPage = 10; // Integer | Maximum number of items to be returned in result set.
$page = 1; // Integer | Current page of the collection.

try {
    $result = $api_instance->getLdlmsV2UsersQuizProgressById($id, $quiz, $course, $lesson, $topic, $context, $orderby, $offset, $order, $perPage, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserQuizProgressApi->getLdlmsV2UsersQuizProgressById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserQuizProgressApi;

# Configure API key authorization: nonceAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-WP-Nonce'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-WP-Nonce'} = "Bearer";

# Configure API key authorization: cookieAuth
$WWW::OPenAPIClient::Configuration::api_key->{'wordpress_logged_in'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'wordpress_logged_in'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserQuizProgressApi->new();
my $id = 56; # Integer | User ID
my $quiz = 56; # Integer | Limit results to be within a specific Quiz.
my $course = 56; # Integer | Limit results to be within a specific Course.
my $lesson = 56; # Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
my $topic = 56; # Integer | Limit results to be within a specific Topic. Must be used with Course parameter.
my $context = view; # String | Scope under which the request is made; determines fields present in response.
my $orderby = taken; # String | 
my $offset = 56; # Integer | Offset the result set by a specific number of items.
my $order = asc; # String | Order sort attribute ascending or descending.
my $perPage = 10; # Integer | Maximum number of items to be returned in result set.
my $page = 1; # Integer | Current page of the collection.

eval {
    my $result = $api_instance->getLdlmsV2UsersQuizProgressById(id => $id, quiz => $quiz, course => $course, lesson => $lesson, topic => $topic, context => $context, orderby => $orderby, offset => $offset, order => $order, perPage => $perPage, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserQuizProgressApi->getLdlmsV2UsersQuizProgressById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: nonceAuth
openapi_client.configuration.api_key['X-WP-Nonce'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-WP-Nonce'] = 'Bearer'

# Configure API key authorization: cookieAuth
openapi_client.configuration.api_key['wordpress_logged_in'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['wordpress_logged_in'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserQuizProgressApi()
id = 56 # Integer | User ID (default to null)
quiz = 56 # Integer | Limit results to be within a specific Quiz. (optional) (default to null)
course = 56 # Integer | Limit results to be within a specific Course. (optional) (default to null)
lesson = 56 # Integer | Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter. (optional) (default to null)
topic = 56 # Integer | Limit results to be within a specific Topic. Must be used with Course parameter. (optional) (default to null)
context = view # String | Scope under which the request is made; determines fields present in response. (optional) (default to view)
orderby = taken # String |  (optional) (default to taken)
offset = 56 # Integer | Offset the result set by a specific number of items. (optional) (default to null)
order = asc # String | Order sort attribute ascending or descending. (optional) (default to asc)
perPage = 10 # Integer | Maximum number of items to be returned in result set. (optional) (default to 10)
page = 1 # Integer | Current page of the collection. (optional) (default to 1)

try:
    # Get the quiz progress for a user
    api_response = api_instance.get_ldlms_v2_users_quiz_progress_by_id(id, quiz=quiz, course=course, lesson=lesson, topic=topic, context=context, orderby=orderby, offset=offset, order=order, perPage=perPage, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserQuizProgressApi->getLdlmsV2UsersQuizProgressById: %s\n" % e)
extern crate UserQuizProgressApi;

pub fn main() {
    let id = 56; // Integer
    let quiz = 56; // Integer
    let course = 56; // Integer
    let lesson = 56; // Integer
    let topic = 56; // Integer
    let context = view; // String
    let orderby = taken; // String
    let offset = 56; // Integer
    let order = asc; // String
    let perPage = 10; // Integer
    let page = 1; // Integer

    let mut context = UserQuizProgressApi::Context::default();
    let result = client.getLdlmsV2UsersQuizProgressById(id, quiz, course, lesson, topic, context, orderby, offset, order, perPage, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Integer
User ID
Required
Query parameters
Name Description
quiz
Integer
Limit results to be within a specific Quiz.
course
Integer
Limit results to be within a specific Course.
lesson
Integer
Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.
topic
Integer
Limit results to be within a specific Topic. Must be used with Course parameter.
context
String
Scope under which the request is made; determines fields present in response.
orderby
String
offset
Integer
Offset the result set by a specific number of items.
order
String
Order sort attribute ascending or descending.
per_page
Integer
Maximum number of items to be returned in result set.
page
Integer
Current page of the collection.

Responses