{
  "openapi": "3.1.0",
  "x-stoplight": {
    "id": "c88cckom12vvf"
  },
  "tags": [
    {
      "name": "Deep Linking",
      "description": "Methods create deep-linking requests"
    },
    {
      "name": "Dynamic Registration",
      "description": "Methods to manage the dynamic registration intermediate target flow"
    },
    {
      "name": "ID Token",
      "description": "Methods to get ID tokens"
    },
    {
      "name": "Line Items",
      "description": "Methods to manipulate lineitems"
    },
    {
      "name": "Memberships",
      "description": "Methods to get memberships"
    },
    {
      "name": "Platforms",
      "description": "Methods to manage platform registrations"
    },
    {
      "name": "Scores",
      "description": "Methods to manipulate scores"
    },
    {
      "name": "OAuth2",
      "description": "Methods manage Oauth2 Access Tokens"
    }
  ],
  "info": {
    "title": "LTIAAS",
    "version": "2.0",
    "license": {
      "name": "BSD-3-Clause",
      "url": "https://opensource.org/license/bsd-3-clause"
    },
    "description": "The **LTIAAS** API allows you to easily access the various LTI® 1.3 Advantage services and functionalities like SSO, grade manipulation and roster retrieval.\n\n\n## Using the LTIAAS API\n\nTo learn how to use our API to build your very own LTI® integration, please check our detailed guides.\n\n### Retrieve the ID Token and perform SSO\n\nThe ID Token is the main piece of data in the LTI® protocol, it's sent by the LMS to the LTI® tool and contains information regarding the current LTI® launch, this includes user information, LMS information, launch context information and everything you need to use the many LTI® services.\n\nYou can use the information contained in the ID Token to perform SSO and authenticate users into your application, automatically logging them into a preexisting account or provisioning a new one on the spot. To learn more about this, please check our [Retrieving ID Token guide](/guides/api/idtoken) and its [Performing SSO section](/guides/api/idtoken#performing-sso).\n\n\n### Retrieve roster information\n\nThe LTI® protocol allows you to retrieve roster information for an LMS context through the *Names and Roles Provisioning* service. LTIAAS gives you access to this service through the Memberships API endpoint. To learn more about this functionality, please check our [Retrieving course roster guide](/guides/api/roster).\n\n### Manipulate user grades\n\nThe LTI® protocol allows you to manipulate user's grades and LMS grade lines through the *Assignment and Grades* service. LTIAAS gives you access to this service through the Line Items API endpoint. To learn more about this functionality, please check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and [Manipulating grades guide](/guides/api/manipulating-grades).\n\n### Serve multiple resources through your LTI® tool\n\nIf your application is a hub of multiple resources and/or activities, the LTI® protocol makes this easy to manage through the *Deep Linking* service. You can use this service to allow teachers and administrators to select one specific resource from your application when creating an activity in the LMS. LTIAAS gives you access to this service through the Deep Linking flow and API endpoint. To learn more about this functionality, please check our [Performing Deep Linking guide](/guides/api/deeplinking).\n\n\n## Authenticating API requests\n\nPlease check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.\n\n",
    "contact": {
      "name": "LTIAAS Support",
      "url": "https://ltiaas.com",
      "email": "support@ltiaas.com"
    },
    "termsOfService": "https://ltiaas.com/terms"
  },
  "servers": [
    {
      "url": "https://your.ltiaas.com"
    }
  ],
  "paths": {
    "/api/idtoken": {
      "parameters": [],
      "get": {
        "summary": "Get ID Token",
        "tags": [
          "ID Token"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "LTIAAS formatted ID Token",
                  "properties": {
                    "user": {
                      "type": "object",
                      "description": "User information",
                      "required": [
                        "id",
                        "roles"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "2",
                          "description": "User ID as defined in the LMS"
                        },
                        "roles": {
                          "type": "array",
                          "minItems": 1,
                          "description": "The required https://purl.imsglobal.org/spec/lti/claim/roles claim's value contains a (possibly empty) array of URI values for roles that the user has within the message's associated context.\n\nIf this list is not empty, it MUST contain at least one role from the role vocabularies described in role vocabularies.",
                          "items": {
                            "type": "string",
                            "example": "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor",
                            "enum": [
                              "Administrator",
                              "Student",
                              "Learner",
                              "Instructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#Administrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#None",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#AccountAdmin",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#Creator",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysAdmin",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysSupport",
                              "http://purl.imsglobal.org/vocab/lis/v2/system/person#User",
                              "http://purl.imsglobal.org/vocab/lti/system/person#TestUser",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Administrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Faculty",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Guest",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#None",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Other",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Staff",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Alumni",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Learner",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Member",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Mentor",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Observer",
                              "http://purl.imsglobal.org/vocab/lis/v2/institution/person#ProspectiveStudent",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Administrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#ContentDeveloper",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Mentor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Manager",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Member",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership#Officer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Administrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Developer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalDeveloper",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSupport",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSystemAdministrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Support",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#SystemAdministrator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentDeveloper",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentExpert",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ExternalContentExpert",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#Librarian",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#ExternalInstructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Grader",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#GuestInstructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Lecturer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#PrimaryInstructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#SecondaryInstructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantGroup",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantOffering",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSection",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSectionAssociation",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantTemplate",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#ExternalLearner",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#GuestLearner",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Instructor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Learner",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#NonCreditLearner",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#AreaManager",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#CourseCoordinator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#ExternalObserver",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Manager",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Observer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Member#Member",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Advisor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Auditor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAdvisor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAuditor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalLearningFacilitator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalMentor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalReviewer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalTutor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#LearningFacilitator",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Mentor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Reviewer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Tutor",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Chair",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Communications",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Secretary",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Treasurer",
                              "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Vice-Chair"
                            ]
                          }
                        },
                        "email": {
                          "type": "string",
                          "example": "john@lms.com",
                          "format": "email",
                          "description": "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 addr-spec syntax. The RP MUST NOT rely upon this value being unique. It should be combined with platform.id and launch.context.id to guarantee uniqueness of the user."
                        },
                        "name": {
                          "type": "string",
                          "example": "John Doe",
                          "description": "End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences."
                        },
                        "givenName": {
                          "type": "string",
                          "example": "John",
                          "description": "Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters."
                        },
                        "familyName": {
                          "type": "string",
                          "example": "Doe",
                          "description": "Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters."
                        }
                      }
                    },
                    "platform": {
                      "type": "object",
                      "description": "An object containing information about the LMS.",
                      "required": [
                        "id",
                        "url",
                        "clientId",
                        "deploymentId",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "0c41aa0849215449d4298e58f7626c68",
                          "description": "The platform ID as registrered within LTIAAS."
                        },
                        "url": {
                          "type": "string",
                          "example": "https://lms.example.com",
                          "description": "The URL of."
                        },
                        "clientId": {
                          "type": "string",
                          "example": "KzJtrQxEUYGWXjx",
                          "description": "Platform generated Client ID."
                        },
                        "deploymentId": {
                          "type": "string",
                          "example": "1",
                          "description": "Platform generated Deployment ID."
                        },
                        "name": {
                          "type": "string",
                          "example": "LMS",
                          "description": "Platform name."
                        },
                        "guid": {
                          "type": "string",
                          "example": "lms.example.com",
                          "description": "A stable locally unique to the iss identifier for an instance of the tool platform. The value of guid is a case-sensitive string that MUST NOT exceed 255 ASCII characters in length. The use of Universally Unique IDentifier (UUID) defined in RFC4122 is recommended."
                        },
                        "productFamilyCode": {
                          "type": "string",
                          "example": "lms",
                          "description": "Platform family code."
                        },
                        "version": {
                          "type": "string",
                          "example": "2020073000",
                          "description": "Platform version."
                        },
                        "description": {
                          "type": "string",
                          "example": "LMS",
                          "description": "Platform description."
                        },
                        "contactEmail": {
                          "type": "string",
                          "format": "email",
                          "description": "Administrative contact email for the platform.",
                          "example": "contact@lms.com"
                        }
                      }
                    },
                    "launch": {
                      "type": "object",
                      "description": "Launch context information.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "LtiResourceLinkRequest",
                          "description": "contains a string that indicates the type of the sender's LTI® message. For conformance with this specification, the claim must have the value LtiResourceLinkRequest.",
                          "enum": [
                            "LtiResourceLinkRequest"
                          ]
                        },
                        "target": {
                          "type": "string",
                          "format": "uri",
                          "description": "The target link URI is the actual endpoint for the LTI® resource to display; for example, the url in Deep Linking ltiResourceLink items, or the launch_url in IMS Common Cartridges, or any launch URL defined in the tool configuration.",
                          "example": "https://your.ltiaas.com/lti/launch"
                        },
                        "context": {
                          "type": "object",
                          "description": "The optional https://purl.imsglobal.org/spec/lti/claim/context claim composes properties for the context from within which the resource link launch occurs. While this is technically optional, all major LMSes send it.",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "2",
                              "description": "Stable identifier that uniquely identifies the context from which the LTI® message initiates."
                            },
                            "label": {
                              "type": "string",
                              "example": "course",
                              "description": "Short descriptive name for the context. This often carries the \"course code\" for a course offering or course section context."
                            },
                            "title": {
                              "type": "string",
                              "example": "Course",
                              "description": "Full descriptive name for the context. This often carries the \"course title\" or \"course name\" for a course offering context."
                            },
                            "type": {
                              "type": "array",
                              "description": "An array of URI values for context types. If present, the array MUST include at least one context type from the [context type vocabulary](https://www.imsglobal.org/spec/lti/v1p3#context-type-vocabulary) described in context type vocabulary. If the sender of the message wants to include a context type from another vocabulary namespace, by best practice it should use a fully-qualified URI.",
                              "items": {
                                "type": "string",
                                "example": "CourseSection",
                                "enum": [
                                  "http://purl.imsglobal.org/vocab/lis/v2/course#CourseTemplate",
                                  "CourseTemplate",
                                  "urn:lti:context-type:ims/lis/CourseTemplate",
                                  "http://purl.imsglobal.org/vocab/lis/v2/course#CourseOffering",
                                  "CourseOffering",
                                  "urn:lti:context-type:ims/lis/CourseOffering",
                                  "http://purl.imsglobal.org/vocab/lis/v2/course#CourseSection",
                                  "CourseSection",
                                  "urn:lti:context-type:ims/lis/CourseSection",
                                  "http://purl.imsglobal.org/vocab/lis/v2/course#Group",
                                  "Group",
                                  "urn:lti:context-type:ims/lis/Group"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "type"
                          ]
                        },
                        "resourceLink": {
                          "type": "object",
                          "description": "The required https://purl.imsglobal.org/spec/lti/claim/resource_link claim composes properties for the resource link from which the launch message occurs.",
                          "required": [
                            "id"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "1",
                              "description": "Opaque identifier for a placement of an LTI® resource link within a context that MUST be a stable and locally unique to the deployment_id. This value MUST change if the link is copied or exported from one system or context and imported into another system or context. The value of id MUST NOT exceed 255 ASCII characters in length and is case-sensitive."
                            },
                            "title": {
                              "type": "string",
                              "example": "Activity",
                              "description": "Descriptive title for an LTI® resource link placement."
                            },
                            "description": {
                              "type": "string",
                              "description": "Descriptive phrase for an LTI® resource link placement.",
                              "example": "Activity 1"
                            }
                          }
                        },
                        "presentation": {
                          "type": "object",
                          "description": "The optional https://purl.imsglobal.org/spec/lti/claim/launch_presentation claim composes properties that describe aspects of how the message sender expects to host the presentation of the message receiver's user experience (for example, the height and width of the viewport the message sender gives over to the message receiver)",
                          "properties": {
                            "locale": {
                              "type": "string",
                              "example": "en",
                              "description": " Language, country, and variant as represented using the IETF Best Practices for Tags for Identifying Languages."
                            },
                            "document_target": {
                              "type": "string",
                              "example": "iframe",
                              "description": "The kind of browser window or frame from which the user launched inside the message sender's system. The value for this property MUST be one of: frame, iframe, or window.",
                              "enum": [
                                "frame",
                                "iframe",
                                "window"
                              ]
                            },
                            "returnUrl": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://lms.example.com/course/1",
                              "description": "Fully-qualified HTTPS URL within the message sender's user experience to where the message receiver can redirect the user back. The message receiver can redirect to this URL after the user has finished activity, or if the receiver cannot start because of some technical difficulty."
                            },
                            "width": {
                              "type": "integer",
                              "description": "Width of the window or frame where the content from the message receiver will be displayed to the user.",
                              "example": 1300
                            },
                            "height": {
                              "type": "integer",
                              "description": "Height of the window or frame where the content from the message receiver will be displayed to the user.",
                              "example": 964
                            }
                          }
                        },
                        "custom": {
                          "type": "object",
                          "description": "Custom parameters object containing paramaters sent from the LMS."
                        }
                      },
                      "required": [
                        "type",
                        "target",
                        "resourceLink",
                        "custom"
                      ]
                    },
                    "services": {
                      "type": "object",
                      "description": "The services section in the LTIAAS ID Token is an object containing information regarding the LTI® services and their availability in the context of a specific LTI® Launch",
                      "required": [
                        "deepLinking",
                        "namesAndRoles",
                        "assignmentAndGrades"
                      ],
                      "properties": {
                        "deepLinking": {
                          "type": "object",
                          "description": "The deepLinking object contains availability information for the Deep Linking LTI® service",
                          "required": [
                            "available"
                          ],
                          "properties": {
                            "available": {
                              "type": "boolean",
                              "description": "Availability status for the Deep Linking service in the current launch context"
                            }
                          }
                        },
                        "namesAndRoles": {
                          "type": "object",
                          "description": "The namesAndRoles object contains availability information for the Names and Roles Provisioning LTI® service",
                          "required": [
                            "available"
                          ],
                          "properties": {
                            "available": {
                              "type": "boolean",
                              "description": "Availability status for the Names and Roles Provisioning service in the current launch context"
                            }
                          }
                        },
                        "assignmentAndGrades": {
                          "type": "object",
                          "description": "The assignmentAndGrades object contains availability information for the Assignment and Grades LTI® service",
                          "required": [
                            "available"
                          ],
                          "properties": {
                            "available": {
                              "type": "boolean",
                              "description": "Availability status for the Assignment and Grades service in the current launch context"
                            },
                            "lineItemId": {
                              "type": "string",
                              "description": "Line item ID for the current launch context. This field will only be present if there's only one line item ID associated with the current context.",
                              "example": "https://lms.example.com/course/1/lineitems/1",
                              "format": "uri"
                            }
                          }
                        },
                        "serviceKey": {
                          "type": "string",
                          "description": "The serviceKey field contains the service key token that can be used to perform the service key based API authentication. This field is only populated if the current launch context has access to at least one of the Assignment and Grades or Names and Roles Provisioning LTI® services",
                          "example": "eyJhbGciajsheu..."
                        }
                      }
                    }
                  },
                  "required": [
                    "user",
                    "platform",
                    "services"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {
                  "Example": {
                    "value": {
                      "status": 401,
                      "error": "Unauthorized",
                      "details": {
                        "message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
                        "description": "Invalid or expired ltik."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = 'https://your.ltiaas.com/api/idtoken';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \nurl = \"https://your.ltiaas.com/api/idtoken\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \n\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/idtoken',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/idtoken\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/idtoken\");\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/idtoken\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/idtoken' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "operationId": "get-idtoken",
        "description": "The ID Token is the main piece of data in the LTI® protocol, it's sent by the LMS to the LTI® tool and contains information regarding the current LTI® launch, this includes user information, LMS information, launch context information and everything you need to use the many LTI® services.\n\nLTIAAS gives you access to a launch specific ID Token, formatted for easy of use, through the `/api/idtoken` API endpoint.\n\nPlease check our [Retrieving the ID Token guide](/guides/api/idtoken) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "raw",
            "description": "If true, returns an unformatted version of the ID token."
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          }
        ]
      }
    },
    "/api/memberships": {
      "parameters": [],
      "get": {
        "summary": "Get Memberships",
        "tags": [
          "Memberships"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "id": "https://lms.example.com/sections/2923/memberships",
                      "context": {
                        "id": "2923-abc",
                        "label": "CPS 435",
                        "title": "CPS 435 Learning Analytics"
                      },
                      "next": "https://lms.example.com/sections/2923/memberships?page=2",
                      "members": [
                        {
                          "status": "Active",
                          "name": "Jane Q. Public",
                          "picture": "https://platform.example.edu/jane.jpg",
                          "givenName": "Jane",
                          "familyName": "Doe",
                          "middleName": "Marie",
                          "email": "jane@platform.example.edu",
                          "userId": "0ae836b9-7fc9-4060-006f-27b2066ac545",
                          "lis_person_sourcedid": "59254-6782-12ab",
                          "roles": [
                            "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor"
                          ]
                        }
                      ]
                    }
                  },
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://lms.example.com/course/1/memberships?page=1",
                      "description": "URL the memberships were retrieved from."
                    },
                    "context": {
                      "type": "object",
                      "description": "Context the memberships were retrieved from.",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "1",
                          "description": "Stable identifier that uniquely identifies the context from which the LTI® message initiates."
                        },
                        "label": {
                          "type": "string",
                          "example": "course",
                          "description": "Short descriptive name for the context. This often carries the \\\"course code\\\" for a course offering or course section context."
                        },
                        "title": {
                          "type": "string",
                          "example": "Course",
                          "description": "Full descriptive name for the context. This often carries the \\\"course title\\\" or \\\"course name\\\" for a course offering context."
                        }
                      }
                    },
                    "members": {
                      "type": "array",
                      "description": "Array of User memberships as defined in the [LTI® Advantage Names and Roles Provisioning Services](https://www.imsglobal.org/spec/lti-nrps/v2p0)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string",
                            "example": "2",
                            "description": "User ID as defined in the LMS."
                          },
                          "roles": {
                            "type": "array",
                            "description": "The required https://purl.imsglobal.org/spec/lti/claim/roles claim's value contains a (possibly empty) array of URI values for roles that the user has within the message's associated context.\\n\\nIf this list is not empty, it MUST contain at least one role from the role vocabularies described in role vocabularies.",
                            "items": {
                              "type": "string",
                              "example": "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor",
                              "format": "uri",
                              "description": "A list of role vocabularies as defined in the LTI® 1.3 spec: https://www.imsglobal.org/spec/lti/v1p3/#role-vocabularies",
                              "enum": [
                                "Administrator",
                                "Student",
                                "Learner",
                                "Instructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#Administrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#None",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#AccountAdmin",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#Creator",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysAdmin",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysSupport",
                                "http://purl.imsglobal.org/vocab/lis/v2/system/person#User",
                                "http://purl.imsglobal.org/vocab/lti/system/person#TestUser",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Administrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Faculty",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Guest",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#None",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Other",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Staff",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Alumni",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Learner",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Member",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Mentor",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Observer",
                                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#ProspectiveStudent",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Administrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#ContentDeveloper",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Mentor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Manager",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Member",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership#Officer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Administrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Developer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalDeveloper",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSupport",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSystemAdministrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Support",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#SystemAdministrator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentDeveloper",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentExpert",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ExternalContentExpert",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#Librarian",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#ExternalInstructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Grader",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#GuestInstructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Lecturer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#PrimaryInstructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#SecondaryInstructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantGroup",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantOffering",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSection",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSectionAssociation",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantTemplate",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#ExternalLearner",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#GuestLearner",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Instructor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Learner",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#NonCreditLearner",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#AreaManager",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#CourseCoordinator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#ExternalObserver",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Manager",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Observer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Member#Member",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Advisor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Auditor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAdvisor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAuditor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalLearningFacilitator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalMentor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalReviewer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalTutor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#LearningFacilitator",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Mentor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Reviewer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Tutor",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Chair",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Communications",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Secretary",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Treasurer",
                                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Vice-Chair"
                              ]
                            }
                          },
                          "status": {
                            "type": "string",
                            "example": "Active",
                            "description": "Each membership has a status of either Active or Inactive. If the status is not specified then a status of Active must be assumed.",
                            "enum": [
                              "Active",
                              "Inactive",
                              "Deleted"
                            ]
                          },
                          "email": {
                            "type": "string",
                            "format": "email",
                            "description": "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 addr-spec syntax. The RP MUST NOT rely upon this value being unique.",
                            "example": "john@lms.example.com"
                          },
                          "name": {
                            "type": "string",
                            "example": "John Doe",
                            "description": "End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences."
                          },
                          "givenName": {
                            "type": "string",
                            "example": "John",
                            "description": "Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters."
                          },
                          "familyName": {
                            "type": "string",
                            "example": "Doe",
                            "description": "Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters."
                          },
                          "picture": {
                            "type": "string",
                            "example": "https://lms.example.com/john.jpg",
                            "format": "uri",
                            "description": "A URL to the user's picture."
                          }
                        },
                        "required": [
                          "userId",
                          "roles",
                          "status"
                        ]
                      }
                    },
                    "next": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://lms.example.com/course/1/memberships?page=2",
                      "description": "URL of the next membership page. This field is only present if the membership limit was reached before the full members list was retrieved."
                    }
                  },
                  "required": [
                    "id",
                    "context",
                    "members"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "operationId": "get-memberships",
        "description": "The LTI® protocol allows you to retrieve roster information for an LMS context through the *Names and Roles Provisioning* service. Users that are part of an LMS context are called *members*. LTIAAS gives you access to this service through the `/api/memberships` API endpoint.\n\nPlease check our [Retrieving course roster guide](/guides/api/roster) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Learner",
              "enum": [
                "Administrator",
                "Student",
                "Learner",
                "Instructor",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#Administrator",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#None",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#AccountAdmin",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#Creator",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysAdmin",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#SysSupport",
                "http://purl.imsglobal.org/vocab/lis/v2/system/person#User",
                "http://purl.imsglobal.org/vocab/lti/system/person#TestUser",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Administrator",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Faculty",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Guest",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#None",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Other",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Staff",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Student",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Alumni",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Instructor",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Learner",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Member",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Mentor",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#Observer",
                "http://purl.imsglobal.org/vocab/lis/v2/institution/person#ProspectiveStudent",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Administrator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#ContentDeveloper",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Learner",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Mentor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Manager",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Member",
                "http://purl.imsglobal.org/vocab/lis/v2/membership#Officer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Administrator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Developer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalDeveloper",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSupport",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#ExternalSystemAdministrator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#Support",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Administrator#SystemAdministrator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentDeveloper",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ContentExpert",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#ExternalContentExpert",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/ContentDeveloper#Librarian",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#ExternalInstructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Grader",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#GuestInstructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#Lecturer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#PrimaryInstructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#SecondaryInstructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantGroup",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantOffering",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSection",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantSectionAssociation",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistantTemplate",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#ExternalLearner",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#GuestLearner",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Instructor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#Learner",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Learner#NonCreditLearner",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#AreaManager",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#CourseCoordinator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#ExternalObserver",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Manager",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Manager#Observer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Member#Member",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Advisor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Auditor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAdvisor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalAuditor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalLearningFacilitator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalMentor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalReviewer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#ExternalTutor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#LearningFacilitator",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Mentor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Reviewer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Mentor#Tutor",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Chair",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Communications",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Secretary",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Treasurer",
                "http://purl.imsglobal.org/vocab/lis/v2/membership/Officer#Vice-Chair"
              ]
            },
            "in": "query",
            "name": "role",
            "description": "Filters memberships by role. Possible role values are defined in the [IMS Role Vocabularies](https://www.imsglobal.org/spec/lti/v1p3/#role-vocabularies). For example, a query parameter of 'role=http%3A%2%2Fpurl.imsglobal.org%2Fvocab%2Flis%2Fv2%2Fmembership%23Learner' will filter the memberships to just those which have a Learner role. Since this is a context-level role, the parameter could be simplified to 'role=Learner', following the same rule which applies to the 'roles' parameter in a 'LtiResourceLinkRequest' message."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 10,
              "format": "int32"
            },
            "in": "query",
            "name": "limit",
            "description": "Limits the number of memberships returned."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "resourceLinkId",
            "description": "Retrieves the Resource Link level memberships as specified in the [IMS Resource Link Membership Service specification](https://www.imsglobal.org/spec/lti-nrps/v2p0#resource-link-membership-service)."
          },
          {
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "in": "query",
            "name": "url",
            "description": "Retrieves memberships from a specific URL.     - *When present, the `url` parameter causes every other parameter to be ignored.*     - The `url` parameter should be URL encoded.     - In cases where not all members are retrieved when the membership limit is reached, the returned object will contain a `next` field holding an URL that can be used to retrieve the remaining members through the `url` parameter."
          }
        ],
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = 'https://your.ltiaas.com/api/memberships';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \nurl = \"https://your.ltiaas.com/api/memberships\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \n\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/memberships',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/memberships\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/memberships\");\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/memberships\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/memberships' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ]
      }
    },
    "/api/lineitems": {
      "parameters": [],
      "get": {
        "summary": "Get Line Items",
        "tags": [
          "Line Items"
        ],
        "operationId": "get-lineitems",
        "description": "The LTI® protocol allows you to retrieve grade lines from the LMS grade book through the *Assignment and Grades - Line Items* service. In the context of LTI®, these grade lines are called *line items*. LTIAAS gives you access to this service through the `/api/lineitems` API endpoint.\n\nPlease check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and its [Retrieving grade lines section](/guides/api/manipulating-grade-lines#retrieving-grade-lines-for-an-lti-context) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "1g3k4dlk49fk"
            },
            "in": "query",
            "name": "resourceLinkId",
            "description": "Filters line items by the resource link ID attached to the current launch context"
          },
          {
            "schema": {
              "type": "string",
              "example": "a-9334df-33"
            },
            "in": "query",
            "name": "resourceId",
            "description": "Filters line items by resourceId"
          },
          {
            "schema": {
              "type": "string",
              "example": "grade"
            },
            "in": "query",
            "name": "tag",
            "description": "Filters line items by tag"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 10
            },
            "in": "query",
            "name": "limit",
            "description": "Limits the number of line items returned. the platform MAY further reduce the number of items returned at its own discretion."
          },
          {
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "in": "query",
            "name": "url",
            "description": "Retrieves line items from a specific URL.     - *When present, the `url` parameter causes every other parameter to be ignored.*      - The `url` parameter should be URL encoded.     - In cases where not all line items are retrieved when the line item limit is reached, the returned object will contain a `next` field holding an URL that can be used to retrieve the remaining line items through the `url` parameter. "
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "next": "https://lms.example.com/course/1/lineitems?pages=2",
                      "first": "https://lms.example.com/course/1/lineitems?pages=1",
                      "last": "https://lms.example.com/course/1/lineitems?pages=3",
                      "lineItems": [
                        {
                          "id": "https://lms.example.com/course/1/lineitems/1",
                          "scoreMaximum": 100,
                          "label": "Chapter 5 Test",
                          "resourceId": "a-9334df-33",
                          "tag": "grade",
                          "resourceLinkId": "1g3k4dlk49fk",
                          "endDateTime": "2018-04-06T22:05:03Z"
                        }
                      ]
                    }
                  },
                  "properties": {
                    "lineItems": {
                      "type": "array",
                      "description": "An array of line items.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "https://lms.example.com/course/1/lineitems/1",
                            "description": "URL uniquely identifying the result record."
                          },
                          "label": {
                            "type": "string",
                            "example": "Activity",
                            "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label.\n\n"
                          },
                          "scoreMaximum": {
                            "type": "number",
                            "example": 100,
                            "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0.",
                            "exclusiveMinimum": 0
                          },
                          "resourceLinkId": {
                            "type": "string",
                            "example": "1g3k4dlk49fk",
                            "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                          },
                          "resourceId": {
                            "type": "string",
                            "example": "a-9334df-33",
                            "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                          },
                          "tag": {
                            "type": "string",
                            "example": "grade",
                            "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                          },
                          "startDateTime": {
                            "type": "string",
                            "format": "date-time",
                            "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submission."
                          },
                          "endDateTime": {
                            "type": "string",
                            "example": "2018-04-06T22:05:03Z",
                            "format": "date-time",
                            "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                          },
                          "gradesReleased": {
                            "type": "boolean",
                            "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "scoreMaximum"
                        ]
                      }
                    },
                    "next": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems?pages=2",
                      "format": "uri",
                      "description": " A URL pointing to the next page of line items."
                    },
                    "first": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems?pages=1",
                      "format": "uri",
                      "description": "A URL pointing to the first page of line items."
                    },
                    "last": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems?pages=3",
                      "format": "uri",
                      "description": "A URL pointing to the last page of line items."
                    },
                    "prev": {
                      "type": "string",
                      "format": "uri",
                      "description": "A URL pointing to the previous page of line items."
                    }
                  },
                  "required": [
                    "lineItems"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = 'https://your.ltiaas.com/api/lineitems';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \nurl = \"https://your.ltiaas.com/api/lineitems\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \n\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/lineitems\");\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\")\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/lineitems' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ]
      },
      "post": {
        "summary": "Create Line Items",
        "operationId": "post-api-lineitems",
        "tags": [
          "Line Items"
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "id": "https://lms.example.com/course/1/lineitems/1",
                      "scoreMaximum": 100,
                      "label": "Chapter 5 Test",
                      "resourceId": "quiz-231",
                      "tag": "grade",
                      "resourceLinkId": "1234",
                      "startDateTime": "2018-03-06T20:05:02Z",
                      "endDateTime": "2018-04-06T22:05:03Z"
                    }
                  },
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1",
                      "description": "URL uniquely identifying the result record."
                    },
                    "label": {
                      "type": "string",
                      "example": "Activity",
                      "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label.\n\n"
                    },
                    "scoreMaximum": {
                      "type": "number",
                      "example": 95,
                      "exclusiveMinimum": 0,
                      "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0."
                    },
                    "resourceLinkId": {
                      "type": "string",
                      "example": "1g3k4dlk49fk",
                      "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                    },
                    "resourceId": {
                      "type": "string",
                      "example": "quiz-231",
                      "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                    },
                    "tag": {
                      "type": "string",
                      "example": "grade",
                      "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                    },
                    "startDateTime": {
                      "type": "string",
                      "example": "2022-03-06T20:05:02Z",
                      "format": "date-time",
                      "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submissions."
                    },
                    "endDateTime": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-04-06T22:05:03Z",
                      "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                    },
                    "gradesReleased": {
                      "type": "boolean",
                      "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "scoreMaximum"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "example": "Activity",
                    "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label.\n\n"
                  },
                  "scoreMaximum": {
                    "type": "number",
                    "example": 95,
                    "exclusiveMinimum": 0,
                    "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0."
                  },
                  "resourceLinkId": {
                    "type": "string",
                    "example": "1g3k4dlk49fk",
                    "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                  },
                  "resourceId": {
                    "type": "string",
                    "example": "quiz-231",
                    "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                  },
                  "tag": {
                    "type": "string",
                    "example": "grade",
                    "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                  },
                  "startDateTime": {
                    "type": "string",
                    "example": "2022-03-06T20:05:02Z",
                    "format": "date-time",
                    "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submissions."
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-04-06T22:05:03Z",
                    "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                  },
                  "gradesReleased": {
                    "type": "boolean",
                    "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                  }
                },
                "required": [
                  "label",
                  "scoreMaximum"
                ]
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \nconst data = {\\ \n  label: \"Grade line\",\\ \n  scoreMaximum: 95,\\ \n  resourceId: \"quiz-231\",\\ \n  tag: \"grade\",\\ \n  resourceLinkId: \"42\",\\ \n  startDateTime: \"2022-03-06T20:05:02Z\",\\ \n  endDateTime: \"2022-04-06T22:05:03Z\",\\ \n  gradesReleased: true\\ \n};\\ \nconst url = 'https://your.ltiaas.com/api/lineitems';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \ndata = {\\ \n    \"label\": \"Grade line\",\\ \n    \"scoreMaximum\": 95,\\ \n    \"resourceId\": \"quiz-231\",\\ \n    \"tag\": \"grade\",\\ \n    \"resourceLinkId\": \"42\",\\ \n    \"startDateTime\": \"2022-03-06T20:05:02Z\",\\ \n    \"endDateTime\": \"2022-04-06T22:05:03Z\",\\ \n    \"gradesReleased\": True\\ \n}\\ \nurl = \"https://your.ltiaas.com/api/lineitems/\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.post(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"label\": \"Grade line\",\\ \n  \"scoreMaximum\": 95,\\ \n  \"resourceId\": \"quiz-231\",\\ \n  \"tag\": \"grade\",\\ \n  \"resourceLinkId\": \"42\",\\ \n  \"startDateTime\": \"2022-03-06T20:05:02Z\",\\ \n  \"endDateTime\": \"2022-04-06T22:05:03Z\",\\ \n  \"gradesReleased\": true\\ \n};\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \nrequest.body = JSON.dump({\\ \n    \"label\": \"Grade line\",\\ \n    \"scoreMaximum\": 95,\\ \n    \"resourceId\": \"quiz-231\",\\ \n    \"tag\": \"grade\",\\ \n    \"resourceLinkId\": \"42\",\\ \n    \"startDateTime\": \"2022-03-06T20:05:02Z\",\\ \n    \"endDateTime\": \"2022-04-06T22:05:03Z\",\\ \n    \"gradesReleased\": true\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/lineitems\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \n\\ \nvar body = @\"{\\ \n  'label': 'Grade line',\\ \n  'scoreMaximum': 95,\\ \n  'resourceId': 'quiz-231',\\ \n  'tag': 'grade',\\ \n  'resourceLinkId': '42',\\ \n  'startDateTime': '2022-03-06T20:05:02Z',\\ \n  'endDateTime': '2022-04-06T22:05:03Z',\\ \n  'gradesReleased': true\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"label\\\": \\\"Grade line\\\",\\ \n  \\\"scoreMaximum\\\": 95,\\ \n  \\\"resourceId\\\": \\\"quiz-231\\\",\\ \n  \\\"tag\\\": \\\"grade\\\",\\ \n  \\\"resourceLinkId\\\": \\\"42\\\",\\ \n  \\\"startDateTime\\\": \\\"2022-03-06T20:05:02Z\\\",\\ \n  \\\"endDateTime\\\": \\\"2022-04-06T22:05:03Z\\\",\\ \n  \\\"gradesReleased\\\": true\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/lineitems' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>' \\\\ \n-H 'Accept: application/json' \\\\ \n--data-raw '{\\ \n  \"label\": \"Grade line\",\\ \n  \"scoreMaximum\": 95,\\ \n  \"resourceId\": \"quiz-231\",\\ \n  \"tag\": \"grade\",\\ \n  \"resourceLinkId\": \"42\",\\ \n  \"startDateTime\": \"2022-03-06T20:05:02Z\",\\ \n  \"endDateTime\": \"2022-04-06T22:05:03Z\",\\ \n  \"gradesReleased\": true\\ \n}'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ],
        "description": "The LTI® protocol allows you to create grade lines in the LMS grade book through the *Assignment and Grades - Line Items* service. In the context of LTI®, these grade lines are called *line items*. LTIAAS gives you access to this service through the `/api/lineitems` API endpoint.\n\nPlease check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and its [Creating grade lines section](/guides/api/manipulating-grade-lines#creating-a-grade-line) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>"
      }
    },
    "/api/lineitems/{lineItemID}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uri",
            "example": "https://lms.example.com/course/1/lineitems/1"
          },
          "name": "lineItemID",
          "in": "path",
          "description": "The URL encoded line item  ID.",
          "required": true
        }
      ],
      "get": {
        "summary": "Get Line Item by ID",
        "tags": [
          "Line Items"
        ],
        "operationId": "get-lineitem",
        "description": "The LTI® protocol allows you to retrieve a specific grade line from the LMS grade book through the *Assignment and Grades - Line Items* service. In the context of LTI®, these grade lines are called *line items*. LTIAAS gives you access to this service through the `/api/lineitems` API endpoint.\n\nPlease check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and its [Retrieving a grade line by its ID section](/guides/api/manipulating-grade-lines#retrieving-a-grade-line-by-its-id) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "id": "100",
                      "label": "Activity",
                      "scoreMaximum": 0,
                      "resourceLinkId": "1g3k4dlk49fk",
                      "resourceId": "quiz-231",
                      "tag": "grade",
                      "startDateTime": "2018-03-06T20:05:02Z",
                      "endDateTime": "2018-04-06T22:05:03Z"
                    }
                  },
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1",
                      "description": "URL uniquely identifying the result record."
                    },
                    "label": {
                      "type": "string",
                      "example": "Activity",
                      "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label.\n\n"
                    },
                    "scoreMaximum": {
                      "type": "number",
                      "example": 95,
                      "exclusiveMinimum": 0,
                      "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0."
                    },
                    "resourceLinkId": {
                      "type": "string",
                      "example": "1g3k4dlk49fk",
                      "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                    },
                    "resourceId": {
                      "type": "string",
                      "example": "quiz-231",
                      "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                    },
                    "tag": {
                      "type": "string",
                      "example": "grade",
                      "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                    },
                    "startDateTime": {
                      "type": "string",
                      "example": "2022-03-06T20:05:02Z",
                      "format": "date-time",
                      "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submissions."
                    },
                    "endDateTime": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2022-04-06T22:05:03Z",
                      "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                    },
                    "gradesReleased": {
                      "type": "boolean",
                      "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "scoreMaximum"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst encoded_id = encodeURIComponent(line_item_id);\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${encoded_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nencoded_id = urllib.parse.quote(lineitem_id)\\ \nurl = f\"https://your.ltiaas.com/api/lineitems/{encoded_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/' + $encoded_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nencoded_id = CGI.escape(line_item_id)\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/#{encoded_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar encoded_id = System.Web.HttpUtility.UrlEncode(line_item_id);\\ \nvar request = new RestRequest($\"api/lineitems/{encoded_id}\");\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems/\" + encoded_id)\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/lineitems/:lineitemid' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ]
      },
      "put": {
        "summary": "Update Line Item by ID",
        "operationId": "put-api-lineitems-lineitemid",
        "tags": [
          "Line Items"
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "id": "https://lms.example.com/course/1/lineitems/1",
                      "scoreMaximum": 100,
                      "label": "Chapter 5 Updated",
                      "resourceId": "quiz-231",
                      "tag": "grade",
                      "startDateTime": "2018-03-06T20:05:02Z",
                      "endDateTime": "2018-04-06T22:05:03Z"
                    }
                  },
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1",
                      "format": "uri",
                      "description": "URL uniquely identifying the result record."
                    },
                    "label": {
                      "type": "string",
                      "example": "Activity",
                      "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label."
                    },
                    "scoreMaximum": {
                      "type": "number",
                      "example": 100,
                      "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0.",
                      "exclusiveMinimum": 0
                    },
                    "resourceLinkId": {
                      "type": "string",
                      "example": "1g3k4dlk49fk",
                      "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                    },
                    "resourceId": {
                      "type": "string",
                      "example": "quiz-231",
                      "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value.\n\n"
                    },
                    "tag": {
                      "type": "string",
                      "example": "grade",
                      "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                    },
                    "startDateTime": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2018-03-06T20:05:02Z",
                      "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submission."
                    },
                    "endDateTime": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2018-04-06T22:05:03Z",
                      "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                    },
                    "gradesReleased": {
                      "type": "boolean",
                      "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "scoreMaximum"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "description": "The LTI® protocol allows you to update(replace) a specific grade line in the LMS grade book through the *Assignment and Grades - Line Items* service. In the context of LTI®, these grade lines are called *line items*. LTIAAS gives you access to this service through the `/api/lineitems` API endpoint.\n\nPlease check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and its [Updating a grade line by its ID section](/guides/api/manipulating-grade-lines##updating-a-grade-line-by-its-id) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "x-examples": {
                  "Example 1": {
                    "scoreMaximum": 95,
                    "label": "Chapter 5 Updated",
                    "resourceId": "quiz-231",
                    "tag": "grade",
                    "startDateTime": "2018-03-06T20:05:02Z",
                    "endDateTime": "2018-04-06T22:05:03Z"
                  }
                },
                "properties": {
                  "label": {
                    "type": "string",
                    "example": "Activity",
                    "description": "The label is a short string with a human readable text for the line item. It MUST be specified and not blank when posted by the tool. A platform must always include the label.\n\n"
                  },
                  "scoreMaximum": {
                    "type": "number",
                    "example": 95,
                    "exclusiveMinimum": 0,
                    "description": "The maximum score for this line item. Maximum score MUST be a numeric non-null value, strictly greater than 0."
                  },
                  "resourceLinkId": {
                    "type": "string",
                    "example": "1g3k4dlk49fk",
                    "description": "A line item MAY be attached to a resource link by including a 'resourceLinkId' in the payload. The resource link MUST exist in the context where the line item is created, and MUST be a link owned by the same tool. If not, the line item creation MUST fail with a response code of Not Found 404.\n\nThe platform MAY remove the line items attached to a resource link if the resource link itself is removed."
                  },
                  "resourceId": {
                    "type": "string",
                    "example": "quiz-231",
                    "description": "A tool MAY identify to which of its resources the line item is attached to by including a non blank value for resourceId in the payload. This value is a string. For example, resourceId can be 'quiz-231' or any other resource identifier uniquely identifying a resource in a given context.\n\nMultiple line items can share the same resourceId within a given context. resourceId must be preserved when a context is copied if the line items are included in the copy.\n\nIf no resourceId is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                  },
                  "tag": {
                    "type": "string",
                    "example": "grade",
                    "description": "A tool MAY further qualify a line item by setting a value to tag. The attribute is a string. For example, one assignment resource may have 2 line items, one with tag as 'grade' and the other tagged as 'originality'.\n\nMultiple line items can share the same tag within a given context. tag must be preserved when a context is copied if the line items are included in the copy.\n\nIf no tag is defined for a lineitem, the platform may omit this attribute, or include it with a blank or null value."
                  },
                  "startDateTime": {
                    "type": "string",
                    "example": "2022-03-06T20:05:02Z",
                    "format": "date-time",
                    "description": "A tool MAY specify the initial start time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item can start receiving submissions."
                  },
                  "endDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2022-04-06T22:05:03Z",
                    "description": "A tool MAY specify the initial end time submissions for this line item can be made by learners. The initial value may subsequently be changed within the platform.\n\nISO 8601 Date and time when the line item stops receiving submissions."
                  },
                  "gradesReleased": {
                    "type": "boolean",
                    "description": "The tool specifies this optional property when it wishes the grades to be released. It is up to the LMS to decide how to handle this and every LMSes behavior may be different."
                  }
                },
                "required": [
                  "label",
                  "scoreMaximum"
                ]
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  label: \"Chapter 5 Updated\",\\ \n  scoreMaximum: 95\\ \n};\\ \nconst encoded_id = encodeURIComponent(line_item_id);\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${encoded_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.put(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nencoded_id = urllib.parse.quote(lineitem_id)\\ \ndata = {\\ \n    \"label\": \"Chapter 5 Updated\",\\ \n    \"scoreMaximum\": 95\\ \n}\\ \nurl = f\"https://your.ltiaas.com/api/lineitems/{encoded_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.put(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"label\": \"Chapter 5 Updated\",\\ \n  \"scoreMaximum\": 95\\ \n};\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/' + $encoded_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"PUT\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nencoded_id = CGI.escape(line_item_id)\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/#{encoded_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Put.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \nrequest.body = JSON.dump({\\ \n  \"label\": \"Chapter 5 Updated\",\\ \n  \"scoreMaximum\": 95\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar encoded_id = System.Web.HttpUtility.UrlEncode(line_item_id);\\ \nvar request = new RestRequest($\"api/lineitems/{encoded_id}\", Method.Put);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'label': 'Chapter 5 Updated',\\ \n  'scoreMaximum': 95\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"label\\\": \\\"Chapter 5 Updated\\\",\\ \n  \\\"scoreMaximum\\\": 95\\ \n}\");\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems/\" + encoded_id)\\ \n  .put(body)\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X PUT 'https://your.ltiaas.com/api/lineitems/:lineitemid' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>' \\\\ \n-H 'Accept: application/json' \\\\ \n--data-raw '{\\ \n  \"label\": \"Chapter 5 Updated\",\\ \n  \"scoreMaximum\": 95\\ \n}'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ],
        "parameters": []
      },
      "delete": {
        "summary": "Delete Line Item by ID",
        "tags": [
          "Line Items"
        ],
        "operationId": "delete-api-lineitems-lineitemid",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "parameters": [],
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst encoded_id = encodeURIComponent(line_item_id);\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${encoded_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  await axios.delete(url, config);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nencoded_id = urllib.parse.quote(lineitem_id)\\ \nurl = f\"https://your.ltiaas.com/api/lineitems/{encoded_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nrequests.delete(url, headers=headers)"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/' + $encoded_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\\ \n));\\ \n\\ \ncurl_exec($curl);\\ \ncurl_close($curl);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nencoded_id = CGI.escape(line_item_id)\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/#{encoded_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Delete.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nhttps.request(request)"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar encoded_id = System.Web.HttpUtility.UrlEncode(line_item_id);\\ \nvar request = new RestRequest($\"api/lineitems/{encoded_id}\", Method.Delete);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"text/plain\");\\ \nRequestBody body = RequestBody.create(mediaType, \"\");\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems/\" + encoded_id)\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .delete()\\ \n  .build();\\ \n\\ \ntry {\\ \n    client.newCall(request).execute();\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X DELETE 'https://your.ltiaas.com/api/lineitems/:lineitemid' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ],
        "description": "The LTI® protocol allows you to delete a specific grade line from the LMS grade book through the *Assignment and Grades - Line Items* service. In the context of LTI®, these grade lines are called *line items*. LTIAAS gives you access to this service through the `/api/lineitems` API endpoint.\n\nPlease check our [Manipulating grade lines guide](/guides/api/manipulating-grade-lines) and its [Deleting a grade line by its ID section](/guides/api/manipulating-grade-lines#deleting-a-grade-line-by-its-id) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>"
      }
    },
    "/api/lineitems/{lineItemID}/scores": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uri",
            "example": "https://lms.example.com/course/1/lineitems/1"
          },
          "name": "lineItemID",
          "in": "path",
          "required": true,
          "description": "The URL encoded line item  ID."
        }
      ],
      "get": {
        "summary": "Get Scores from Line Item",
        "tags": [
          "Scores"
        ],
        "operationId": "get-lineitem-scores",
        "description": "The LTI® protocol allows you to retrieves scores from the LMS grade book through the *Assignment and Grades - Results* service. LTIAAS gives you access to this service through the `/api/lineitems/:lineItemID/scores` API endpoint.\n\nPlease check our [Manipulating grades guide](/guides/api/manipulating-grades) and its [Retrieving grades section](/guides/api/manipulating-grades#retrieving-grades) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "10023031"
            },
            "in": "query",
            "name": "userId",
            "description": "Used to to filter the results to a single user. The results MUST contain at most 1 result. An empty array MAY be returned if the user does not have any result recorded."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 10
            },
            "in": "query",
            "name": "limit",
            "description": "Used to to restrict the number of results returned; the platform MAY further reduce the number of results returned at its own discretion."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "url",
            "description": "Retrieves scores from a specific URL"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "next": "https://lms.example.com/course/1/lineitems?pages=2",
                      "first": "https://lms.example.com/course/1/lineitems?pages=1",
                      "last": "https://lms.example.com/course/1/lineitems?pages=3",
                      "lineItems": [
                        {
                          "id": "https://lms.example.com/course/1/lineitems/1",
                          "scoreMaximum": 100,
                          "label": "Chapter 5 Test",
                          "resourceId": "a-9334df-33",
                          "tag": "grade",
                          "resourceLinkId": "1g3k4dlk49fk",
                          "endDateTime": "2018-04-06T22:05:03Z"
                        }
                      ]
                    }
                  },
                  "properties": {
                    "scores": {
                      "type": "array",
                      "description": "The platform must return a result record for each user that has a non empty 'resultScore' for the queried upon line item. The platform MAY skip empty results.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "https://lms.example.com/course/1/lineitems/1/scores/2",
                            "format": "uri",
                            "description": "URL uniquely identifying the result record."
                          },
                          "userId": {
                            "type": "string",
                            "example": "2",
                            "description": "The userId contains the LTI® user ID identifying the recipient of the Result (usually a learner). The userId MUST be present."
                          },
                          "scoreOf": {
                            "type": "string",
                            "example": "https://lms.example.com/course/1/lineitems/1",
                            "format": "uri",
                            "description": "URL identifying the Line Item to which this result belongs. Must be the same as the line item id and the value of the lineitem claim when included in the LTI® message."
                          },
                          "timestamp": {
                            "type": "string",
                            "example": "2020-06-02T10:51:08-03:00",
                            "format": "date-time",
                            "description": "The timestamp MUST be present and indicate when the score was changed; it is intended to be used by the platform as a way to guard against out of order score updates. Score timestamp represents the server time when the Score state was modified."
                          },
                          "resultScore": {
                            "type": "number",
                            "example": 95,
                            "description": "The current score for this user. The value must be a numeric value. If no value exists, this attribute may be omitted, or have an explicit null value."
                          },
                          "resultMaximum": {
                            "type": "number",
                            "example": 100,
                            "exclusiveMinimum": 0,
                            "description": "The 'resultMaximum' value MUST be a positive number (with 0 considered a negative number); if no value is specified, then a default maximum value of 1 must be used."
                          },
                          "comment": {
                            "type": "string",
                            "description": "The current value for the comment. The value must be a string. If no value exists, this attribute may be omitted, blank or have an explicit null value."
                          }
                        },
                        "required": [
                          "id",
                          "userId",
                          "scoreOf",
                          "timestamp"
                        ]
                      }
                    },
                    "next": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1/scores?page=3",
                      "format": "uri",
                      "description": " A URL pointing to the next page of line items."
                    },
                    "prev": {
                      "type": "string",
                      "format": "uri",
                      "description": "A URL pointing to the previous page of line items.",
                      "example": "https://lms.example.com/course/1/lineitems/1/scores?page=1"
                    },
                    "first": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1/scores?page=1",
                      "format": "uri",
                      "description": " A URL pointing to the first page of line items."
                    },
                    "last": {
                      "type": "string",
                      "example": "https://lms.example.com/course/1/lineitems/1/scores?page=3",
                      "format": "uri",
                      "description": " A URL pointing to the last page of line items."
                    }
                  },
                  "required": [
                    "scores"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst encoded_id = encodeURIComponent(line_item_id);\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${encoded_id}/scores`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nencoded_id = urllib.parse.quote(lineitem_id)\\ \nurl = f\"https://your.ltiaas.com/api/lineitems/{encoded_id}/scores\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/' + $encoded_id + '/scores',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nencoded_id = CGI.escape(line_item_id)\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/#{encoded_id}/scores\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar encoded_id = System.Web.HttpUtility.UrlEncode(line_item_id);\\ \nvar request = new RestRequest($\"api/lineitems/{encoded_id}/scores\");\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems/\" + encoded_id + \"/scores\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/lineitems/:lineitemid/scores' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ]
      },
      "post": {
        "summary": "Submit Scores to Line Item",
        "operationId": "post-lineitem-scores",
        "tags": [
          "Scores"
        ],
        "description": "The LTI® protocol allows you to submit scores to the LMS grade book through the *Assignment and Grades - Scores* service. LTIAAS gives you access to this service through the `/api/lineitems/:lineItemID/scores` API endpoint.\n\nPlease check our [Manipulating grades guide](/guides/api/manipulating-grades) and its [Submitting grades](/guides/api/manipulating-grades#submitting-grades) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "example": "2",
                    "description": "The LTI® user ID identifying the recipient of the Score (usually a learner)."
                  },
                  "activityProgress": {
                    "type": "string",
                    "example": "Completed",
                    "enum": [
                      "Initiated",
                      "Started",
                      "InProgress",
                      "Submitted",
                      "Completed"
                    ],
                    "description": "Used to indicate to the tool platform the status of the user towards the activity's completion."
                  },
                  "gradingProgress": {
                    "type": "string",
                    "example": "FullyGraded",
                    "enum": [
                      "FullyGraded",
                      "Pending",
                      "PendingManual",
                      "Failed",
                      "NotReady"
                    ],
                    "description": "Used to indicate to the platform the status of the grading process, including allowing to inform when human intervention is needed."
                  },
                  "scoreGiven": {
                    "type": "number",
                    "example": 95,
                    "description": "All scoreGiven values MUST be positive number (including 0). scoreMaximum represents the denominator and MUST be present when scoreGiven is present. When scoreGiven is not present or null, this indicates there is presently no score for that user, and the platform should clear any previous score value it may have previously received from the tool and stored for that user and line item.\n\nThe platform MUST support scoreGiven higher than scoreMaximum. For example, if the tool passes normalized score, ranging from 0 to 1, the scoreMaximum would be 1. scoreGiven: 1.1 would be a valid score.\n\nA scoreGiven MAY be used to pass actual points value, in which case a value for scoreMaximum would be the maximum points possible for that student. For example, the tool MAY pass scoreGiven: 1, scoreMaximum: 3 instead of scoreGiven: 0.33333, scoreMaximum: 1.\n\nUsually a platform will just re-scale the value to the line item's scoreMaximum. For example, if the line item maximum is 6 in the above example, then it would show 2 points as the given score; accordingly, the result would contain resultScore of 2 and resultMaximum of 6."
                  },
                  "scoreMaximum": {
                    "type": "number",
                    "example": 100,
                    "description": "The 'scoreMaximum' value MUST be a positive number (not including 0). This field is required if the 'scoreGiven' value is present."
                  },
                  "comment": {
                    "type": "string",
                    "example": "This is exceptional work.",
                    "description": "comment is intended to be seen by both the student and the instructors. This specification does not support an history of comments; the platform MUST update its comment with every score update. If a score update does not contain a comment, a blank or null, then the comment value MUST be cleared in the platform if the previously recorded comment was also a comment sent from the tool."
                  }
                },
                "required": [
                  "userId",
                  "activityProgress",
                  "gradingProgress"
                ]
              }
            }
          },
          "description": ""
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  userId: \"5323497\",\\ \n  activityProgress: \"Completed\",\\ \n  gradingProgress: \"FullyGraded\",\\ \n  scoreGiven: 95,\\ \n  comment: \"This is exceptional work.\"\\ \n};\\ \nconst encoded_id = encodeURIComponent(line_item_id);\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${encoded_id}/scores`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  await axios.post(url, data, config);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nencoded_id = urllib.parse.quote(lineitem_id)\\ \ndata = {\\ \n  \"userId\": \"5323497\",\\ \n  \"activityProgress\": \"Completed\",\\ \n  \"gradingProgress\": \"FullyGraded\",\\ \n  \"scoreGiven\": 95,\\ \n  \"comment\": \"This is exceptional work.\"\\ \n}\\ \nurl = f\"https://your.ltiaas.com/api/lineitems/{encoded_id}/scores\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nrequests.post(url, data=data, headers=headers)"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"userId\": \"5323497\",\\ \n  \"activityProgress\": \"Completed\",\\ \n  \"gradingProgress\": \"FullyGraded\",\\ \n  \"scoreGiven\": 95,\\ \n  \"comment\": \"This is exceptional work.\"\\ \n};\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/lineitems/' + $encoded_id + \"/scores\",\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \ncurl_exec($curl);\\ \ncurl_close($curl);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nencoded_id = CGI.escape(line_item_id)\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/#{encoded_id}/scores\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post:new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \nrequest.body = JSON.dump({\\ \n    \"userId\": \"5323497\",\\ \n    \"activityProgress\": \"Completed\",\\ \n    \"gradingProgress\": \"FullyGraded\",\\ \n    \"scoreGiven\": 95,\\ \n    \"comment\": \"This is exceptional work.\"\\ \n})\\ \n\\ \nhttps.request(request)"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar encoded_id = System.Web.HttpUtility.UrlEncode(line_item_id);\\ \nvar request = new RestRequest($\"api/lineitems/{encoded_id}/scores\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'userId': '5323497',\\ \n  'activityProgress': 'Completed',\\ \n  'gradingProgress': 'FullyGraded',\\ \n  'scoreGiven': 95,\\ \n  'comment': 'This is exceptional work.'\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"userId\\\": \\\"5323497\\\",\\ \n  \\\"activityProgress\\\": \\\"Completed\\\",\\ \n  \\\"gradingProgress\\\": \\\"FullyGraded\\\",\\ \n  \\\"scoreGiven\\\": 95,\\ \n  \\\"comment\\\": \\\"This is exceptional work.\\\"\\ \n}\");\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/lineitems/\" + encoded_id + \"/scores\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    client.newCall(request).execute();\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/lineitems/:lineitemid/scores' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>' \\\\ \n-H 'Accept: application/json' \\\\ \n--data-raw '{\\ \n  \"userId\": \"5323497\",\\ \n  \"activityProgress\": \"Completed\",\\ \n  \"gradingProgress\": \"FullyGraded\",\\ \n  \"scoreGiven\": 95,\\ \n  \"comment\": \"This is exceptional work.\"\\ \n}'"
          }
        ],
        "security": [
          {
            "LTIK-AUTH-V2": []
          },
          {
            "SERVICE-AUTH-V1": []
          }
        ]
      }
    },
    "/api/deeplinking/form": {
      "parameters": [],
      "post": {
        "summary": "Build A Deep-Linking Form",
        "operationId": "post-api-deeplinking-form",
        "tags": [
          "Deep Linking"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "form": {
                      "type": "string",
                      "example": "<form id=\"ltijs_submit\" style=\"display: none;\" action=\"https://ltiadvantagevalidator.imsglobal.org/ltitool/deeplinkresponse.html\" method=\"POST\"><input type=\"hidden\" name=\"JWT\" value=\"eyJhbGciOiJIUzIVCJ9.eyJzdWIbmFtZSI6IG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKV_adQssw5c\" /></form><script>document.getElementById(\"ltijs_submit\").submit()</script>",
                      "description": "Self-submitting form that must be appended to the HTML body."
                    }
                  },
                  "required": [
                    "form"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentItems": {
                    "type": "array",
                    "description": "An array of content items as defined in the LTI® 1.3 specification: https://www.imsglobal.org/spec/lti-dl/v2p0/#content-item-types",
                    "items": {
                      "type": "object",
                      "minProperties": 1,
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "link",
                            "ltiResourceLink",
                            "file",
                            "html",
                            "image"
                          ],
                          "description": "The type of the content item"
                        },
                        "url": {
                          "type": "string",
                          "description": "A URL pointing to your LTIAAS instance. In order to pass parameters to your Tool and identify the selected resource you can add query parameters to the URL.\n\n> Example:\n> - URL passed inside the Deep Linking content item: `https://your.ltiaas.com?resource=1234`\n> - URL the user will be redirected to after a successful launch from the created resource: `https://yourtool.com?resource=1234`"
                        },
                        "title": {
                          "type": "string",
                          "description": "plain text to use as the title or heading for content."
                        },
                        "text": {
                          "type": "string",
                          "description": "plain text description of the content item intended to be displayed to all users who can access the item."
                        },
                        "icon": {
                          "type": "object",
                          "description": "Fully qualified URL, height, and width of an icon image to be placed with the file. A platform may not support the display of icons, but where it does, it may choose to use a local copy of the icon rather than linking to the URL provided (which would also allow it to resize the image to suit its needs).",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "description": "fully qualified URL to the image file."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the image."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the image."
                            }
                          }
                        },
                        "thumbnail": {
                          "type": "object",
                          "description": "Fully qualified URL, height, and width of a thumbnail image to be made a hyperlink. This allows the hyperlink to be opened within the platform from text or an image, or from both.",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "description": "fully qualified URL to the image file."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the image."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the image."
                            }
                          }
                        },
                        "embed": {
                          "type": "object",
                          "description": "The embed property has a single required property html that contains the HTML fragment to embed the resource directly inside HTML. It is commonly used as a way to embed a resource in an HTML editor. Platform must make sure to properly sanitize the HTML prior to inclusion.",
                          "properties": {
                            "html": {
                              "type": "string",
                              "description": "the HTML fragment to embed the resource directly inside HTML."
                            }
                          }
                        },
                        "window": {
                          "type": "object",
                          "description": "The window property indicates how to open the resource in a new window/tab.",
                          "properties": {
                            "targetName": {
                              "type": "string",
                              "description": "String identifying the name of the window to open; this allows for a single window to be shared as the target of multiple links, preventing a proliferation of new windows/tabs."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the new window."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the new window."
                            },
                            "windowFeatures": {
                              "type": "string",
                              "description": "Comma-separated list of window features as per the [window.open() definition](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)."
                            }
                          }
                        },
                        "iframe": {
                          "type": "object",
                          "description": "The iframe property indicates the resource can be embedded using an iframe. The child parameters ndicates the dimension and the src URL for embedding",
                          "properties": {
                            "src": {
                              "type": "string",
                              "description": "required parameter indicating the URL to use as the src of the iframe. The src value may differ from the link url."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixel of the new iframe."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixel of the new iframe."
                            }
                          }
                        },
                        "custom": {
                          "type": "object",
                          "description": "\tA map of key/value custom parameters. Those parameters MUST be included in the LtiResourceLinkRequest payload. Value may include substitution parameters as defined in the LTI® Core Specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/). Map values must be strings. Note that \"empty-string\" is a valid value (\"\"); however, null is not a valid value."
                        },
                        "lineItem": {
                          "type": "object",
                          "description": "A lineItem object that indicates this activity is expected to receive scores; the platform may automatically create a corresponding line item when the resource link is created, using the maximum score as the default maximum points. The resource_id, tag and scoreMaximum are defined in the [LTI®-AGS-20](https://www.imsglobal.org/spec/lti-ags/v2p0/). A line item created as a result of a Deep Linking interaction must be exposed in a subsequent line item service call, with the resourceLinkId of the associated resource link, as well as the resourceId and tag if present in the line item definition.",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "label for the line item. If not present, the title of the content item must be used."
                            },
                            "scoreMaximum": {
                              "type": "number",
                              "description": "Positive decimal value indicating the maximum score possible for this activity."
                            },
                            "resourceId": {
                              "type": "string",
                              "description": "Tool provided ID for the resource."
                            },
                            "tag": {
                              "type": "string",
                              "description": "Additional information about the line item; may be used by the tool to identify line items attached to the same resource or resource link (example: grade, originality, participation)."
                            },
                            "gradesReleased": {
                              "type": "boolean",
                              "description": "boolean to indicate if the platform should release the grades, e.g., to learners."
                            }
                          }
                        },
                        "available": {
                          "type": "object",
                          "description": "Indicates the initial start and end time this activity should be made available to learners. A platform may choose to make an item not accessible by hiding it, or by disabling the link, or some other method which prevents the link from being opened by a learner. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.available.startDateTime and ResourceLink.available.endDateTime substitution parameters defined in LTI® Core specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/) within custom parameters to get the actual values at launch time. Note there may be many factors controlling the availability of an item by the platform, and tools are not guaranteed to receive available start and end times in a launch, even if they set them when creating content.",
                          "properties": {
                            "startDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 date and time when the link becomes accessible [ISO8601](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            },
                            "endDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": " ISO 8601 date and time when the link stops being accessible [ISO8601](https://www.imsglobal.org/spec/lti-dl/v2p0/#bib-iso8601)."
                            }
                          }
                        },
                        "submission": {
                          "type": "object",
                          "description": "Indicates the initial start and end time submissions for this activity can be made by learners. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.submission.startDateTime and ResourceLink.submission.endDateTime substitution parameters defined in LTI® Core specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/) within custom parameters to get the actual values at launch time.",
                          "properties": {
                            "startDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 Date and time when the link can start receiving submissions [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            },
                            "endDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 Date and time when the link stops accepting submissions [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            }
                          }
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "\tISO 8601 Date and time [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874). The URL will be available until this time. No guarantees after that. (e.g. 2014-03-05T12:34:56Z)."
                        },
                        "html": {
                          "type": "string",
                          "description": "When type==\"html\". HTML fragment to be embedded. The platform is expected to sanitize it against cross-site scripting attacks."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Integer representing the width in pixels of the image."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Integer representing the height in pixels of the image."
                        }
                      },
                      "required": [
                        "type"
                      ]
                    }
                  },
                  "options": {
                    "type": "object",
                    "description": "An object containing one or more optioal fields to aid in error conditions",
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "Message displayed to the user if the deep linking process is successfully completed."
                      },
                      "log": {
                        "type": "string",
                        "description": "Log generated by the Platform if the deep linking process is successfully completed."
                      },
                      "errMessage": {
                        "type": "string",
                        "description": "Message displayed to the user if the deep linking process finishes with an error. Sending this will cause the LMS to reject the deep linking submission and display the error message."
                      },
                      "errLog": {
                        "type": "string",
                        "description": "Log generated by the Platform if the deep linking process finishes with an error. Sending this will cause the LMS to reject the deep linking submission and display the error message."
                      }
                    }
                  }
                },
                "required": [
                  "contentItems"
                ]
              },
              "examples": {
                "LtiResourceLink Content Item": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "ltiResourceLink",
                        "title": "A title",
                        "text": "This is a link to an activity that will be graded",
                        "url": "https://lti.example.com/launchMe",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        },
                        "lineItem": {
                          "scoreMaximum": 87,
                          "label": "Chapter 12 quiz",
                          "resourceId": "xyzpdq1234",
                          "tag": "originality",
                          "gradesReleased": true
                        },
                        "available": {
                          "startDateTime": "2018-02-06T20:05:02Z",
                          "endDateTime": "2018-03-07T20:05:02Z"
                        },
                        "submission": {
                          "endDateTime": "2018-03-06T20:05:02Z"
                        },
                        "custom": {
                          "quiz_id": "az-123",
                          "duedate": "$ResourceLink.submission.endDateTime"
                        },
                        "window": {
                          "targetName": "examplePublisherContent"
                        },
                        "iframe": {
                          "height": 890
                        }
                      }
                    ],
                    "options": {
                      "message": "Deep Linking successful!",
                      "log": "deep_linking_successful"
                    }
                  }
                },
                "HTML Content Item": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "html",
                        "html": "<h1>A Custom Title</h1>"
                      }
                    ],
                    "options": {
                      "message": "Deep Linking successful!",
                      "log": "deep_linking_successful"
                    }
                  }
                },
                "Multiple Content Items": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "link",
                        "title": "My Home Page",
                        "url": "https://something.example.com/page.html",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        }
                      },
                      {
                        "type": "html",
                        "html": "<h1>A Custom Title</h1>"
                      },
                      {
                        "type": "link",
                        "url": "https://www.youtube.com/watch?v=corV3-WsIro",
                        "embed": {
                          "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/corV3-WsIro\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>"
                        },
                        "window": {
                          "targetName": "youtube-corV3-WsIro",
                          "windowFeatures": "height=560,width=315,menubar=no"
                        },
                        "iframe": {
                          "width": 560,
                          "height": 315,
                          "src": "https://www.youtube.com/embed/corV3-WsIro"
                        }
                      },
                      {
                        "type": "image",
                        "url": "https://www.example.com/image.png",
                        "https://www.example.com/resourceMetadata": {
                          "license": "CCBY4.0"
                        }
                      },
                      {
                        "type": "ltiResourceLink",
                        "title": "A title",
                        "text": "This is a link to an activity that will be graded",
                        "url": "https://lti.example.com/launchMe",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        },
                        "lineItem": {
                          "scoreMaximum": 87,
                          "label": "Chapter 12 quiz",
                          "resourceId": "xyzpdq1234",
                          "tag": "originality",
                          "gradesReleased": true
                        },
                        "available": {
                          "startDateTime": "2018-02-06T20:05:02Z",
                          "endDateTime": "2018-03-07T20:05:02Z"
                        },
                        "submission": {
                          "endDateTime": "2018-03-06T20:05:02Z"
                        },
                        "custom": {
                          "quiz_id": "az-123",
                          "duedate": "$ResourceLink.submission.endDateTime"
                        },
                        "window": {
                          "targetName": "examplePublisherContent"
                        },
                        "iframe": {
                          "height": 890
                        }
                      },
                      {
                        "type": "file",
                        "title": "A file like a PDF that is my assignment submissions",
                        "url": "https://my.example.com/assignment1.pdf",
                        "mediaType": "application/pdf",
                        "expiresAt": "2018-03-06T20:05:02Z"
                      },
                      {
                        "type": "https://www.example.com/custom_type",
                        "data": "somedata"
                      }
                    ],
                    "options": {
                      "message": "Deep Linking successful!",
                      "log": "deep_linking_successful",
                      "errMessage": "Deep Linking error",
                      "errLog": "deep_linking_error"
                    }
                  }
                },
                "Custom Content Type": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "https://www.example.com/custom_type",
                        "data": "somedata"
                      }
                    ],
                    "options": {
                      "message": "Deep Linking successful!",
                      "log": "deep_linking_successful",
                      "errMessage": "Deep Linking error",
                      "errLog": "deep_linking_error"
                    }
                  }
                }
              }
            }
          },
          "description": ""
        },
        "parameters": [],
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  contentItems: [\\ \n    {\\ \n      type: \"link\",\\ \n      title: \"My Home Page\",\\ \n      url: \"https://something.example.com/page.html\",\\ \n      icon: {\\ \n        url: \"https://lti.example.com/image.jpg\",\\ \n        width: 100,\\ \n        height: 100\\ \n      },\\ \n      thumbnail: {\\ \n        url: \"https://lti.example.com/thumb.jpg\",\\ \n        width: 90,\\ \n        height: 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  options: {\\ \n    message: \"Deep Linking successful!\",\\ \n    log: \"deep_linking_successful\"\\ \n  }\\ \n};\\ \nconst url = 'https://your.ltiaas.com/api/deeplinking/form';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"contentItems\": [\\ \n        {\\ \n            \"type\": \"link\",\\ \n            \"title\": \"My Home Page\",\\ \n            \"url\": \"https://something.example.com/page.html\",\\ \n            \"icon\": {\\ \n                \"url\": \"https://lti.example.com/image.jpg\",\\ \n                \"width\": 100,\\ \n                \"height\": 100\\ \n            },\\ \n            \"thumbnail\": {\\ \n                \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n                \"width\": 90,\\ \n                \"height\": 90\\ \n            }\\ \n        }\\ \n    ],\\ \n    \"options\": {\\ \n        \"message\": \"Deep Linking successful!\",\\ \n        \"log\": \"deep_linking_successful\"\\ \n    }\\ \n}\\ \nurl = f\"https://your.ltiaas.com/api/deeplinking/form\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.post(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"contentItems\": [\\ \n    {\\ \n      \"type\": \"link\",\\ \n      \"title\": \"My Home Page\",\\ \n      \"url\": \"https://something.example.com/page.html\",\\ \n      \"icon\": {\\ \n        \"url\": \"https://lti.example.com/image.jpg\",\\ \n        \"width\": 100,\\ \n        \"height\": 100\\ \n      },\\ \n      \"thumbnail\": {\\ \n        \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n        \"width\": 90,\\ \n        \"height\": 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  \"options\": {\\ \n    \"message\": \"Deep Linking successful!\",\\ \n    \"log\": \"deep_linking_successful\"\\ \n  }\\ \n}\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/deeplinking/form',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/deeplinking/form\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \nrequest.body = JSON.dump({\\ \n    \"contentItems\": [\\ \n        {\\ \n            \"type\": \"link\",\\ \n            \"title\": \"My Home Page\",\\ \n            \"url\": \"https://something.example.com/page.html\",\\ \n            \"icon\": {\\ \n                \"url\": \"https://lti.example.com/image.jpg\",\\ \n                \"width\": 100,\\ \n                \"height\": 100\\ \n            },\\ \n            \"thumbnail\": {\\ \n                \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n                \"width\": 90,\\ \n                \"height\": 90\\ \n            }\\ \n        }\\ \n    ],\\ \n    \"options\": {\\ \n        \"message\": \"Deep Linking successful!\",\\ \n        \"log\": \"deep_linking_successful\"\\ \n    }\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/lineitems\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'contentItems': [\\ \n    {\\ \n      'type': 'link',\\ \n      'title': 'My Home Page',\\ \n      'url': 'https://something.example.com/page.html',\\ \n      'icon': {\\ \n        'url': 'https://lti.example.com/image.jpg',\\ \n        'width': 100,\\ \n        'height': 100\\ \n      },\\ \n      'thumbnail': {\\ \n        'url': 'https://lti.example.com/thumb.jpg',\\ \n        'width': 90,\\ \n        'height': 90\\ \n      },\\ \n    }\\ \n  ],\\ \n  'options': {\\ \n    'message': 'Deep Linking successful!',\\ \n    'log': 'deep_linking_successful'\\ \n  }\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"contentItems\\\": [\\ \n    {\\ \n      \\\"type\\\": \\\"link\\\",\\ \n      \\\"url\\\": \\\"https://something.example.com/page.html\\\",\\ \n      \\\"title\\\": \\\"My Home Page\\\",\\ \n      \\\"icon\\\": {\\ \n        \\\"url\\\": \\\"https://lti.example.com/image.jpg\\\",\\ \n        \\\"width\\\": 100,\\ \n        \\\"height\\\": 100\\ \n      },\\ \n      \\\"thumbnail\\\": {\\ \n        \\\"url\\\": \\\"https://lti.example.com/thumb.jpg\\\",\\ \n        \\\"width\\\": 90,\\ \n        \\\"height\\\": 90\\ \n      },\\ \n    }\\ \n  ],\\ \n  \\\"options\\\": {\\ \n    \\\"message\\\": \\\"Deep Linking successful!\\\",\\ \n    \\\"log\\\": \\\"deep_linking_successful\\\"\\ \n  }\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/deeplinking/form\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/deeplinking/form' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>' \\\\ \n--data-raw '{\\ \n  \"contentItems\": [\\ \n    {\\ \n      \"type\": \"link\",\\ \n      \"title\": \"My Home Page\",\\ \n      \"url\": \"https://something.example.com/page.html\",\\ \n      \"icon\": {\\ \n        \"url\": \"https://lti.example.com/image.jpg\",\\ \n        \"width\": 100,\\ \n        \"height\": 100\\ \n      },\\ \n      \"thumbnail\": {\\ \n        \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n        \"width\": 90,\\ \n        \"height\": 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  \"options\": {\\ \n    \"message\": \"Deep Linking successful!\",\\ \n    \"log\": \"deep_linking_successful\"\\ \n  }\\ \n}'"
          }
        ],
        "description": "If your application is a hub of multiple resources and/or activities, the LTI® protocol makes this easy to manage through the *Deep Linking* service. You can use this service to allow teachers and administrators to select one specific resource from your application when creating a resource link (activity) in the LMS. LTIAAS gives you access to this service through the Deep Linking flow and `/api/deeplinking/form` API endpoint.\n\n\nPlease check our [Performing Deep Linking guide](/guides/api/deeplinking) to learn more about using this endpoint.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "security": [
          {
            "LTIK-AUTH-V2": []
          }
        ]
      }
    },
    "/api/deeplinking": {
      "parameters": [],
      "post": {
        "summary": "Build Deep-Linking Form Components",
        "operationId": "post-api-deeplinking-message",
        "tags": [
          "Deep Linking"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "eyJhbGciOiJIUzIVCJ9.eyJzdWIbmFtZSI6IG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKV_adQssw5c",
                      "description": "Signed JWT containing the selected resources that must be inserted in a self-submitting form and appended to the HTML body."
                    },
                    "target": {
                      "type": "string",
                      "example": "https://ltiadvantagevalidator.imsglobal.org/ltitool/deeplinkresponse.html",
                      "description": "Endpoint to which the message has to be submitted to in order to finish the Deep Linking flow"
                    }
                  },
                  "required": [
                    "message",
                    "target"
                  ]
                },
                "examples": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message",
                        "description"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {}
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentItems": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "minProperties": 1,
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "link",
                            "ltiResourceLink",
                            "file",
                            "html",
                            "image"
                          ],
                          "description": "The type of the content item"
                        },
                        "url": {
                          "type": "string",
                          "description": "A URL pointing to your LTIAAS instance. In order to pass parameters to your Tool and identify the selected resource you can add query parameters to the URL.\n\n> Example:\n> - URL passed inside the Deep Linking content item: `https://your.ltiaas.com?resource=1234`\n> - URL the user will be redirected to after a successful launch from the created resource: `https://yourtool.com?resource=1234`"
                        },
                        "title": {
                          "type": "string",
                          "description": "plain text to use as the title or heading for content."
                        },
                        "text": {
                          "type": "string",
                          "description": "plain text description of the content item intended to be displayed to all users who can access the item."
                        },
                        "icon": {
                          "type": "object",
                          "description": "Fully qualified URL, height, and width of an icon image to be placed with the file. A platform may not support the display of icons, but where it does, it may choose to use a local copy of the icon rather than linking to the URL provided (which would also allow it to resize the image to suit its needs).",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "description": "fully qualified URL to the image file."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the image."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the image."
                            }
                          }
                        },
                        "thumbnail": {
                          "type": "object",
                          "description": "Fully qualified URL, height, and width of a thumbnail image to be made a hyperlink. This allows the hyperlink to be opened within the platform from text or an image, or from both.",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "description": "fully qualified URL to the image file."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the image."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the image."
                            }
                          }
                        },
                        "embed": {
                          "type": "object",
                          "description": "The embed property has a single required property html that contains the HTML fragment to embed the resource directly inside HTML. It is commonly used as a way to embed a resource in an HTML editor. Platform must make sure to properly sanitize the HTML prior to inclusion.",
                          "properties": {
                            "html": {
                              "type": "string",
                              "description": "the HTML fragment to embed the resource directly inside HTML."
                            }
                          }
                        },
                        "window": {
                          "type": "object",
                          "description": "The window property indicates how to open the resource in a new window/tab.",
                          "properties": {
                            "targetName": {
                              "type": "string",
                              "description": "String identifying the name of the window to open; this allows for a single window to be shared as the target of multiple links, preventing a proliferation of new windows/tabs."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixels of the new window."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixels of the new window."
                            },
                            "windowFeatures": {
                              "type": "string",
                              "description": "Comma-separated list of window features as per the [window.open() definition](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)."
                            }
                          }
                        },
                        "iframe": {
                          "type": "object",
                          "description": "The iframe property indicates the resource can be embedded using an iframe. The child parameters ndicates the dimension and the src URL for embedding",
                          "properties": {
                            "src": {
                              "type": "string",
                              "description": "required parameter indicating the URL to use as the src of the iframe. The src value may differ from the link url."
                            },
                            "width": {
                              "type": "integer",
                              "description": "integer representing the width in pixel of the new iframe."
                            },
                            "height": {
                              "type": "integer",
                              "description": "integer representing the height in pixel of the new iframe."
                            }
                          }
                        },
                        "custom": {
                          "type": "object",
                          "description": "\tA map of key/value custom parameters. Those parameters MUST be included in the LtiResourceLinkRequest payload. Value may include substitution parameters as defined in the LTI® Core Specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/). Map values must be strings. Note that \"empty-string\" is a valid value (\"\"); however, null is not a valid value."
                        },
                        "lineItem": {
                          "type": "object",
                          "description": "A lineItem object that indicates this activity is expected to receive scores; the platform may automatically create a corresponding line item when the resource link is created, using the maximum score as the default maximum points. The resource_id, tag and scoreMaximum are defined in the [LTI®-AGS-20](https://www.imsglobal.org/spec/lti-ags/v2p0/). A line item created as a result of a Deep Linking interaction must be exposed in a subsequent line item service call, with the resourceLinkId of the associated resource link, as well as the resourceId and tag if present in the line item definition.",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "label for the line item. If not present, the title of the content item must be used."
                            },
                            "scoreMaximum": {
                              "type": "number",
                              "description": "Positive decimal value indicating the maximum score possible for this activity."
                            },
                            "resourceId": {
                              "type": "string",
                              "description": "Tool provided ID for the resource."
                            },
                            "tag": {
                              "type": "string",
                              "description": "Additional information about the line item; may be used by the tool to identify line items attached to the same resource or resource link (example: grade, originality, participation)."
                            },
                            "gradesReleased": {
                              "type": "boolean",
                              "description": "boolean to indicate if the platform should release the grades, e.g., to learners."
                            }
                          }
                        },
                        "available": {
                          "type": "object",
                          "description": "Indicates the initial start and end time this activity should be made available to learners. A platform may choose to make an item not accessible by hiding it, or by disabling the link, or some other method which prevents the link from being opened by a learner. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.available.startDateTime and ResourceLink.available.endDateTime substitution parameters defined in LTI® Core specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/) within custom parameters to get the actual values at launch time. Note there may be many factors controlling the availability of an item by the platform, and tools are not guaranteed to receive available start and end times in a launch, even if they set them when creating content.",
                          "properties": {
                            "startDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 date and time when the link becomes accessible [ISO8601](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            },
                            "endDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": " ISO 8601 date and time when the link stops being accessible [ISO8601](https://www.imsglobal.org/spec/lti-dl/v2p0/#bib-iso8601)."
                            }
                          }
                        },
                        "submission": {
                          "type": "object",
                          "description": "Indicates the initial start and end time submissions for this activity can be made by learners. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.submission.startDateTime and ResourceLink.submission.endDateTime substitution parameters defined in LTI® Core specification [LTI®-13](https://www.imsglobal.org/spec/lti/v1p3/) within custom parameters to get the actual values at launch time.",
                          "properties": {
                            "startDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 Date and time when the link can start receiving submissions [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            },
                            "endDateTime": {
                              "type": "string",
                              "format": "date-time",
                              "description": "ISO 8601 Date and time when the link stops accepting submissions [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874)."
                            }
                          }
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "\tISO 8601 Date and time [http://www.iso.org/iso/catalogue_detail?csnumber=40874](http://www.iso.org/iso/catalogue_detail?csnumber=40874). The URL will be available until this time. No guarantees after that. (e.g. 2014-03-05T12:34:56Z)."
                        },
                        "html": {
                          "type": "string",
                          "description": "When type==\"html\". HTML fragment to be embedded. The platform is expected to sanitize it against cross-site scripting attacks."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Integer representing the width in pixels of the image."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Integer representing the height in pixels of the image."
                        }
                      },
                      "required": [
                        "type"
                      ]
                    }
                  },
                  "options": {
                    "type": "object",
                    "description": "An object containing one or more optional fields to aid in error conditions",
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "Message displayed to the user if the deep linking process is successfully completed."
                      },
                      "log": {
                        "type": "string",
                        "description": "Log generated by the Platform if the deep linking process is successfully completed."
                      },
                      "errMessage": {
                        "type": "string",
                        "description": "Message displayed to the user if the deep linking process finishes with an error. Sending this will cause the LMS to reject the deep linking submission and display the error message."
                      },
                      "errLog": {
                        "type": "string",
                        "description": "Log generated by the Platform if the deep linking process finishes with an error. Sending this will cause the LMS to reject the deep linking submission and display the error message."
                      }
                    }
                  }
                },
                "required": [
                  "contentItems"
                ]
              },
              "examples": {
                "LtiResourceLink Content Item": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "ltiResourceLink",
                        "title": "A title",
                        "text": "This is a link to an activity that will be graded",
                        "url": "https://lti.example.com/launchMe",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        },
                        "lineItem": {
                          "scoreMaximum": 87,
                          "label": "Chapter 12 quiz",
                          "resourceId": "xyzpdq1234",
                          "tag": "originality",
                          "gradesReleased": true
                        },
                        "available": {
                          "startDateTime": "2018-02-06T20:05:02Z",
                          "endDateTime": "2018-03-07T20:05:02Z"
                        },
                        "submission": {
                          "endDateTime": "2018-03-06T20:05:02Z"
                        },
                        "custom": {
                          "quiz_id": "az-123",
                          "duedate": "$ResourceLink.submission.endDateTime"
                        },
                        "window": {
                          "targetName": "examplePublisherContent"
                        },
                        "iframe": {
                          "height": 890
                        }
                      }
                    ],
                    "options": {
                      "message": "Deep Linking successful!",
                      "log": "deep_linking_successful"
                    }
                  }
                },
                "HTML Content Item": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "html",
                        "html": "<h1>A Custom Title</h1>"
                      }
                    ],
                    "options": {
                      "message": "string",
                      "log": "string"
                    }
                  }
                },
                "Multiple Content Items": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "link",
                        "title": "My Home Page",
                        "url": "https://something.example.com/page.html",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        }
                      },
                      {
                        "type": "html",
                        "html": "<h1>A Custom Title</h1>"
                      },
                      {
                        "type": "link",
                        "url": "https://www.youtube.com/watch?v=corV3-WsIro",
                        "embed": {
                          "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/corV3-WsIro\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>"
                        },
                        "window": {
                          "targetName": "youtube-corV3-WsIro",
                          "windowFeatures": "height=560,width=315,menubar=no"
                        },
                        "iframe": {
                          "width": 560,
                          "height": 315,
                          "src": "https://www.youtube.com/embed/corV3-WsIro"
                        }
                      },
                      {
                        "type": "image",
                        "url": "https://www.example.com/image.png",
                        "https://www.example.com/resourceMetadata": {
                          "license": "CCBY4.0"
                        }
                      },
                      {
                        "type": "ltiResourceLink",
                        "title": "A title",
                        "text": "This is a link to an activity that will be graded",
                        "url": "https://lti.example.com/launchMe",
                        "icon": {
                          "url": "https://lti.example.com/image.jpg",
                          "width": 100,
                          "height": 100
                        },
                        "thumbnail": {
                          "url": "https://lti.example.com/thumb.jpg",
                          "width": 90,
                          "height": 90
                        },
                        "lineItem": {
                          "scoreMaximum": 87,
                          "label": "Chapter 12 quiz",
                          "resourceId": "xyzpdq1234",
                          "tag": "originality",
                          "gradesReleased": true
                        },
                        "available": {
                          "startDateTime": "2018-02-06T20:05:02Z",
                          "endDateTime": "2018-03-07T20:05:02Z"
                        },
                        "submission": {
                          "endDateTime": "2018-03-06T20:05:02Z"
                        },
                        "custom": {
                          "quiz_id": "az-123",
                          "duedate": "$ResourceLink.submission.endDateTime"
                        },
                        "window": {
                          "targetName": "examplePublisherContent"
                        },
                        "iframe": {
                          "height": 890
                        }
                      },
                      {
                        "type": "file",
                        "title": "A file like a PDF that is my assignment submissions",
                        "url": "https://my.example.com/assignment1.pdf",
                        "mediaType": "application/pdf",
                        "expiresAt": "2018-03-06T20:05:02Z"
                      },
                      {
                        "type": "https://www.example.com/custom_type",
                        "data": "somedata"
                      }
                    ],
                    "options": {
                      "message": "string",
                      "log": "string",
                      "errMessage": "string",
                      "errLog": "string"
                    }
                  }
                },
                "Custom Content Type": {
                  "value": {
                    "contentItems": [
                      {
                        "type": "https://www.example.com/custom_type",
                        "data": "somedata"
                      }
                    ],
                    "options": {
                      "message": "string",
                      "log": "string",
                      "errMessage": "string",
                      "errLog": "string"
                    }
                  }
                }
              }
            }
          },
          "description": ""
        },
        "parameters": [],
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  contentItems: [\\ \n    {\\ \n      type: \"link\",\\ \n      title: \"My Home Page\",\\ \n      url: \"https://something.example.com/page.html\",\\ \n      icon: {\\ \n        url: \"https://lti.example.com/image.jpg\",\\ \n        width: 100,\\ \n        height: 100\\ \n      },\\ \n      thumbnail: {\\ \n        url: \"https://lti.example.com/thumb.jpg\",\\ \n        width: 90,\\ \n        height: 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  options: {\\ \n    message: \"Deep Linking successful!\",\\ \n    log: \"deep_linking_successful\"\\ \n  }\\ \n};\\ \nconst url = 'https://your.ltiaas.com/api/deeplinking/message';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"contentItems\": [\\ \n        {\\ \n            \"type\": \"link\",\\ \n            \"title\": \"My Home Page\",\\ \n            \"url\": \"https://something.example.com/page.html\",\\ \n            \"icon\": {\\ \n                \"url\": \"https://lti.example.com/image.jpg\",\\ \n                \"width\": 100,\\ \n                \"height\": 100\\ \n            },\\ \n            \"thumbnail\": {\\ \n                \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n                \"width\": 90,\\ \n                \"height\": 90\\ \n            }\\ \n        }\\ \n    ],\\ \n    \"options\": {\\ \n        \"message\": \"Deep Linking successful!\",\\ \n        \"log\": \"deep_linking_successful\"\\ \n    }\\ \n}\\ \nurl = f\"https://your.ltiaas.com/api/deeplinking/message\"\\ \nheaders = {\\ \n    \"Authorization\": f\"LTIK-AUTH-V2 {API_KEY}:{ltik}\"\\ \n}\\ \nresponse = requests.post(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"contentItems\": [\\ \n    {\\ \n      \"type\": \"link\",\\ \n      \"title\": \"My Home Page\",\\ \n      \"url\": \"https://something.example.com/page.html\",\\ \n      \"icon\": {\\ \n        \"url\": \"https://lti.example.com/image.jpg\",\\ \n        \"width\": 100,\\ \n        \"height\": 100\\ \n      },\\ \n      \"thumbnail\": {\\ \n        \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n        \"width\": 90,\\ \n        \"height\": 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  \"options\": {\\ \n    \"message\": \"Deep Linking successful!\",\\ \n    \"log\": \"deep_linking_successful\"\\ \n  }\\ \n}\\ \n\\ \n$encoded_id = urlencode($line_item_id);\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/deeplinking/message',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: LTIK-AUTH-V2 ' + $API_KEY + ':' + $ltik\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/lineitems/deeplinking/message\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"LTIK-AUTH-V2 #{API_KEY}:#{ltik}\"\\ \nrequest.body = JSON.dump({\\ \n    \"contentItems\": [\\ \n        {\\ \n            \"type\": \"link\",\\ \n            \"title\": \"My Home Page\",\\ \n            \"url\": \"https://something.example.com/page.html\",\\ \n            \"icon\": {\\ \n                \"url\": \"https://lti.example.com/image.jpg\",\\ \n                \"width\": 100,\\ \n                \"height\": 100\\ \n            },\\ \n            \"thumbnail\": {\\ \n                \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n                \"width\": 90,\\ \n                \"height\": 90\\ \n            }\\ \n        }\\ \n    ],\\ \n    \"options\": {\\ \n        \"message\": \"Deep Linking successful!\",\\ \n        \"log\": \"deep_linking_successful\"\\ \n    }\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"api/lineitems\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"LTIK-AUTH-V2 {API_KEY}:{ltik}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'contentItems': [\\ \n    {\\ \n      'type': 'link',\\ \n      'title': 'My Home Page',\\ \n      'url': 'https://something.example.com/page.html',\\ \n      'icon': {\\ \n        'url': 'https://lti.example.com/image.jpg',\\ \n        'width': 100,\\ \n        'height': 100\\ \n      },\\ \n      'thumbnail': {\\ \n        'url': 'https://lti.example.com/thumb.jpg',\\ \n        'width': 90,\\ \n        'height': 90\\ \n      },\\ \n    }\\ \n  ],\\ \n  'options': {\\ \n    'message': 'Deep Linking successful!',\\ \n    'log': 'deep_linking_successful'\\ \n  }\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"contentItems\\\": [\\ \n    {\\ \n      \\\"type\\\": \\\"link\\\",\\ \n      \\\"url\\\": \\\"https://something.example.com/page.html\\\",\\ \n      \\\"title\\\": \\\"My Home Page\\\",\\ \n      \\\"icon\\\": {\\ \n        \\\"url\\\": \\\"https://lti.example.com/image.jpg\\\",\\ \n        \\\"width\\\": 100,\\ \n        \\\"height\\\": 100\\ \n      },\\ \n      \\\"thumbnail\\\": {\\ \n        \\\"url\\\": \\\"https://lti.example.com/thumb.jpg\\\",\\ \n        \\\"width\\\": 90,\\ \n        \\\"height\\\": 90\\ \n      },\\ \n    }\\ \n  ],\\ \n  \\\"options\\\": {\\ \n    \\\"message\\\": \\\"Deep Linking successful!\\\",\\ \n    \\\"log\\\": \\\"deep_linking_successful\\\"\\ \n  }\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/deeplinking/message\")\\ \n  .addHeader(\"Authorization\", \"LTIK-AUTH-V2 \" + API_KEY + \":\" + ltik)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/deeplinking/message' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: LTIK-AUTH-V2 <API_KEY>:<ltik>' \\\\ \n--data-raw '{\\ \n  \"contentItems\": [\\ \n    {\\ \n      \"type\": \"link\",\\ \n      \"title\": \"My Home Page\",\\ \n      \"url\": \"https://something.example.com/page.html\",\\ \n      \"icon\": {\\ \n        \"url\": \"https://lti.example.com/image.jpg\",\\ \n        \"width\": 100,\\ \n        \"height\": 100\\ \n      },\\ \n      \"thumbnail\": {\\ \n        \"url\": \"https://lti.example.com/thumb.jpg\",\\ \n        \"width\": 90,\\ \n        \"height\": 90\\ \n      }\\ \n    }\\ \n  ],\\ \n  \"options\": {\\ \n    \"message\": \"Deep Linking successful!\",\\ \n    \"log\": \"deep_linking_successful\"\\ \n  }\\ \n}'"
          }
        ],
        "description": "If your application is a hub of multiple resources and/or activities, the LTI® protocol makes this easy to manage through the *Deep Linking* service. You can use this service to allow teachers and administrators to select one specific resource from your application when creating a resource link (activity) in the LMS. LTIAAS gives you access to this service through the Deep Linking flow and `/api/deeplinking` API endpoint.\n\nThis endpoint will provide you with the information necessary to build your own self-submitting form. Please check our [Performing Deep Linking guide](/guides/api/deeplinking) and its [Creating your own submission form section](/guides/api/deeplinking#creating-your-own-submission-form) to learn more about using this endpoint.\n\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td>✅</td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td></td>\n  </tr>\n</table>",
        "security": [
          {
            "LTIK-AUTH-V2": []
          }
        ]
      }
    },
    "/api/registrations/{registrationID}": {
      "get": {
        "summary": "Get Dynamic Registration by ID",
        "tags": [
          "Dynamic Registration"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "url": "https://moodle.ltiaas.com",
                      "familyCode": "moodle",
                      "version": "4.4.1+ (Build: 20240705)",
                      "supportedScopes": [
                        "https://purl.imsglobal.org/spec/lti-bo/scope/basicoutcome",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/score",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem",
                        "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly",
                        "https://purl.imsglobal.org/spec/lti-ts/scope/toolsetting",
                        "openid"
                      ],
                      "supportedMessages": [
                        {
                          "type": "LtiResourceLinkRequest"
                        },
                        {
                          "type": "LtiDeepLinkingRequest",
                          "placements": [
                            "ContentArea"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "url",
                    "familyCode",
                    "version",
                    "supportedScopes",
                    "supportedMessages"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "familyCode": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "supportedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "supportedMessages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "placements": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "privacyLevel": {
                      "type": "string",
                      "enum": [
                        "public",
                        "name_only",
                        "email_only",
                        "anonymous"
                      ],
                      "description": "The privacy level captured from the `privacyLevel` query parameter when registration was initiated (if any). Used as the default in the completion call unless overridden by the completion body."
                    }
                  }
                },
                "examples": {
                  "Moodle Example": {
                    "value": {
                      "url": "https://moodle.ltiaas.com",
                      "familyCode": "moodle",
                      "version": "4.4.1+ (Build: 20240705)",
                      "supportedScopes": [
                        "https://purl.imsglobal.org/spec/lti-bo/scope/basicoutcome",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/score",
                        "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem",
                        "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly",
                        "https://purl.imsglobal.org/spec/lti-ts/scope/toolsetting",
                        "openid"
                      ],
                      "supportedMessages": [
                        {
                          "type": "LtiResourceLinkRequest"
                        },
                        {
                          "type": "LtiDeepLinkingRequest",
                          "placements": [
                            "ContentArea"
                          ]
                        }
                      ],
                      "privacyLevel": "anonymous"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "status": 401,
                      "error": "Unauthorized",
                      "details": {
                        "message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
                        "description": "Invalid or expired ltik."
                      }
                    }
                  },
                  "properties": {
                    "status": {
                      "type": "integer",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "default": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid API key"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "status": 401,
                      "error": "Unauthorized",
                      "details": {
                        "message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
                        "description": "Invalid API key"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-api-registrations",
        "x-stoplight": {
          "id": "z8ygs27maih3p"
        },
        "description": "Get information about a dynamic registration event.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = `https://your.ltiaas.com/api/registrations/${registration_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import urllib.parse\\ \n\\ \nurl = f\"https://your.ltiaas.com/api/registrations/{platform_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/registrations' + $registration_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/registrations/#{registration_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"api/registrations/{registrationId}\");\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/registrations/\" + registration_id)\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/api/registrations/:registrationid' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "registrationID",
          "in": "path",
          "required": true,
          "description": "The ID of the dynamic registration"
        },
        {
          "schema": {
            "type": "string"
          },
          "in": "query",
          "name": "raw",
          "description": "Get the unfiltered registration with extra, uncommonly used metadata"
        }
      ]
    },
    "/api/registrations/{registrationID}/complete": {
      "post": {
        "summary": "Complete Dynamic Registration Process",
        "tags": [
          "Dynamic Registration"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "html": "<script>(window.opener || window.parent).postMessage({subject:'org.imsglobal.lti.close'}, '*');</script>",
                      "platformId": "A2F48n9Ss8Hjpw4gjo0"
                    }
                  },
                  "required": [
                    "html",
                    "platformId"
                  ],
                  "properties": {
                    "html": {
                      "type": "string",
                      "description": "An HTML snippet that needs to be appended to the document body."
                    },
                    "platformId": {
                      "type": "string",
                      "description": "The ID of the newly registered platform"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "html": "<script>(window.opener || window.parent).postMessage({subject:'org.imsglobal.lti.close'}, '*');</script>",
                      "platformId": "A2F48n9Ss8Hjpw4gjo0"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Please check our guide on [Authenticating API requests](/guides/api/authentication) to learn about how authentication works in the LTIAAS API.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "status": 401,
                      "error": "Unauthorized",
                      "details": {
                        "message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
                        "description": "Invalid or expired ltik."
                      }
                    }
                  },
                  "properties": {
                    "status": {
                      "type": "integer",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "default": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid API key"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "status": 401,
                      "error": "Unauthorized",
                      "details": {
                        "message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
                        "description": "Invalid API key"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "post-api-registrations-complete",
        "x-stoplight": {
          "id": "qouwx4hjtnl3f"
        },
        "description": "Complete the dyanmic registration process.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  platformName: 'Platform name', \\ \n  autoActivate: true,\\ \n  messages: [\\ \n    { type: 'LtiResourceLinkRequest', placements: ['placement1'] },\\ \n    { type: 'LtiDeepLinkingRequest', placements: ['placement2'] }\\ \n  ]\\ \n};\\ \n\\ \nconst url = `https://your.ltiaas.com/api/registrations/${registration_id}/complete`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"platformName\": \"Platform name\",\\ \n    \"autoActivate\": True,\\ \n    \"messages\": [\\ \n        {\\ \n            \"type\": \"LtiResourceLinkRequest\",\\ \n            \"placements\": [\\ \n                \"placement1\"\\ \n            ]\\ \n        },\\ \n        {\\ \n            \"type\": \"LtiDeepLinkingRequest\",\\ \n            \"placements\": [\\ \n                \"placement2\"\\ \n            ]\\ \n        }\\ \n    ]\\ \n}\\ \n\\ \nurl = f\"https://your.ltiaas.com/api/registrations/{platform_id}/complete\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"platformName\": \"Platform name\",\\ \n  \"autoActivate\": true,\\ \n  \"messages\": [\\ \n    {\\ \n      \"type\": \"LtiResourceLinkRequest\",\\ \n      \"placements\": [\\ \n        \"placement1\"\\ \n      ]\\ \n    },\\ \n    {\\ \n      \"type\": \"LtiDeepLinkingRequest\",\\ \n      \"placements\": [\\ \n        \"placement2\"\\ \n      ]\\ \n    }\\ \n  ]\\ \n};\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/registrations' + $registration_id + '/complete',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/registrations/#{registration_id}/complete\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \nrequest.body = JSON.dump({\\ \n  \"platformName\": \"Platform name\",\\ \n  \"autoActivate\": true,\\ \n  \"messages\": [\\ \n    {\\ \n      \"type\": \"LtiResourceLinkRequest\",\\ \n      \"placements\": [\\ \n        \"placement1\"\\ \n      ]\\ \n    },\\ \n    {\\ \n      \"type\": \"LtiDeepLinkingRequest\",\\ \n      \"placements\": [\\ \n        \"placement2\"\\ \n      ]\\ \n    }\\ \n  ]\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"api/registrations/{registrationId}/complete\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'platformName': 'Platform name',\\ \n  'autoActivate': true,\\ \n  'messages': [\\ \n    {\\ \n      'type': 'LtiResourceLinkRequest',\\ \n      'placements': [\\ \n        'placement1'\\ \n      ]\\ \n    },\\ \n    {\\ \n      'type': 'LtiDeepLinkingRequest',\\ \n      'placements': [\\ \n        'placement2'\\ \n      ]\\ \n    }\\ \n  ]\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"platformName\\\": \\\"Platform name\\\",\\ \n  \\\"autoActivate\\\": true,\\ \n  \\\"messages\\\": [\\ \n    {\\ \n      \\\"type\\\": \\\"LtiResourceLinkRequest\\\",\\ \n      \\\"placements\\\": [\\ \n        \\\"placement1\\\"\\ \n      ]\\ \n    },\\ \n    {\\ \n      \\\"type\\\": \\\"LtiDeepLinkingRequest\\\",\\ \n      \\\"placements\\\": [\\ \n        \\\"placement2\\\"\\ \n      ]\\ \n    }\\ \n  ]\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/registrations/\" + registration_id + \"/complete\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/registrations/:registrationid/complete' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>' \\\\ \n--data-raw '{\\ \n  \"platformName\": \"Platform name\", \\ \n  \"autoActivate\": true,\\ \n  \"messages\": [\\ \n    { \"type\": \"LtiResourceLinkRequest\", \"placements\": [\"placement1\"] },\\ \n    { \"type\": \"LtiDeepLinkingRequest\", \"placements\": [\"placement2\"] }\\ \n  ]\\ \n}'"
          }
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "platformName": {
                    "type": "string"
                  },
                  "autoActivate": {
                    "type": "boolean"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "placements": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "#### Canvas\n\n- `https://canvas.instructure.com/lti/account_navigation`\n- `https://canvas.instructure.com/lti/analytics_hub`\n- `https://canvas.instructure.com/lti/assignment_edit`\n- `https://canvas.instructure.com/lti/assignment_group_menu`\n- `https://canvas.instructure.com/lti/assignment_index_menu`\n- `https://canvas.instructure.com/lti/assignment_menu`\n- `https://canvas.instructure.com/lti/assignment_selection`\n- `https://canvas.instructure.com/lti/assignment_view`\n- `https://canvas.instructure.com/lti/collaboration`\n- `https://canvas.instructure.com/lti/conference_selection`\n- `https://canvas.instructure.com/lti/course_assignments_menu`\n- `https://canvas.instructure.com/lti/course_home_sub_navigation`\n- `https://canvas.instructure.com/lti/course_navigation`\n- `https://canvas.instructure.com/lti/course_settings_sub_navigation`\n- `https://canvas.instructure.com/lti/discussion_topic_index_menu`\n- `https://canvas.instructure.com/lti/discussion_topic_menu`\n- `https://canvas.instructure.com/lti/editor_button`\n- `https://canvas.instructure.com/lti/file_index_menu`\n- `https://canvas.instructure.com/lti/file_menu`\n- `https://canvas.instructure.com/lti/global_navigation`\n- `https://canvas.instructure.com/lti/homework_submission`\n- `https://canvas.instructure.com/lti/link_selection`\n- `https://canvas.instructure.com/lti/migration_selection`\n- `https://canvas.instructure.com/lti/module_group_menu`\n- `https://canvas.instructure.com/lti/module_index_menu`\n- `https://canvas.instructure.com/lti/module_index_menu_modal`\n- `https://canvas.instructure.com/lti/module_menu`\n- `https://canvas.instructure.com/lti/module_menu_modal`\n- `https://canvas.instructure.com/lti/post_grades`\n- `https://canvas.instructure.com/lti/quiz_index_menu`\n- `https://canvas.instructure.com/lti/quiz_menu`\n- `https://canvas.instructure.com/lti/similarity_detection`\n- `https://canvas.instructure.com/lti/student_context_card`\n- `https://canvas.instructure.com/lti/submission_type_selection`\n- `https://canvas.instructure.com/lti/tool_configuration`\n- `https://canvas.instructure.com/lti/top_navigation`\n- `https://canvas.instructure.com/lti/user_navigation`\n- `https://canvas.instructure.com/lti/wiki_index_menu`\n- `https://canvas.instructure.com/lti/wiki_page_menu`\n- `ActivityAssetProcessor`\n- `ActivityAssetProcessorContribution`\n- `ContentArea`\n- `RichTextEditor`\n\n#### All Others\n\n- `ContentArea`\n- `RichTextEditor`"
                        }
                      }
                    }
                  },
                  "privacyLevel": {
                    "type": "string",
                    "enum": [
                      "public",
                      "name_only",
                      "email_only",
                      "anonymous"
                    ],
                    "description": "Amount of user personal data the LMS should send on launch for this registration. One of `public` (default), `name_only`, `email_only`, or `anonymous`. When omitted, the account-level default (or `public`) is used. On Canvas, levels other than `public` also stop custom fields (e.g. `custom_canvas_user_id`) from being sent; the stable LTI `sub` is always available."
                  }
                },
                "x-examples": {
                  "Example 1": {
                    "platformName": "Platform name",
                    "autoActivate": true,
                    "privacyLevel": "anonymous",
                    "messages": [
                      {
                        "type": "LtiResourceLinkRequest",
                        "placements": [
                          "placement1"
                        ]
                      },
                      {
                        "type": "LtiDeepLinkingRequest",
                        "placements": [
                          "placement2"
                        ]
                      }
                    ]
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "platformName": "Platform name",
                    "autoActivate": true,
                    "privacyLevel": "anonymous",
                    "messages": [
                      {
                        "type": "LtiResourceLinkRequest",
                        "placements": [
                          "placement1"
                        ]
                      },
                      {
                        "type": "LtiDeepLinkingRequest",
                        "placements": [
                          "placement2"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "description": "All parameters are optional"
        },
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "registrationID",
          "in": "path",
          "required": true,
          "description": "The ID of the dynamic registration"
        }
      ]
    },
    "/api/oauth/access-token/{platformId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "platformId",
          "in": "path",
          "required": true,
          "description": "Platform ID"
        }
      ],
      "post": {
        "summary": "Generate OAuth2 Refresh Token",
        "operationId": "post-api-oauth-access-token",
        "tags": [
          "OAuth2"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenType": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "0ys27tkhew5vn"
                      },
                      "default": "Bearer"
                    },
                    "accessToken": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "khy14z69a1d8n"
                      }
                    },
                    "expiresIn": {
                      "type": "integer",
                      "x-stoplight": {
                        "id": "0mll0wds1who3"
                      },
                      "description": "Number of seconds"
                    },
                    "refreshToken": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "izbej1qiokjvr"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The given platform ID does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {
                  "Example": {
                    "value": {
                      "status": 404,
                      "error": "Not Found",
                      "details": {
                        "message": "UNREGISTERED_PLATFORM"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Retrieve an access token for a given authorizationCode (for a given platform).\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  authorizationCode: authorizationCode\\ \n};\\ \n\\ \nconst url = `https://your.ltiaas.com/api/oauth/access-token/${platform_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  const accessToken = response.data.accessToken;\\ \n  const refreshToken = response.data.refreshToken;\\ \n  const expiresIn = response.data.expiresIn;\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"authorizationCode\": authorization_code\\ \n}\\ \n\\ \nurl = f\"https://your.ltiaas.com/api/oauth/access-token/{platform_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, json=data, headers=headers)\\ \nresult = response.json()\\ \naccess_token = result[\"accessToken\"]\\ \nrefresh_token = result[\"refreshToken\"]\\ \nexpires_in = result[\"expiresIn\"]\\ \nprint(result)"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = json_encode(array(\\ \n  \"authorizationCode\" => $authorization_code\\ \n));\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/oauth/access-token/' . $platform_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' . $API_KEY,\\ \n    'Content-Type: application/json'\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \n$access_token = $obj->accessToken;\\ \n$refresh_token = $obj->refreshToken;\\ \n$expires_in = $obj->expiresIn;\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/oauth/access-token/#{platform_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \nrequest[\"Content-Type\"] = \"application/json\"\\ \nrequest.body = JSON.dump({\\ \n  \"authorizationCode\": authorization_code\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nresult = JSON.parse(response.read_body)\\ \naccess_token = result[\"accessToken\"]\\ \nrefresh_token = result[\"refreshToken\"]\\ \nexpires_in = result[\"expiresIn\"]\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"api/oauth/access-token/{platformId}\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'authorizationCode': '\" + authorizationCode + @\"'\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"authorizationCode\\\": \\\"\" + authorizationCode + \"\\\"\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/oauth/access-token/\" + platform_id)\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    String responseBody = response.body().string();\\ \n    // Parse JSON response to extract accessToken, refreshToken, and expiresIn\\ \n    system.out.println(responseBody);\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/oauth/access-token/:platformid' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>' \\\\ \n-H 'Content-Type: application/json' \\\\ \n--data-raw '{\\ \n  \"authorizationCode\": \"your_authorization_code\"\\ \n}'"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authorizationCode": {
                    "type": "string",
                    "x-stoplight": {
                      "id": "oxh316apkflyv"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      }
    },
    "/api/oauth/access-token/{platformId}/refresh": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "platformId",
          "in": "path",
          "required": true,
          "description": "Platform ID"
        }
      ],
      "post": {
        "summary": "Generate OAuth2 Access Token",
        "operationId": "post-api-oauth-access-token-refresh",
        "tags": [
          "OAuth2"
        ],
        "responses": {
          "200": {
            "description": "Valid Access Token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenType": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "cm5iq4mk4wftl"
                      },
                      "default": "Bearer"
                    },
                    "accessToken": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "la4xh7tn47u0c"
                      }
                    },
                    "expiresIn": {
                      "type": "integer",
                      "x-stoplight": {
                        "id": "du76gx4gi73x6"
                      },
                      "description": "Number of seconds"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The given platform ID does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "default": 401
                    },
                    "error": {
                      "type": "string",
                      "default": "Unauthorized"
                    },
                    "details": {
                      "type": "object",
                      "required": [
                        "message"
                      ],
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid or expired ltik."
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "details"
                  ]
                },
                "examples": {
                  "Example": {
                    "value": {
                      "status": 404,
                      "error": "Not Found",
                      "details": {
                        "message": "UNREGISTERED_PLATFORM"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Retrieve an access token for a given refreshToken (for a given platform).\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  refreshToken: refreshToken\\ \n};\\ \n\\ \nconst url = `https://your.ltiaas.com/api/oauth/access-token/${platform_id}/refresh`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  const newAccessToken = response.data.accessToken;\\ \n  const expiresIn = response.data.expiresIn;\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"refreshToken\": refresh_token\\ \n}\\ \n\\ \nurl = f\"https://your.ltiaas.com/api/oauth/access-token/{platform_id}/refresh\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, json=data, headers=headers)\\ \nresult = response.json()\\ \nnew_access_token = result[\"accessToken\"]\\ \nexpires_in = result[\"expiresIn\"]\\ \nprint(result)"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = json_encode(array(\\ \n  \"refreshToken\" => $refresh_token\\ \n));\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/api/oauth/access-token/' . $platform_id . '/refresh',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' . $API_KEY,\\ \n    'Content-Type: application/json'\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \n$new_access_token = $obj->accessToken;\\ \n$expires_in = $obj->expiresIn;\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/api/oauth/access-token/#{platform_id}/refresh\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \nrequest[\"Content-Type\"] = \"application/json\"\\ \nrequest.body = JSON.dump({\\ \n  \"refreshToken\": refresh_token\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nresult = JSON.parse(response.read_body)\\ \nnew_access_token = result[\"accessToken\"]\\ \nexpires_in = result[\"expiresIn\"]\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"api/oauth/access-token/{platformId}/refresh\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'refreshToken': '\" + refreshToken + @\"'\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"refreshToken\\\": \\\"\" + refreshToken + \"\\\"\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/api/oauth/access-token/\" + platform_id + \"/refresh\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    String responseBody = response.body().string();\\ \n    // Parse JSON response to extract new accessToken and expiresIn\\ \n    system.out.println(responseBody);\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/api/oauth/access-token/:platformid/refresh' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>' \\\\ \n-H 'Content-Type: application/json' \\\\ \n--data-raw '{\\ \n  \"refreshToken\": \"your_refresh_token\"\\ \n}'"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refreshToken": {
                    "type": "string",
                    "x-stoplight": {
                      "id": "lusq8h4fq87x0"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      }
    },
    "/admin/platforms": {
      "get": {
        "summary": "Get Platforms",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns an object with a **platforms** field containing an array of Platforms registrations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "platforms": [
                        {
                          "url": "https://platform.org",
                          "clientId": "10000000000001",
                          "name": "Platform 1",
                          "authenticationEndpoint": "https://platform.org/lti/authorize",
                          "authConfig": {
                            "key": "https://platform.org/lti/security/jwks",
                            "method": "JWK_SET"
                          },
                          "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                          "id": "f33d6c450b7632c1ff87586c4f150eee",
                          "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                          "active": true
                        },
                        {
                          "url": "https://platform.org",
                          "clientId": "20naAWuw8m4SGVH",
                          "name": "Platform 2",
                          "authenticationEndpoint": "https://platform.org/mod/lti/auth.php",
                          "authConfig": {
                            "method": "JWK_SET",
                            "key": "https://platform.org/mod/lti/certs.php"
                          },
                          "accesstokenEndpoint": "https://platform.org/mod/lti/token.php",
                          "id": "3e7853607a37ed57c980f05c03b116ed",
                          "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                          "active": true
                        }
                      ]
                    }
                  },
                  "required": [
                    "platforms"
                  ],
                  "properties": {
                    "platforms": {
                      "type": "array",
                      "description": "Array of `Platform` objects",
                      "items": {
                        "type": "object",
                        "required": [
                          "url",
                          "clientId",
                          "name",
                          "authenticationEndpoint",
                          "authConfig",
                          "accesstokenEndpoint",
                          "id",
                          "publicKey",
                          "active"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "description": "Platform URL"
                          },
                          "clientId": {
                            "type": "string",
                            "description": "Platform client ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Platform name"
                          },
                          "authenticationEndpoint": {
                            "type": "string",
                            "description": "Platform authentication endpoint"
                          },
                          "authConfig": {
                            "type": "object",
                            "required": [
                              "key",
                              "method"
                            ],
                            "description": "Platform token authentication configuration object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Platform token authentication key"
                              },
                              "method": {
                                "enum": [
                                  "JWK_SET",
                                  "JWK_KEY",
                                  "RSA_KEY"
                                ],
                                "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**"
                              }
                            }
                          },
                          "accesstokenEndpoint": {
                            "type": "string",
                            "description": "Platform access token endpoint"
                          },
                          "id": {
                            "type": "string",
                            "description": "Platform ID"
                          },
                          "publicKey": {
                            "type": "string",
                            "description": "Platform public key"
                          },
                          "active": {
                            "type": "boolean",
                            "description": "When true, the registration is active and allowed to launch"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "platforms": [
                        {
                          "url": "https://platform.org",
                          "clientId": "10000000000001",
                          "name": "Platform 1",
                          "authenticationEndpoint": "https://platform.org/lti/authorize",
                          "authConfig": {
                            "key": "https://platform.org/lti/security/jwks",
                            "method": "JWK_SET"
                          },
                          "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                          "id": "f33d6c450b7632c1ff87586c4f150eee",
                          "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                          "active": true
                        },
                        {
                          "url": "https://platform.org",
                          "clientId": "20naAWuw8m4SGVH",
                          "name": "Platform 2",
                          "authenticationEndpoint": "https://platform.org/mod/lti/auth.php",
                          "authConfig": {
                            "method": "JWK_SET",
                            "key": "https://platform.org/mod/lti/certs.php"
                          },
                          "accesstokenEndpoint": "https://platform.org/mod/lti/token.php",
                          "id": "3e7853607a37ed57c980f05c03b116ed",
                          "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                          "active": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-admin-platforms",
        "x-stoplight": {
          "id": "82d6jbe0tmx5t"
        },
        "description": "Get all registered platforms\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = 'https://your.ltiaas.com/admin/platforms';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nurl = \"https://your.ltiaas.com/admin/platforms\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"admin/platforms\");\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms/\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/admin/platforms' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "id",
            "description": "Retrieves a specific Platform by ID."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "url",
            "description": "Filters platforms by URL (i.e. iss)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "clientId",
            "description": "Filters platforms by client ID"
          }
        ],
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      },
      "parameters": [],
      "post": {
        "summary": "Register Platform",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns the newly created Platform.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example 1": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  },
                  "required": [
                    "url",
                    "clientId",
                    "name",
                    "authenticationEndpoint",
                    "authConfig",
                    "accesstokenEndpoint",
                    "id",
                    "publicKey",
                    "active"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Platform URL"
                    },
                    "clientId": {
                      "type": "string",
                      "description": "Platform client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Platform name"
                    },
                    "authenticationEndpoint": {
                      "type": "string",
                      "description": "Platform authentication endpoint"
                    },
                    "authConfig": {
                      "type": "object",
                      "required": [
                        "key",
                        "method"
                      ],
                      "description": "Platform access token endpoint",
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "Platform token authentication key"
                        },
                        "method": {
                          "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**",
                          "enum": [
                            "JWK_SET",
                            "JWK_KEY",
                            "RSA_KEY"
                          ]
                        }
                      }
                    },
                    "accesstokenEndpoint": {
                      "type": "string",
                      "description": "Platform access token endpoint"
                    },
                    "id": {
                      "type": "string",
                      "description": "Platform ID"
                    },
                    "publicKey": {
                      "type": "string",
                      "description": "Platform Public Key"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "true if the registration is active and allowed to launch"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "post-admin-platforms",
        "x-stoplight": {
          "id": "yfn9pjw5p0jzw"
        },
        "description": "Register a new platform\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  url: 'https://platform.org',\\ \n  clientId: '10000000000001',\\ \n  name: 'Platform 3',\\ \n  authenticationEndpoint: 'https://platform.org/lti/authorize2',\\ \n  authConfig: {\\ \n    key: 'https://platform.org/lti/security/jwks2',\\ \n    method: 'JWK_SET'\\ \n  },\\ \n  accesstokenEndpoint: 'https://platform.org/login/oauth2/token'\\ \n};\\ \n\\ \nconst url = 'https://your.ltiaas.com/admin/platforms';\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \ndata = {\\ \n    \"url\": \"https://platform.org\",\\ \n    \"clientId\": \"10000000000001\",\\ \n    \"name\": \"Platform 1\",\\ \n    \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n    \"authConfig\": {\\ \n        \"key\": \"https://platform.org/lti/security/jwks\",\\ \n        \"method\": \"JWK_SET\"\\ \n    },\\ \n    \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n}\\ \nurl = \"https://your.ltiaas.com/admin/platforms\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n};\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms/',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \nrequest.body = JSON.dump({\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest(\"admin/platforms\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'url': 'https://platform.org',\\ \n  'clientId': '10000000000001',\\ \n  'name': 'Platform 1',\\ \n  'authenticationEndpoint': 'https://platform.org/lti/authorize',\\ \n  'authConfig': {\\ \n    'key': 'https://platform.org/lti/security/jwks',\\ \n    'method': 'JWK_SET'\\ \n  },\\ \n  'accesstokenEndpoint': 'https://platform.org/login/oauth2/token'\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"url\\\": \\\"https://platform.org\\\",\\ \n  \\\"clientId\\\": \\\"10000000000001\\\",\\ \n  \\\"name\\\": \\\"Platform 1\\\",\\ \n  \\\"authenticationEndpoint\\\": \\\"https://platform.org/lti/authorize\\\",\\ \n  \\\"authConfig\\\": {\\ \n    \\\"key\\\": \\\"https://platform.org/lti/security/jwks\\\",\\ \n    \\\"method\\\": \\\"JWK_SET\\\"\\ \n  },\\ \n  \\\"accesstokenEndpoint\\\": \\\"https://platform.org/login/oauth2/token\\\"\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post(body)\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/admin/platforms' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>' \\\\ \n--data-raw '{\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n}'"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "x-examples": {
                  "Example 1": {
                    "url": "https://platform.org",
                    "clientId": "10000000000001",
                    "name": "Platform 1",
                    "authenticationEndpoint": "https://platform.org/lti/authorize",
                    "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                    "authConfig": {
                      "key": "https://platform.org/lti/security/jwks",
                      "method": "JWK_SET"
                    }
                  }
                },
                "required": [
                  "url",
                  "clientId",
                  "name",
                  "authenticationEndpoint",
                  "accesstokenEndpoint",
                  "authConfig"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Platform URL (i.e. iss)"
                  },
                  "clientId": {
                    "type": "string",
                    "description": "Platform client ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Platform name"
                  },
                  "authenticationEndpoint": {
                    "type": "string",
                    "description": "Platform authentication endpoint"
                  },
                  "accesstokenEndpoint": {
                    "type": "string",
                    "description": "Platform access token endpoint"
                  },
                  "authConfig": {
                    "type": "object",
                    "required": [
                      "key",
                      "method"
                    ],
                    "description": "Platform token authentication configuration object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Platform token authentication key"
                      },
                      "method": {
                        "enum": [
                          "JWK_SET",
                          "JWK_KEY",
                          "RSA_KEY"
                        ],
                        "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**."
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "url": "https://platform.org",
                    "clientId": "10000000000001",
                    "name": "Platform 1",
                    "authenticationEndpoint": "https://platform.org/lti/authorize",
                    "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                    "authConfig": {
                      "key": "https://platform.org/lti/security/jwks",
                      "method": "JWK_SET"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/platforms/{platformID}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "platformID",
          "in": "path",
          "required": true,
          "description": "The platform ID"
        }
      ],
      "get": {
        "summary": "Get Platform by ID",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns an object with a single Platform registration.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  },
                  "required": [
                    "url",
                    "clientId",
                    "name",
                    "authenticationEndpoint",
                    "authConfig",
                    "accesstokenEndpoint",
                    "id",
                    "publicKey",
                    "active"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Platform URL"
                    },
                    "clientId": {
                      "type": "string",
                      "description": "Platform client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Platform name"
                    },
                    "authenticationEndpoint": {
                      "type": "string",
                      "description": "Platform authentication endpoint"
                    },
                    "authConfig": {
                      "type": "object",
                      "description": "Platform token authentication configuration object",
                      "required": [
                        "key",
                        "method"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "Platform token authentication key"
                        },
                        "method": {
                          "enum": [
                            "JWK_SET",
                            "JWK_KEY",
                            "RSA_KEY"
                          ],
                          "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**"
                        }
                      }
                    },
                    "accesstokenEndpoint": {
                      "type": "string",
                      "description": "Platform access token endpoint"
                    },
                    "id": {
                      "type": "string",
                      "description": "Platform ID"
                    },
                    "publicKey": {
                      "type": "string",
                      "description": "Platform public key"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "When true, the registration is active and allowed to launch"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-admin-platforms-id",
        "x-stoplight": {
          "id": "2hrtim8yjgzcq"
        },
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = `https://your.ltiaas.com/admin/platforms/${platform_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.get(url, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import urllib.parse\\ \n\\ \nurl = f\"https://your.ltiaas.com/admin/platforms/{platform_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.get(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms' + $platform_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms/#{platform_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Get.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"admin/platforms/{platformId}\");\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nRestResponse response = await client.ExecuteAsync(request);\\ \nConsole.WriteLine(response.Content);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nString encoded_id = URLEncoder.encode(line_item_id, StandardCharsets.UTF_8);\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms/\" + platform_id)\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .get()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X GET 'https://your.ltiaas.com/admin/platforms/:platformid' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "description": "Get registered platform by ID\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      },
      "put": {
        "summary": "Update Platform by ID",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns the platform with the matching platformID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "x-examples": {
                    "Example": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  },
                  "required": [
                    "url",
                    "clientId",
                    "name",
                    "authenticationEndpoint",
                    "authConfig",
                    "accesstokenEndpoint",
                    "id",
                    "publicKey",
                    "active"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Platform URL"
                    },
                    "clientId": {
                      "type": "string",
                      "description": "Platform client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Platform name"
                    },
                    "authenticationEndpoint": {
                      "type": "string",
                      "description": "Platform authentication endpoint"
                    },
                    "authConfig": {
                      "type": "object",
                      "required": [
                        "key",
                        "method"
                      ],
                      "description": "Platform access token endpoint",
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "Platform token authentication key"
                        },
                        "method": {
                          "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**",
                          "enum": [
                            "JWK_SET",
                            "JWK_KEY",
                            "RSA_KEY"
                          ]
                        }
                      }
                    },
                    "accesstokenEndpoint": {
                      "type": "string",
                      "description": "Platform access token endpoint"
                    },
                    "id": {
                      "type": "string",
                      "description": "Platform ID"
                    },
                    "publicKey": {
                      "type": "string",
                      "description": "Platform Public Key"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "true if the registration is active and allowed to launch"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "url": "https://platform.org",
                      "clientId": "10000000000001",
                      "name": "Platform 1",
                      "authenticationEndpoint": "https://platform.org/lti/authorize",
                      "authConfig": {
                        "key": "https://platform.org/lti/security/jwks",
                        "method": "JWK_SET"
                      },
                      "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                      "id": "f33d6c450b7632c1ff87586c4f150eee",
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymGcob5nh7kKHWCNQ3J6\n4dX5fknKrwCifFtt32ov09IUHWj2WwTSnZOvi43a3IpJ+zCj9dUnW9NF+Axx+s/X\nNUIcJWLAZtf3QkDAChJZeEEsxptFm9bFfKZjXlq1e5XFFetZBgUN0d+KDJYZP8BV\nQ1bAIwRcrwDDqVXdmYJlwfejstSm8oPkW7NJv6HBsqcloJVlwIfl5ltZfAUiKgIP\nuecHkD16ma712VxSDhZALhhtgGNRbur64nfkEWenYjCyECWMEFJBBw+ef2FAR5g/\nWtvzvkHZmoG79p/9eBw1wM09edT/GnXMXrv9CLWaTz7aTrn0GCBSK/K1unBaF8Q4\nbzRDDrbETKSLc9TPbD7xw+RIMOjLnJXUSz/2FfqmJggzzBOnISwQsuFPIK8IaCdS\nM+CHpHuUHMY8cPNgn63HiWEuy9evrny6gAK40pIgCpTGdsf0EYvOYn/kP7wElCDf\nmogRFJKBRH7BN0Syk+aMmt1t4mPP1QTk3HdfUmdZTU3ueeaIJ18m6Kif88wtij4F\n6PZDrs6h5BCEZUtpl78+H030TSm7OrY9SlOPcD/K+4fZlrkiuFc2hhjb1awTHd2I\nGzWZ8ur3Dr7V/Zgdm6Tio33ot8dEhJcKXbC8V1jhiVtewyDGqFSOBTRuhxNIt0/0\n24z6Wb9bMUH/ztaywZjkIesCAwEAAQ==\n-----END PUBLIC KEY-----\n",
                      "active": true
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "put-admin-platforms-id",
        "x-stoplight": {
          "id": "wsfsxs8tguf1y"
        },
        "description": "Update a platform by ID\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst data = {\\ \n  url: 'https://platform.org',\\ \n  clientId: '10000000000001',\\ \n  name: 'Platform 3',\\ \n  authenticationEndpoint: 'https://platform.org/lti/authorize2',\\ \n  authConfig: {\\ \n    key: 'https://platform.org/lti/security/jwks2',\\ \n    method: 'JWK_SET'\\ \n  },\\ \n  accesstokenEndpoint: 'https://platform.org/login/oauth2/token'\\ \n};\\ \n\\ \nconst url = `https://your.ltiaas.com/admin/platforms/${platform_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.put(url, data, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \ndata = {\\ \n    \"url\": \"https://platform.org\",\\ \n    \"clientId\": \"10000000000001\",\\ \n    \"name\": \"Platform 1\",\\ \n    \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n    \"authConfig\": {\\ \n        \"key\": \"https://platform.org/lti/security/jwks\",\\ \n        \"method\": \"JWK_SET\"\\ \n    },\\ \n    \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n}\\ \nurl = f\"https://your.ltiaas.com/admin/platforms/{platform_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.put(url, data=data, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \n$data = {\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n};\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms/' + $platform_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"PUT\",\\ \n  CURLOPT_POSTFIELDS => $data,\\ \n));\\ \n\\ \n$response = curl_exec($curl);\\ \ncurl_close($curl);\\ \n\\ \n$obj = json_decode($response);\\ \nvar_dump($obj);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms/#{platform_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Put.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \nrequest.body = JSON.dump({\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n})\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"admin/platforms/{platformId}\", Method.Put);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \nrequest.AddHeader(\"Accept\", \"application/json\");\\ \nvar body = @\"{\\ \n  'url': 'https://platform.org',\\ \n  'clientId': '10000000000001',\\ \n  'name': 'Platform 1',\\ \n  'authenticationEndpoint': 'https://platform.org/lti/authorize',\\ \n  'authConfig': {\\ \n    'key': 'https://platform.org/lti/security/jwks',\\ \n    'method': 'JWK_SET'\\ \n  },\\ \n  'accesstokenEndpoint': 'https://platform.org/login/oauth2/token'\\ \n}\";\\ \nrequest.AddStringBody(body, DataFormat.Json);\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequestBody body = RequestBody.create(mediaType, \"{\\ \n  \\\"url\\\": \\\"https://platform.org\\\",\\ \n  \\\"clientId\\\": \\\"10000000000001\\\",\\ \n  \\\"name\\\": \\\"Platform 1\\\",\\ \n  \\\"authenticationEndpoint\\\": \\\"https://platform.org/lti/authorize\\\",\\ \n  \\\"authConfig\\\": {\\ \n    \\\"key\\\": \\\"https://platform.org/lti/security/jwks\\\",\\ \n    \\\"method\\\": \\\"JWK_SET\\\"\\ \n  },\\ \n  \\\"accesstokenEndpoint\\\": \\\"https://platform.org/login/oauth2/token\\\"\\ \n}\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admain/platforms/\" + platform_id)\\ \n  .put(body)\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X PUT 'https://your.ltiaas.com/admin/platforms/:platformid' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>' \\\\ \n--data-raw '{\\ \n  \"url\": \"https://platform.org\",\\ \n  \"clientId\": \"10000000000001\",\\ \n  \"name\": \"Platform 1\",\\ \n  \"authenticationEndpoint\": \"https://platform.org/lti/authorize\",\\ \n  \"authConfig\": {\\ \n    \"key\": \"https://platform.org/lti/security/jwks\",\\ \n    \"method\": \"JWK_SET\"\\ \n  },\\ \n  \"accesstokenEndpoint\": \"https://platform.org/login/oauth2/token\"\\ \n}'"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "x-examples": {
                  "Example 1": {
                    "url": "https://platform.org",
                    "clientId": "10000000000001",
                    "name": "Platform 1",
                    "authenticationEndpoint": "https://platform.org/lti/authorize",
                    "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                    "authConfig": {
                      "key": "https://platform.org/lti/security/jwks",
                      "method": "JWK_SET"
                    }
                  }
                },
                "required": [
                  "url",
                  "clientId",
                  "name",
                  "authenticationEndpoint",
                  "accesstokenEndpoint",
                  "authConfig"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Platform URL (i.e. iss)"
                  },
                  "clientId": {
                    "type": "string",
                    "description": "Platform client ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Platform name"
                  },
                  "authenticationEndpoint": {
                    "type": "string",
                    "description": "Platform authentication endpoint"
                  },
                  "accesstokenEndpoint": {
                    "type": "string",
                    "description": "Platform access token endpoint"
                  },
                  "authConfig": {
                    "type": "object",
                    "required": [
                      "key",
                      "method"
                    ],
                    "description": "Platform token authentication configuration object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Platform token authentication key"
                      },
                      "method": {
                        "enum": [
                          "JWK_SET",
                          "JWK_KEY",
                          "RSA_KEY"
                        ],
                        "description": "Platform token authentication method. **MUST be one of JWK_SET, JWK_KEY or RSA_KEY**."
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "url": "https://platform.org",
                    "clientId": "10000000000001",
                    "name": "Platform 1",
                    "authenticationEndpoint": "https://platform.org/lti/authorize",
                    "accesstokenEndpoint": "https://platform.org/login/oauth2/token",
                    "authConfig": {
                      "key": "https://platform.org/lti/security/jwks",
                      "method": "JWK_SET"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Platform by ID",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "204": {
            "description": "Returns `204` if the Platform is successfully deleted."
          }
        },
        "operationId": "delete-admin-platforms-id",
        "x-stoplight": {
          "id": "jtk3m2x5o3srx"
        },
        "description": "Get registered platform by ID\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = `https://your.ltiaas.com/api/lineitems/${platform_id}`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  await axios.delete(url, config);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \nimport urllib.parse\\ \n\\ \nurl = f\"https://your.ltiaas.com/admin/platforms/{platform_id}\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nrequests.delete(url, headers=headers)"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms/' + $platform_id,\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\\ \n));\\ \n\\ \ncurl_exec($curl);\\ \ncurl_close($curl);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"cgi\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms/#{platform_id}\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Delete.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nhttps.request(request)"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"admin/platforms/{platformId}\", Method.Delete);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"text/plain\");\\ \nRequestBody body = RequestBody.create(mediaType, \"\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms/\" + platform_id)\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .delete()\\ \n  .build();\\ \n\\ \ntry {\\ \n    client.newCall(request).execute();\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X DELETE 'https://your.ltiaas.com/admin/platforms/:platformid' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "requestBody": {
          "description": "This endpoint receives no parameters or body."
        }
      }
    },
    "/admin/platforms/{platformID}/activate": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "platformID",
          "in": "path",
          "required": true,
          "description": "The platform ID"
        }
      ],
      "post": {
        "summary": "Activate Platform by ID",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns `200` if the Platform is successfully activated."
          }
        },
        "operationId": "post-admin-platforms-platformID-activate",
        "x-stoplight": {
          "id": "eom714kb5i4cs"
        },
        "description": "Dynamically registered Platforms have to be activated if the the `Auto Activate Dynamically Registered Platforms` option was turned off during the LTIAAS onboarding process.\n\nAny platform can be activated using this API.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = `https://your.ltiaas.com/admin/platforms/${platform_id}/activate`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, {}, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \nurl = f\"https://your.ltiaas.com/admin/platforms/{platform_id}/activate\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms/' + $platform_id + '/activate',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n));\\ \n\\ \ncurl_exec($curl);\\ \ncurl_close($curl);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms/#{platform_id}/activate\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"admin/platforms/{platformId}/activate\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms\" + platform_id + \"/activate\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/admin/platforms/:platformid/activate' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "requestBody": {
          "description": "This endpoint receives no parameters."
        },
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      }
    },
    "/admin/platforms/{platformID}/deactivate": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "platformID",
          "in": "path",
          "required": true,
          "description": "The platform ID"
        }
      ],
      "post": {
        "summary": "Deactivate Platform by ID",
        "tags": [
          "Platforms"
        ],
        "responses": {
          "200": {
            "description": "Returns `200` if the Platform is successfully deactivated."
          }
        },
        "operationId": "post-admin-platforms-platformID-deactivate",
        "x-stoplight": {
          "id": "wksscr0xd35jb"
        },
        "description": "Dynamically registered Platforms will be be activated if the the `Auto Activate Dynamically Registered Platforms` option was turned on during the LTIAAS onboarding process.\n\nAny platform can be deactivated using this API.\n\n<table class='api-authentication-table'>\n  <tr>\n    <th>API Authentication Method</th>\n    <th>Supported</th>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#ltik-based-authentication\"><code>LTIK-AUTH-V2</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#service-key-based-authentication\"><code>SERVICE-AUTH-V1</code></a></td>\n    <td></td>\n  </tr>\n  <tr>\n    <td><a href=\"/guides/api/authentication#bearer-api-key-based-authentication\"><code>Bearer</code></a></td>\n    <td>✅</td>\n  </tr>\n</table>",
        "x-code-samples": [
          {
            "highlight": "javascript",
            "language": "node",
            "logoClass": "nodejs",
            "variant": "axios",
            "source": "const axios = require('axios');\\ \n\\ \nconst url = `https://your.ltiaas.com/admin/platforms/${platform_id}/deactivate`;\\ \nconst config = {\\ \n  headers: {    \\ \n    'Authorization': `Bearer ${API_KEY}`\\ \n  }\\ \n};\\ \n\\ \ntry {\\ \n  const response = await axios.post(url, {}, config);\\ \n  console.log(response.data);\\ \n} catch(error) {\\ \n  console.log(error);\\ \n}"
          },
          {
            "highlight": "python",
            "language": "python",
            "logoClass": "python",
            "variant": "requests",
            "source": "import requests\\ \n\\ \nurl = f\"https://your.ltiaas.com/admin/platforms/{platform_id}/deactivate\"\\ \nheaders = {\\ \n    \"Authorization\": f\"Bearer {API_KEY}\"\\ \n}\\ \nresponse = requests.post(url, headers=headers)\\ \nprint(response.json())"
          },
          {
            "highlight": "php",
            "language": "php",
            "logoClass": "php",
            "variant": "cURL",
            "source": "$curl = curl_init();\\ \n\\ \ncurl_setopt_array($curl, array(\\ \n  CURLOPT_URL => 'https://your.ltiaas.com/admin/platforms/' + $platform_id + '/deactivate',\\ \n  CURLOPT_RETURNTRANSFER => true,\\ \n  CURLOPT_HTTPHEADER => array(\\ \n    'Authorization: Bearer ' + $API_KEY\\ \n  ),\\ \n  CURLOPT_CUSTOMREQUEST => \"POST\",\\ \n));\\ \n\\ \ncurl_exec($curl);\\ \ncurl_close($curl);"
          },
          {
            "highlight": "ruby",
            "language": "ruby",
            "logoClass": "ruby",
            "variant": "Net::HTTP",
            "source": "require \"json\"\\ \nrequire \"uri\"\\ \nrequire \"net/http\"\\ \n\\ \nurl = URI(\"https://your.ltiaas.com/admin/platforms/#{platform_id}/deactivate\")\\ \n\\ \nhttps = Net::HTTP.new(url.host, url.port)\\ \nhttps.use_ssl = true\\ \n\\ \nrequest = Net::HTTP::Post.new(url)\\ \nrequest[\"Authorization\"] = \"Bearer #{API_KEY}\"\\ \n\\ \nresponse = https.request(request)\\ \nputs response.read_body"
          },
          {
            "highlight": "csharp",
            "language": "csharp",
            "logoClass": "csharp",
            "variant": "RestSharp",
            "source": "using RestSharp;\\ \nusing System.Web;\\ \n\\ \nvar client = new RestClient(\"https://your.ltiaas.com\");\\ \nvar request = new RestRequest($\"admin/platforms/{platformId}/deactivate\", Method.Post);\\ \nrequest.AddHeader(\"Authorization\", $\"Bearer {API_KEY}\");\\ \n\\ \nawait client.ExecuteAsync(request);"
          },
          {
            "highlight": "java",
            "language": "java",
            "logoClass": "java",
            "variant": "OkHttp",
            "source": "OkHttpClient client = new OkHttpClient().newBuilder().build();\\ \nMediaType mediaType = MediaType.parse(\"application/json\");\\ \nRequest request = new Request.Builder()\\ \n  .url(\"https://your.ltiaas.com/admin/platforms\" + platform_id + \"/deactivate\")\\ \n  .addHeader(\"Authorization\", \"Bearer \" + API_KEY)\\ \n  .addHeader(\"Accept\", \"application/json\")\\ \n  .post()\\ \n  .build();\\ \n\\ \ntry {\\ \n    Response response = client.newCall(request).execute();\\ \n    system.out.println(response.body().string());\\ \n} catch (IOException e) {\\ \n    system.out.println(e.getMessage());\\ \n}"
          },
          {
            "highlight": "bash",
            "language": "curl",
            "logoClass": "bash",
            "variant": "cURL",
            "source": "curl -L -X POST 'https://your.ltiaas.com/admin/platforms/:platformid/deactivate' \\\\ \n-H 'Accept: application/json' \\\\ \n-H 'Authorization: Bearer <API_KEY>'"
          }
        ],
        "requestBody": {
          "description": "This endpoint receives no parameters."
        },
        "security": [
          {
            "Bearer-Token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {},
    "requestBodies": {},
    "securitySchemes": {
      "LTIK-AUTH-V2": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header",
        "description": "An http Header who's value is of the format: `LTIK-AUTH-V2 <API_KEY>:<ltik>`. Where <API_KEY> should be replaced with your static API Key provided by LTIAAS and <ltik> is the ltik value passed to you on each new launch of your tool. Learn more about this in the <a href=\"/guides/api/authentication\">Authenticating API requests</a> guide."
      },
      "SERVICE-AUTH-V1": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header",
        "description": "An http Header who's value is of the format: `SERVICE-AUTH-V1 <API_KEY>:<SERVICE_KEY>`. Where <API_KEY> should be replaced with your static API Key provided by LTIAAS and <SERVICE_KEY> is the service key value obtained from an idtoken. Learn more about this in the <a href=\"/guides/api/authentication\">Authenticating API requests</a> guide."
      },
      "Bearer-Token": {
        "name": "Authorization",
        "type": "apiKey",
        "in": "header",
        "description": "An http Header who's value is of the format: `Bearer <API_KEY>`. Where <API_KEY> should be replaced with your static API Key provided by LTIAAS. Learn more about this in the <a href=\"/guides/api/authentication\">Authenticating API requests</a> guide."
      }
    }
  }
}