### Install DAP CLI with PostgreSQL Support (Windows) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Installs the Instructure DAP CLI tool with PostgreSQL support on Windows. This requires Python 3.10+ to be installed first. If dependencies are missing, 'pysqlsync[postgresql]' may need to be installed separately. ```shell pip3 install "instructure-dap-client[postgresql]" pip install pysqlsync[postgresql] ``` -------------------------------- ### Install DAP CLI with PostgreSQL Support (Mac) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Installs the Instructure DAP CLI tool with PostgreSQL support on macOS. This requires Xcode Developer Tools and Python 3.10+ to be installed first. ```shell xcode-select --install python3 --version pip3 --version pip3 install "instructure-dap-client[postgresql]" ``` -------------------------------- ### Example Response for Visible Course Navigation Tools (JSON) Source: https://developerdocs.instructure.com/services/canvas/resources/external_tools An example JSON response structure for the 'Get visible course navigation tools' API endpoints, illustrating the data fields returned for each external tool, including context-specific information. ```json [{ "id": 1, "domain": "domain.example.com", "url": "http://www.example.com/ims/lti", "context_id": 5, "context_name": "Example Course", ... }, { ... }] ``` -------------------------------- ### Export Start Response Example (JSON) Source: https://developerdocs.instructure.com/services/canvas/external-tools/lti/file This JSON object represents a successful response when initiating an export process. It provides URLs for checking the export status and fetching the exported data. ```json { "status_url": "https://lti.example.com/export/42/status", "fetch_url": "https://lti.example.com/export/42" } ``` -------------------------------- ### Build Standards Browser Widget Production Bundle (Node.js) Source: https://developerdocs.instructure.com/services/ab-connect/introduction/examples Instructions for building a production-ready bundle of the Standards Browser Widget using Node.js. This involves setting the environment variable for production and running the build script. The output is a minified JavaScript file. ```bash NODE_ENV=production npm run build ``` ```batch set NODE_ENV=production npm run build ``` -------------------------------- ### Set Database Connection String in Environment Variables (Windows) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Sets the DAP_CONNECTION_STRING environment variable on Windows using the 'set' command. Alternatively, a guide for setting environment variables is provided. ```shell set DAP_CONNECTION_STRING=postgresql://user:password@localhost:5432/mydatabase ``` -------------------------------- ### Initialize Database for DAP Data Replication Source: https://developerdocs.instructure.com/services/dap/lib-index/lib-examples Initializes a database connection and uses the SQLReplicator to set up the schema and tables for synchronizing data from DAP. It handles version upgrades and populates the database with an initial snapshot. ```python from dap.api import DAPClient from dap.integration.database import DatabaseConnection, DatabaseConnectionConfig from dap.replicator.sql import SQLReplicator from dap.log import configure_logging configure_logging() # Define connection parameters as an object connection_params = DatabaseConnectionConfig( dialect="postgresql", host="server.example.com", port=5432, username="scott", password="password", database="testdb" ) # Initialize database connection with the object-based parameters db_connection = DatabaseConnection(connection_params) # Use the DAPClient and SQLReplicator async with DAPClient() as session: sql_replicator = SQLReplicator(session, db_connection) await sql_replicator.version_upgrade() await sql_replicator.initialize(namespace, table_name) ``` -------------------------------- ### Set DAP API Credentials as Environment Variables (Windows) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Sets the DAP_CLIENT_ID and DAP_CLIENT_SECRET environment variables on Windows using the 'set' command. Alternatively, a guide for setting environment variables is provided. ```shell set DAP_CLIENT_ID=your_canvas_data_client_id set DAP_CLIENT_SECRET=your_canvas_data_secret ``` -------------------------------- ### Get Single Appointment Group (Ruby) Source: https://developerdocs.instructure.com/services/canvas/resources/appointment_groups Ruby code snippet demonstrating how to fetch a single appointment group by its ID using the Canvas LMS API. This example assumes an existing API client setup. ```ruby # Assumes an API client is already initialized, e.g., @client = Canvas::API.new(host: '', token: '') response = @client.get('/api/v1/appointment_groups/:id') ``` -------------------------------- ### Configure Client Logging Source: https://developerdocs.instructure.com/services/dap/lib-index/lib-examples Sets up logging for the client library using the Python logging module. Allows configuration of log level, format (e.g., JSON), and output file. Ensures consistent logging across all modules for easier log processing. ```python configure_logging( level="DEBUG", format="json", file="my_client_app.log", namespace="canvas", table="accounts", client_id=client_id, ) ``` -------------------------------- ### Example cURL Request to Store Tool Settings Source: https://developerdocs.instructure.com/services/canvas/external-tools/plagiarism-detection-platform/file This bash script provides an example of how to use cURL to send a PUT request to the LTI Tool Settings API endpoint. It demonstrates the necessary headers, including Authorization and Content-Type, and includes a sample payload for storing assignment-level custom configuration. This example is useful for testing and implementing the tool settings persistence mechanism. ```bash curl -X PUT \ http://canvas.docker/api/lti/tool_proxy/0ce4dbf1-b8c5-407d-85ac-618d7615a5a5/courses/24/resource_link_id/b2d9b916-5128-42ad-ad17-b54091a52be2/tool_setting \ -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJDYW52YXMiLCJzdWIiOiIwY2U0ZGJmMS1iOGM1LTQwN2QtODVhYy02MThkNzYxNWE1YTUiLCJleHAiOjE1MTI3NTYwOTMsImF1ZCI6WyJjYW52YXMuZG9ja2VyIiwiY2FudmFzLmRvY2tlciJdLCJpYXQiOjE1MTI3NTI0OTMsIm5iZiI6MTUxMjc1MjQ2MywianRpIjoiZTY3MmM5OGItYmM4NS00NjliLWE5YjYtNjEyMDE2MWFhZjk0Iiwic2hhcmRfaWQiOjEsInJlZ19rZXkiOiIwY2U0ZGJmMS1iOGM1LTQwN2QtODVhYy02MThkNzYxNWE1YTUifQ.InMhzWYLhcAWRJHJsy9pRojEcQ5KRUtRGp50mQmFrnA' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/x-www-form-urlencoded' ``` -------------------------------- ### Get Course Permissions Response Example Source: https://developerdocs.instructure.com/services/canvas/resources/courses An example JSON response for the 'Get Course Permissions' API endpoint, showing the boolean status for requested permissions. ```json {'manage_grades': 'false', 'send_messages': 'true'} ``` -------------------------------- ### GET /topics/{guid} Source: https://developerdocs.instructure.com/services/ab-connect/reference/topics Retrieve the details of a specific Topic by appending its AB GUID to the URL. ```APIDOC ## GET /topics/{guid} ### Description Retrieves the details of a specific Topic using its unique AB GUID. ### Method GET ### Endpoint /topics/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The Academic Benchmarks GUID of the topic. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **data** (object) - Contains the topic details. - **type** (string) - The resource type. - **id** (string) - The unique identifier for the topic (AB GUID). - **attributes** (object) - Contains the topic's attributes. - **relationships** (object) - Contains relationships to other resources like Standards and Topics. #### Response Example ```json { "data": { "type": "topic", "id": "example-guid", "attributes": { "name": "Example Topic Name", "description": "This is an example topic." }, "relationships": { "parent": { "data": { "type": "topic", "id": "parent-guid" } }, "standards": { "data": [ { "type": "standard", "id": "standard-guid-1" }, { "type": "standard", "id": "standard-guid-2" } ] } } } } ``` ``` -------------------------------- ### Download All Table Schemas Source: https://developerdocs.instructure.com/services/dap/lib-index/lib-examples Fetches a list of all tables within a namespace ('canvas') and then downloads the schema for each table into a specified output directory. Configures logging and requires an active asynchronous DAPClient session. The output directory is determined by the current working directory. ```python import os from dap.api import DAPClient from dap.log import configure_logging output_directory: str = os.getcwd() configure_logging() async with DAPClient() as session: tables = await session.get_tables("canvas") for table in tables: await session.download_table_schema("canvas", table, output_directory) ``` -------------------------------- ### Example API Response - Files UI Version Source: https://developerdocs.instructure.com/services/canvas/resources/users An example JSON response showing the user's updated preference for the files UI version. ```json { "files_ui_version": "v2" } ``` -------------------------------- ### GET /providers/{guid} Source: https://developerdocs.instructure.com/services/ab-connect/reference/providers Retrieve the details of a specific Provider by appending their AB GUID to the URL. ```APIDOC ## GET /providers/{guid} ### Description Retrieves the details of a specific Provider using their unique AB GUID. ### Method GET ### Endpoint /providers/{guid} #### Path Parameters - **guid** (string) - Required - The unique AB GUID of the Provider. ### Response #### Success Response (200) - **name** (string) - The name of the Provider. - **guid** (string) - The unique GUID of the Provider. - **licensed_taxonomies** (array) - A list of AB taxonomies the Provider has licensed. #### Response Example ```json { "name": "Example Provider", "guid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "licensed_taxonomies": [ "taxonomy1", "taxonomy2" ] } ``` ``` -------------------------------- ### Get Bulk User Progress Response Example Source: https://developerdocs.instructure.com/services/canvas/resources/courses An example JSON response for the 'Get Bulk User Progress' API endpoint, detailing progress metrics for each student in a course. ```json [ { "id": 1, "display_name": "Test Student 1", "avatar_image_url": "https:///images/messages/avatar-50.png", "html_url": "https:///courses/1/users/1", "pronouns": null, "progress": { "requirement_count": 2, "requirement_completed_count": 1, "next_requirement_url": "https:///courses//modules/items/", "completed_at": null } }, { "id": 2, "display_name": "Test Student 2", "avatar_image_url": "https:///images/messages/avatar-50.png", "html_url": "https:///courses/1/users/2", "pronouns": null, "progress": { "requirement_count": 2, "requirement_completed_count": 2, "next_requirement_url": null, "completed_at": "2021-08-10T16:26:08Z" } } ] ``` -------------------------------- ### Authenticate with Instructure AB Connect API using Python 2 Source: https://developerdocs.instructure.com/services/ab-connect/introduction/authentication This Python 2 script demonstrates how to authenticate with the Instructure AB Connect API. It utilizes the `hashlib`, `hmac`, `base64`, and `urllib` modules to generate a signed API request. The script constructs a URL with partner credentials, an expiration timestamp, and an optional user ID, then fetches the data from the API. ```python import time import hashlib import hmac import base64 import urllib partner_id = 'public' # ID provided by AB. partner_key = '2jfaWErgt2+o48gsk302kd' # Key provided by AB. expires = str(int(time.time() + 86400)) # Seconds since epoch. Example expires in 24 hours. user_id = 'Bob' # Optional. Partner defined string. Provides access only for queries with this `user.id`. message = expires + "\n" + user_id digest = hmac.new(partner_key.encode(), message.encode(), digestmod=hashlib.sha256).digest() signature = base64.b64encode(digest).decode() encoded_sig = urllib.quote_plus(signature) # user.id is optional parms = 'partner.id=' + partner_id + \ '&auth.signature=' + encoded_sig + \ '&auth.expires=' + expires + \ '&user.id=' + user_id result = urllib.urlopen('https://api.abconnect.instructure.com/rest/v4.1/standards?' + parms).read() print result ``` -------------------------------- ### Create Issuer Request Body Example Source: https://developerdocs.instructure.com/services/parchment-digital-badges/getting-started This JSON object illustrates the structure of a request body for creating an Issuer. It includes required fields like name, description, and URL, as well as optional fields like image, email, and organizationId. ```json { "name": "Example Issuer Name", "description": "This is a description for the example issuer.", "url": "https://example.com/issuer-profile", "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN0nmxRDwADvgGPapFGzwAAAABJRU5ErkJggg==", "email": "verified-email@example.com", "organizationId": "your-organization-id" } ``` -------------------------------- ### LTI Tool Configuration Source: https://developerdocs.instructure.com/services/canvas/external-tools/lti/file This section shows an example XML configuration for a basic LTI link, including title, description, launch URL, and Canvas-specific extensions. ```APIDOC ## LTI Tool Configuration Example ### Description Provides an example of a `cartridge_basiclti_link` XML structure for configuring an LTI tool. It includes basic information like title and description, a launch URL, and platform-specific extensions for Canvas. ### Method N/A (Configuration File) ### Endpoint N/A (Configuration File) ### Parameters N/A ### Request Example ```xml Protractor Tool This tool provides an online, interactive protractor for students to use https://example.com/tool_redirect?query_param=some_value true public ``` ### Response N/A (Configuration File) ``` -------------------------------- ### Set Database Connection String in Environment Variables (MacOS/Linux) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Sets the DAP_CONNECTION_STRING environment variable on macOS and Linux for database connections. Replace the example connection string with your actual database details. Terminal must be restarted for changes to take effect. ```shell export DAP_CONNECTION_STRING=postgresql://user:password@localhost:5432/mydatabase ``` -------------------------------- ### Initialize Database with Full Table Snapshots (DAP CLI) Source: https://developerdocs.instructure.com/services/dap/dap-cli-readme/dap-cli-getting-started Uses the 'dap initdb' command to download full snapshots of specified tables (e.g., accounts, users) from the Canvas namespace and store them in a PostgreSQL database. Requires a valid connection string. ```shell dap initdb --connection-string postgresql://user:password@localhost/mydb --namespace canvas --table accounts,users ``` -------------------------------- ### GET /asset_definitions/{guid} Source: https://developerdocs.instructure.com/services/ab-connect/reference/asset-definitions Retrieves the details of a specific Asset Definition resource by appending its unique GUID to the URL. ```APIDOC ## GET /asset_definitions/{guid} ### Description Retrieves the details of a specific Asset Definition resource by appending its unique GUID to the URL. ### Method GET ### Endpoint /asset_definitions/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The unique identifier for the Asset Definition. ### Request Example ```json { "example": "GET /asset_definitions/YOUR_ASSET_GUID" } ``` ### Response #### Success Response (200) - **asset_definition** (object) - Contains the properties of the asset definition. #### Response Example ```json { "example": "{\"asset_definition\": { \"guid\": \"YOUR_ASSET_GUID\", \"name\": \"Example Asset\", \"type\": \"Document\" }}" } ``` ``` -------------------------------- ### Java Authentication Example Source: https://developerdocs.instructure.com/services/ab-connect/introduction/authentication This example demonstrates how to generate an HMAC-SHA256 signature and construct an authenticated URL for the AB Connect API using Java. ```APIDOC ## GET /rest/v4.1/standards ### Description This endpoint retrieves standards data from the AB Connect API. Authentication is required using a partner ID, partner key, and a generated signature. ### Method GET ### Endpoint `https://api.abconnect.instructure.com/rest/v4.1/standards` ### Parameters #### Query Parameters - **partner.id** (string) - Required - Your unique partner ID provided by AB. - **auth.signature** (string) - Required - The generated HMAC-SHA256 signature. - **auth.expires** (integer) - Required - The Unix timestamp (in seconds) when the signature expires. - **user.id** (string) - Optional - A partner-defined string to filter access for a specific user. ### Request Example ```java package AuthExample; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.net.URLEncoder; import java.util.Base64; import java.util.Calendar; import java.util.TimeZone; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import javax.net.ssl.HttpsURLConnection; public class program { public static void main(String[] args) { String partnerID = "public"; // ID provided by AB. String partnerKey = "2jfaWErgt2+o48gsk302kd"; // Key provided by AB. String userID = "Bob"; // Optional. Partner defined string. Provides access only for queries with this `user.id`. // Seconds since epoch. Example is 24 hours. Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); long expires = (long)Math.floor(cal.getTimeInMillis() / 1000) + 60*60*24; String message = String.format("%d\n%s", expires, userID); // format message for signature HttpsURLConnection connection = null; try { // // generate signature and base64 encode it // Mac sha256_HMAC = Mac.getInstance("HmacSHA256"); SecretKeySpec secret_key = new SecretKeySpec(partnerKey.getBytes("UTF-8"), "HmacSHA256"); sha256_HMAC.init(secret_key); byte[] hmacBytes = sha256_HMAC.doFinal(message.getBytes("UTF8")); String signature = Base64.getEncoder().encodeToString(hmacBytes); // // pack the signature and other auth parameters in URL // String targetURL = String.format( "https://api.abconnect.instructure.com/rest/v4.1/standards?partner.id=%s&auth.signature=%s&auth.expires=%d&user.id=%s", URLEncoder.encode(partnerID, "UTF-8"), URLEncoder.encode(signature, "UTF-8"), expires, URLEncoder.encode(userID, "UTF-8") ); // //Create connection // URL url = new URL(targetURL); connection = (HttpsURLConnection) url.openConnection(); // // Get Response // InputStream is = connection.getInputStream(); BufferedReader rd = new BufferedReader(new InputStreamReader(is)); String line; while ((line = rd.readLine()) != null) { System.out.println(line); } rd.close(); } catch (Exception e) { e.printStackTrace(); System.exit(-1); } finally { if (connection != null) { connection.disconnect(); } } } } ``` ### Response #### Success Response (200) - **[Standard Data Fields]** (object) - Contains the requested standards data. The specific fields depend on the AB Connect API response structure. #### Response Example ```json { "example": "[JSON response body with standards data]" } ``` ``` -------------------------------- ### Authenticate API Request with Bearer Token using cURL Source: https://developerdocs.instructure.com/services/parchment-digital-badges/getting-started This example shows how to authenticate subsequent API requests by including an 'Authorization' header with a 'Bearer' token. The token obtained from the token endpoint is used here for a request to retrieve user profile information. ```bash curl 'https://api.badges.parchment.com/v2/users/self' -H "Authorization: Bearer YOURACCESSTOKEN" ``` -------------------------------- ### Configure LTI for Minimal Resource Selection Source: https://developerdocs.instructure.com/services/canvas/external-tools/lti/file This XML configuration sets up a minimal Basic LTI link for an 'eBook Selector' tool. It includes the title, description, and Canvas-specific extensions for resource selection, defining the tool's URL, display text, and dimensions. ```xml eBook Selector Select chapters of available eBooks to insert into course modules public example.com true https://example.com/chapter_selector eBook Chapter Selector 500 300 ``` -------------------------------- ### GET /standards/{guid} Source: https://developerdocs.instructure.com/services/ab-connect/reference/standards Retrieves the details of a specific Standard by appending its AB GUID to the URL. ```APIDOC ## GET /standards/{guid} ### Description Retrieves the details of a specific Standard using its unique AB GUID. ### Method GET ### Endpoint /standards/{guid} #### Path Parameters - **guid** (string) - Required - The AB GUID of the Standard to retrieve. ### Request Example ```json { "example": "GET /standards/a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **data** (object) - The Standard object containing details and metadata. - **links** (object) - Links related to the Standard resource. - **included** (array) - Included related resources if requested. #### Response Example ```json { "data": { "type": "standards", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "attributes": { "title": "Example Standard Title", "description": "This is a detailed description of the example standard." }, "relationships": { "topics": { "links": { "related": "/standards/a1b2c3d4-e5f6-7890-1234-567890abcdef/topics" } } } }, "links": { "self": "/standards/a1b2c3d4-e5f6-7890-1234-567890abcdef" } } ``` ``` -------------------------------- ### Get Standard by GUID Source: https://developerdocs.instructure.com/services/ab-connect/introduction/how-to Retrieve a specific Standard by its GUID. This endpoint is useful for verifying GUID validity, checking licensing, and determining if a Standard has been deleted. ```APIDOC ## GET /rest/v4.1/standards/{guid} ### Description Retrieves a specific Standard using its unique GUID. This endpoint can help diagnose issues related to stale caches, licensing, and deleted standards. ### Method GET ### Endpoint `/rest/v4.1/standards/{guid}` ### Parameters #### Path Parameters - **guid** (string) - Required - The unique identifier for the Standard. #### Query Parameters - **fields[standards]** (string) - Optional - Comma-separated list of fields to include in the response for the standards object. - **include** (string) - Optional - Comma-separated list of related objects to include in the response. ### Request Example ``` GET /rest/v4.1/standards/2FADED92-647D-4183-89C1-17F28CF065ED?fields[standards]=statement,number,section,course_standards&include=course_standards ``` ### Response #### Success Response (200) - **statement** (string) - The statement of the standard. - **number** (string) - The number or code of the standard. - **section** (string) - The section the standard belongs to. - **course_standards** (array) - A list of courses this standard is part of. #### Error Response (403) - **error** (object) - Contains details about the licensing issue. - **message** (string) - Description of the error, indicating lack of license. #### Response Example (Success) { "statement": "Example Standard Statement", "number": "K.1", "section": "Kindergarten", "course_standards": [ { "id": "...", "name": "Florida CPALMS Language Arts - Kindergarten" } ] } #### Response Example (403 Forbidden) { "error": { "message": "You are not licensed for this standard. Please contact AB Support to add it to your license." } } ``` -------------------------------- ### Create External Tool on Account with Configuration from URL Source: https://developerdocs.instructure.com/services/canvas/resources/external_tools This example demonstrates creating an external tool at the account level where its configuration is fetched from a specified URL. It uses a POST request to the account's external tools endpoint, providing the tool's name, consumer key, shared secret, and a `config_url` for external configuration. This method is useful for tools that provide their own LTI configuration XML. ```bash curl -X POST 'https:///api/v1/accounts//external_tools' \ -H "Authorization: Bearer " \ -F 'name=LTI Example' \ -F 'consumer_key=asdfg' \ -F 'shared_secret=lkjh' \ -F 'config_type=by_url' \ -F 'config_url=https://example.com/ims/lti/tool_config.xml' ``` -------------------------------- ### Install DAP Python Client Library using pip Source: https://developerdocs.instructure.com/services/dap/lib-index This command installs the latest version of the instructure-dap-client library using pip, the Python package installer. Ensure you have Python 3.11+ and pip installed on a supported operating system. ```shell pip3 install "instructure-dap-client" ``` -------------------------------- ### GET /assets/{guid} Source: https://developerdocs.instructure.com/services/ab-connect/reference/assets Retrieves the details of a specific asset using its globally unique identifier (GUID). ```APIDOC ## GET /assets/{guid} ### Description Retrieves the details of a specific asset using its globally unique identifier (GUID). ### Method GET ### Endpoint /assets/{guid} #### Path Parameters - **guid** (string) - Required - The globally unique identifier (GUID) of the asset. ### Response #### Success Response (200) - **asset** (object) - Contains the details of the asset. - **guid** (string) - The GUID of the asset. - **client_id** (string) - The organization's identifier for the asset. - **asset_type** (string) - The type of the asset. - **title** (string) - The title of the asset. - **descriptor** (array) - An array of name-value pairs describing the asset. #### Response Example ```json { "asset": { "guid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "client_id": "AJIH-45679", "asset_type": "Document", "title": "Example Asset", "descriptor": [ { "name": "Key", "value": "Value" } ] } } ``` ``` -------------------------------- ### Authenticate with Instructure AB Connect API using PHP Source: https://developerdocs.instructure.com/services/ab-connect/introduction/authentication This PHP script demonstrates how to authenticate with the Instructure AB Connect API. It generates a signed URL for making GET requests. The script uses base64 encoding and HMAC-SHA256 hashing to create the signature. It also includes basic HTML structure for displaying the generated URL and the API response. ```php Generated Request URL'; print '

' . $url . '


'; $response = file_get_contents($url); print '

JSON Response

'; print '

' . $response . '

'; ?> ``` -------------------------------- ### GET /standards/{guid}/concepts Source: https://developerdocs.instructure.com/services/ab-connect/reference/relationships Fetches concepts related to a given Standard. This endpoint is a specific use case of the more general /standards/{guid}/{relationship} endpoint. ```APIDOC ## GET /standards/{guid}/concepts ### Description Fetches concepts related to a given Standard. This endpoint is a specific use case of the more general /standards/{guid}/{relationship} endpoint. ### Method GET ### Endpoint /standards/{guid}/concepts ### Parameters #### Path Parameters - **guid** (string) - Required - The GUID of the Standard. #### Query Parameters - **filter** (string) - Optional - Filters the results based on relationship properties (e.g., `descr`, `context`). - **page** (integer) - Optional - Specifies the page number for paginated results. - **pageSize** (integer) - Optional - Specifies the number of results per page. ### Request Example ```json { "example": "No request body for this GET request." } ``` ### Response #### Success Response (200) - **concepts** (array) - A list of concepts related to the specified Standard. #### Response Example ```json { "example": "{\n \"concepts\": [\n {\n \"id\": \"concept-id-def\",\n \"name\": \"Concept Name 2\"\n }\n ]\n}" } ``` ``` -------------------------------- ### GET /standards/{guid}/topics Source: https://developerdocs.instructure.com/services/ab-connect/reference/relationships Fetches topics related to a given Standard. This endpoint is a specific use case of the more general /standards/{guid}/{relationship} endpoint. ```APIDOC ## GET /standards/{guid}/topics ### Description Fetches topics related to a given Standard. This endpoint is a specific use case of the more general /standards/{guid}/{relationship} endpoint. ### Method GET ### Endpoint /standards/{guid}/topics ### Parameters #### Path Parameters - **guid** (string) - Required - The GUID of the Standard. #### Query Parameters - **filter** (string) - Optional - Filters the results based on relationship properties (e.g., `meta.same_text`). - **page** (integer) - Optional - Specifies the page number for paginated results. - **pageSize** (integer) - Optional - Specifies the number of results per page. ### Request Example ```json { "example": "No request body for this GET request." } ``` ### Response #### Success Response (200) - **topics** (array) - A list of topics related to the specified Standard. #### Response Example ```json { "example": "{\n \"topics\": [\n {\n \"id\": \"topic-id-abc\",\n \"name\": \"Topic Name 1\"\n }\n ]\n}" } ``` ``` -------------------------------- ### Initialize DAPSession Source: https://developerdocs.instructure.com/services/dap/lib-index/lib-reference Creates a new logical session to DAP by encapsulating a network connection. It requires an active ClientSession, base URL, and credentials. ```python class DAPSession: def __init__(self, session: ClientSession, base_url: str, credentials: Credentials, tracking_data: TrackingData | None) -> None: # ... implementation ... ``` -------------------------------- ### Import Process Source: https://developerdocs.instructure.com/services/canvas/external-tools/lti/file Initiates the asynchronous import process for course content. The tool receives a POST request with the content to be imported. ```APIDOC ## POST /websites/developerdocs_instructure_services/import ### Description Initiates the asynchronous import process for course content. The tool receives a POST request to the specified `import_start_url`. The request body contains `tool_consumer_instance_guid`, `context_id`, variable expansions, and the content to be imported in the `data` field. Authentication is handled via JWT in the `Authorization` header. ### Method POST ### Endpoint `/import_start_url` (provided in the request) ### Parameters #### Request Body - **tool_consumer_instance_guid** (string) - Required - The GUID of the tool consumer instance. - **context_id** (string) - Required - The ID of the context (e.g., course). - **data** (object) - Required - The content to be imported. ### Request Example ```json { "tool_consumer_instance_guid": "some-guid", "context_id": "course-123", "data": { "assignments": [{"id": "afd24c", "$canvas_assignment_id": 42}] } } ``` ### Response #### Success Response (200 OK) - **status_url** (string) - URL to check the progress of the import. #### Response Example ```json { "status_url": "https://lti.example.com/import/42/status" } ``` ``` -------------------------------- ### Retrieve Asset Details using GUID Source: https://developerdocs.instructure.com/services/ab-connect/reference/assets Fetches the detailed information of a specific asset by providing its Asset GUID. This operation uses a GET request to the /assets/{guid} endpoint. Ensure you have the correct Asset GUID before making the request. ```yaml paths: /assets/{guid}: get: summary: Retrieve details of an asset parameters: - name: guid in: path required: true schema: type: string responses: '200': description: Asset details retrieved successfully ``` -------------------------------- ### Get Standard by GUID Source: https://developerdocs.instructure.com/services/ab-connect/introduction/how-to Retrieve a specific standard using its unique GUID. This endpoint returns the standard regardless of its deletion status. ```APIDOC ## GET /rest/v4.1/standards/ ### Description Retrieves a specific standard by its GUID. The system will respond with the standard even if it has been deleted. ### Method GET ### Endpoint /rest/v4.1/standards/ ### Parameters #### Path Parameters - **GUID** (string) - Required - The unique identifier for the standard. ### Response #### Success Response (200) - **standard** (object) - The standard object, including its details. #### Response Example ```json { "standard": { "guid": "example-guid", "title": "Example Standard", "description": "This is an example standard.", "deleted": false } } ``` ``` -------------------------------- ### Show Course Pace API Request Example (Bash) Source: https://developerdocs.instructure.com/services/canvas/resources/course_pace Demonstrates how to make a GET request to retrieve a specific course pace using its course ID and course pace ID. This example uses `curl` and requires an authorization token for access. The response is a CoursePace object. ```bash curl https:///api/v1/courses/1/course_pacing/1 \ -H 'Authorization: Bearer ' ``` -------------------------------- ### GET /topics/{guid}/{relationship} Source: https://developerdocs.instructure.com/services/ab-connect/reference/relationships Pages through objects related to a given Topic. Filtering is not supported for this endpoint. ```APIDOC ## GET /topics/{guid}/{relationship} ### Description Pages through objects related to a given Topic. Filtering is not supported for this endpoint. ### Method GET ### Endpoint /topics/{guid}/{relationship} ### Parameters #### Path Parameters - **guid** (string) - Required - The GUID of the Topic. - **relationship** (string) - Required - The type of relationship to retrieve. #### Query Parameters - **page** (integer) - Optional - Specifies the page number for paginated results. - **pageSize** (integer) - Optional - Specifies the number of results per page. ### Request Example ```json { "example": "No request body for this GET request." } ``` ### Response #### Success Response (200) - **relatedObjects** (array) - A list of objects related to the specified Topic. #### Response Example ```json { "example": "{\n \"relatedObjects\": [\n {\n \"id\": \"related-object-id-ghi\",\n \"name\": \"Related Object Name 2\"\n }\n ]\n}" } ``` ``` -------------------------------- ### Initialize DAPClient with Credentials Source: https://developerdocs.instructure.com/services/dap/lib-index/lib-examples Instantiates the DAPClient class using explicit client ID and secret credentials loaded from environment variables. It configures logging and enters an asynchronous context for the client session. Requires 'DAP_CLIENT_ID' and 'DAP_CLIENT_SECRET' environment variables. ```python import os from dap.api import DAPClient from dap.dap_types import Credentials from dap.log import configure_logging client_id: str = os.environ["DAP_CLIENT_ID"] client_secret: str = os.environ["DAP_CLIENT_SECRET"] credentials = Credentials.create(client_id=client_id, client_secret=client_secret) configure_logging() async with DAPClient(credentials=credentials) as session: ... ``` -------------------------------- ### Get All Quiz Submissions Example Response (JavaScript) Source: https://developerdocs.instructure.com/services/canvas/resources/quiz_submissions An example of a successful (200 OK) response when retrieving all quiz submissions. The response contains a 'quiz_submissions' key, which is an array of QuizSubmission objects. ```javascript { "quiz_submissions": [QuizSubmission] } ``` -------------------------------- ### Example Course Settings Response (JavaScript) Source: https://developerdocs.instructure.com/services/canvas/resources/courses An example JSON response detailing various settings for a Canvas LMS course, including discussion topic permissions, grading standards, and visibility options. ```javascript { "allow_student_discussion_topics": true, "allow_student_forum_attachments": false, "allow_student_discussion_editing": true, "grading_standard_enabled": true, "grading_standard_id": 137, "allow_student_organized_groups": true, "hide_final_grades": false, "hide_distribution_graphs": false, "hide_sections_on_course_users_page": false, "lock_all_announcements": true, "usage_rights_required": false, "homeroom_course": false, "default_due_time": "23:59:59", "conditional_release": false } ```