Resources

Preview a Document

get

Returns a redirect (303) to a document preview iframe URL for the specified resource.

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/0123456789/document-preview?documentId=abcdefg"

Authorizations
Path parameters
resourceIdstringRequired

The unique identifier for the resource

Query parameters
documentIdstringOptional

The document ID to preview (optional, defaults to the latest version's document)

Responses
303
Redirect to document preview iframe URL
get
GET /api/resources/{resourceId}/document-preview HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

List Formats for a Media Preview

get

Lists the sources to use in a video or audio tag for a given resource.

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/0123456789/media-preview-sources"

Authorizations
Path parameters
resourceIdstringRequired

The unique identifier for the resource

Query parameters
mediaObjectIdstringOptional

The specific media object Id requested for previewing (optional)

Responses
200
Sources for the preview
application/json
get
GET /api/resources/{resourceId}/media-preview-sources HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "items": [
    {
      "mime_type": "text",
      "url": "text",
      "target": "text",
      "definition": "text",
      "download_url": "text"
    }
  ]
}

Create a Resource

post

Create a resource.

Upload Example:

# Create the resource record
curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources"
data.json:
{
  "title": "The War of the Worlds",
  "description": "Watch out for black smoke, and heat rays. The Martians are invading!",
  "licenseIds": ["attribution_noderivs"],
  "licenseSpecs": "You are free to: Share — copy and redistribute the material in any medium or format",
  "thumbnail": {
    "url": "http://lor-images.s3.amazonaws.com/subjects/english-language-arts/English-05-262x147.jpg",
    "description": "Close up of fountain pen on old letter"
  },
  "gradeIds": ["1", "2", "3"],
  "scopeIds": [ "PUBLIC" ],
  "subjectIds": ["math", "specialty"],
  "type": "discussion",
  "tags": ["Science Fiction", "Martian People"],
  "upload": {
    "contentType": "application/pdf",
    "checksum": "crU95OObMRyOS/XyvDD7Tw=="
  }
}

# Upload the actual file
curl -X PUT -H "Content-Type: application/pdf" -H "Content-MD5: <base64 encoded md5>" --data @war-of-the-worlds.pdf <response.meta.uploadUrl>

# Let Commons know the upload is complete
curl -H "X-Session-ID: 0123456789" <response.meta.uploadSuccessRedirectUrl>

Export Example:

# Create the resource record
curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources"
data.json:
{
  "title": "The War of the Worlds",
  "description": "Watch out for black smoke, and heat rays. The Martians are invading!",
  "licenseIds": ["attribution"],
  "licenseSpecs": "You are free to: Share — copy and redistribute the material in any medium or format",
  "thumbnail": {
    "url": "http://lor-images.s3.amazonaws.com/subjects/english-language-arts/English-05-262x147.jpg",
    "description": "Close up of fountain pen on old letter"
  },
  "gradeIds": ["1", "2", "3"],
  "scopeIds": [ "PUBLIC" ],
  "subjectIds": ["math", "specialty"],
  "type": "discussion",
  "tags": ["Science Fiction", "Martian People"],
  "export": {
    "contentType": "application/pdf",
    "url": "https://canvas.instructure.com/files/1337/download?download_frd=1&verifier=LIMRsQ4AbWNPgMSoQHkf5SsxULnn61mevsdpZY9X"
  }
}
Authorizations
Body
titlestring · min: 1 · max: 250Required

The title of the resource.

descriptionstring · min: 1 · max: 2000Required

The description of the resource.

licenseSpecsstring · min: 1 · max: 400Optional

Details of the resource's licence terms.

scopeIdsstring[]Optional

An array of scope ids the resource will be accessible to.

typestring · enumRequired

The type of resource

Possible values:
tagsstring[] · min: 1 · max: 10Required

An array of tags to associate with the resource.

mediaObjectIdstringOptional

The ID of a media object in Canvas that is required when a media file (audio/video) is being exported from Canvas

Responses
200
Success
application/json
post
POST /api/resources HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 432

{
  "title": "text",
  "description": "text",
  "licenseIds": [
    "copyright_reserve"
  ],
  "licenseSpecs": "text",
  "thumbnail": {
    "url": "https://example.com",
    "description": "text"
  },
  "gradeIds": [
    "K"
  ],
  "scopeIds": [
    "text"
  ],
  "subjectIds": [
    "englishlanguagearts"
  ],
  "type": "course",
  "tags": [
    "text"
  ],
  "outcomes": [
    {
      "id": "text"
    }
  ],
  "export": {
    "courseId": 1,
    "url": "text",
    "contentType": "application/pdf"
  },
  "upload": {
    "contentType": "text",
    "checksum": "text"
  },
  "mediaObjectId": "text"
}
{
  "id": "text",
  "title": "text",
  "description": "text",
  "account": {
    "id": "text",
    "name": "text"
  },
  "authors": [
    {
      "id": "text",
      "name": "text",
      "avatarUrl": "text"
    }
  ],
  "courseOutlines": {
    "assignments": [
      {
        "id": "text",
        "title": "text"
      }
    ],
    "discussions": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "outcomes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "modules": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "pages": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "quizzes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ]
  },
  "createDate": "text",
  "createUserId": "text",
  "isCreator": true,
  "licenseIds": [
    "text"
  ],
  "licenseSpecs": "text",
  "meta": {
    "links": {
      "download": "text",
      "review": "text",
      "self": "text"
    },
    "permissions": {
      "read": true,
      "write": true
    },
    "uploadSuccessRedirectUrl": "text",
    "uploadUrl": "text"
  },
  "outcomes": [
    {
      "id": "text",
      "title": "text",
      "authorityCode": "text",
      "related": "text"
    }
  ],
  "scopeIds": [
    "text"
  ],
  "sourceId": "text",
  "subjectIds": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "thumbnail": {
    "url": "text",
    "description": "text"
  },
  "type": "course",
  "updateDate": "text",
  "updateUserId": "text"
}

List Resources

get

Search through resources the current user has permission to view. The results are listed by relevance if a q parameter is present, otherwise the results are listed by update date, most recent first.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources?q=ratio&gradeIds=4,5,6&types=course,quiz"
Authorizations
Query parameters
qstringOptional

The text to search for in the title, description, tags, author name, and account name

accountIdstringOptional

If specified, public resources shared by that account are shown unless the user searching is an admin

scopeIdsstringOptional

Comma separated account, consortium(prefixed with 'consortium-'), group(prefixed with 'group-'), or user ids to filter resources by. 'PUBLIC' is also a valid value for finding public resources

sortBystring · enumOptional

The order search results are returned in. All results are returned in descending order.

Default: relevancePossible values:
sortOrderstring · enumOptional

Sort results asc or desc (default=desc).

Default: descPossible values:
authorIdsstringOptional

Comma separated ids for authors that created or shared resources to find

sizeintegerOptional

The number of results to return

Default: 24
exportStatusstring · enumOptional

The readiness of the resource for use.

Possible values:
cursorstringOptional

An identifier from a prior query to continue retrieving results for

scrollstringOptional

If present, the search will use the Scroll API. Check the meta object for the scroll ID

scrollIdstringOptional

When doing a Scroll API search, only this param is needed in order to continue the search

gradeIdsstring · enumOptional

An array of grade ids to associate with the resource

Possible values:
subjectIdsstring · enumOptional

An array of subject ids to associate with the resource

Possible values:
typestring · enumOptional

Deprecated. The type of resource

Possible values:
typesstring · enumOptional

Comma separated resource types to find

Possible values:
Responses
200
Success
application/json
get
GET /api/resources HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "items": [
    {
      "id": "text",
      "title": "text",
      "description": "text",
      "account": {
        "id": "text",
        "name": "text"
      },
      "authors": [
        {
          "id": "text",
          "name": "text",
          "avatarUrl": "text"
        }
      ],
      "averageRating": 1,
      "favoritedCount": 1,
      "createDate": "2025-07-01T00:33:19.374Z",
      "createUserId": "text",
      "gradeIds": [
        "text"
      ],
      "licenseIds": [
        "text"
      ],
      "scopeIds": [
        "text"
      ],
      "subjectIds": [
        "text"
      ],
      "tags": [
        "text"
      ],
      "thumbnail": {
        "description": "text",
        "url": "text"
      },
      "outcomes": [
        {}
      ],
      "type": "text",
      "lang": "text",
      "updateDate": "2025-07-01T00:33:19.374Z",
      "updateUserId": "text",
      "exportStatus": "incomplete",
      "isPrivate": true,
      "meta": {
        "links": {
          "self": "text"
        },
        "permissions": {
          "read": true,
          "write": true
        }
      }
    }
  ],
  "meta": {
    "facets": {
      "gradeIds": {},
      "subjectIds": {},
      "scopeIds": {},
      "type": {}
    },
    "count": 1,
    "cursor": "text"
  }
}

Update Meta Data for a Resource

put

Update the title, description, tags, and other meta data associated with a resource. Resource creators or administrators are allowed to update the meta data of a resource. If the resource is shared to a group then the group manager can also update the meta data of the resource.

Example:

curl -X PUT -H "X-Session-ID: 0123456789" -H "Content-Type:application/json" --data @data.json "https://lor.instructure.com/api/resources/abcdef"
data.json:
{
  "title": "The Invisible Man",
  "description": "Be careful when messing around with the refractive index",
  "export": {
    "url": "http://www.hogwartsishere.com/about/",
    "contentType": "application/pdf"
  },
  "licenseIds": ["attribution_noncommercial_sharealike"],
  "licenseSpecs": "You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material",
  "thumbnail": {
    "url": "http://lor-images.s3.amazonaws.com/subjects/english-language-arts/English-05-262x147.jpg",
    "description": "Close up of fountain pen on old letter"
  },
  "gradeIds": ["1", "2", "3"],
  "scopeIds": ["PUBLIC"],
  "subjectIds": ["math", "specialty"],
  "tags": ["Science Fiction", "Invisible People"],
  "versionNotes": "This corrects the typo on page 220."
}
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Body
titlestring · min: 1 · max: 250Optional

The title of the resource.

descriptionstring · min: 1 · max: 2000Optional

The description of the resource.

licenseSpecsstring · min: 1 · max: 400Optional

Details of the resource's licence terms.

scopeIdsstring[]Optional

An array of scope ids the resource will be accessible to.

tagsstring[] · min: 1 · max: 10Optional

An array of tags to associate with the resource.

versionNotesstring · min: 1 · max: 350Optional

Any changes that you made to the resource should be described here

Responses
200
Success
application/json
put
PUT /api/resources/{id} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 296

{
  "title": "text",
  "description": "text",
  "licenseIds": [
    "copyright_reserve"
  ],
  "licenseSpecs": "text",
  "thumbnail": {
    "url": "https://example.com",
    "description": "text"
  },
  "gradeIds": [
    "K"
  ],
  "scopeIds": [
    "text"
  ],
  "subjectIds": [
    "englishlanguagearts"
  ],
  "tags": [
    "text"
  ],
  "versionNotes": "text",
  "outcomes": [
    {
      "id": "text"
    }
  ]
}
{
  "id": "text",
  "title": "text",
  "description": "text",
  "account": {
    "id": "text",
    "name": "text"
  },
  "authors": [
    {
      "id": "text",
      "name": "text",
      "avatarUrl": "text"
    }
  ],
  "courseOutlines": {
    "assignments": [
      {
        "id": "text",
        "title": "text"
      }
    ],
    "discussions": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "outcomes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "modules": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "pages": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "quizzes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ]
  },
  "createDate": "text",
  "createUserId": "text",
  "isCreator": true,
  "licenseIds": [
    "text"
  ],
  "licenseSpecs": "text",
  "meta": {
    "links": {
      "download": "text",
      "review": "text",
      "self": "text"
    },
    "permissions": {
      "read": true,
      "write": true
    },
    "uploadSuccessRedirectUrl": "text",
    "uploadUrl": "text"
  },
  "outcomes": [
    {
      "id": "text",
      "title": "text",
      "authorityCode": "text",
      "related": "text"
    }
  ],
  "scopeIds": [
    "text"
  ],
  "sourceId": "text",
  "tags": [
    "text"
  ],
  "thumbnail": {
    "url": "text",
    "description": "text"
  },
  "type": "course",
  "updateDate": "text",
  "updateUserId": "text",
  "versions": [
    {
      "createDate": "text",
      "createUserId": "text",
      "exportStatus": "text",
      "id": "text",
      "resourceId": "text",
      "updateDate": "text",
      "updateUserId": "text",
      "versionNotes": "text"
    }
  ]
}

Remove a Single Resource from Commons

delete

Resource creators or administrators are allowed to remove a resource from Commons. If the resource was shared to a group then the group manager can also remove the resource from Commons.

Example:

curl -X DELETE -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/abcdef"
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Responses
204
Resource deleted successfully
delete
DELETE /api/resources/{id} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Report a resource

post

Report a resource as spam, infringing, or inappropriate.

Example:

curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources/1231231/report"
data.json:
{
  "reportType": "spam"
}
Authorizations
Path parameters
resourceIdstringRequired

The resourceId to mark as reported

Body
reportTypestring · enumRequired

Type of the report

Possible values:
Responses
201
Resource reported successfully
application/json
Responseobject
post
POST /api/resources/{resourceId}/report HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "reportType": "spam"
}
{}

Update a Resource with a New Version

put

Create an update for a resource by uploading a new version of the file.

Upload Example:

# Update the resource record
curl -X PUT -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources/abcdef/new-version"
data.json:
{
  "title": "The Time Traveler",
  "description": "An Adventure through time",
  "licenseIds": ["attribution_sharealike"],
  "licenseSpecs": "You are free to: Share — copy and redistribute the material in any medium or format",
  "thumbnail": {
    "url": "http://lor-images.s3.amazonaws.com/subjects/english-language-arts/English-05-262x147.jpg",
    "description": "Close up of fountain pen on old letter"
  },
  "gradeIds": ["1", "2", "3"],
  "scopeIds": ["PUBLIC"],
  "subjectIds": ["math", "specialty"],
  "tags": ["Science Fiction", "Time Travel"],
  "upload": {
    "contentType": "application/pdf",
    "checksum": "crU95OObMRyOS/XyvDD7Tw=="
  },
  "versionNotes": "This corrects the typo on page 284."
}

# Upload the actual file for the new version
curl -X PUT -H "Content-Type: application/pdf" -H "Content-MD5: <base64 encoded md5>" --data @war-of-the-worlds.pdf <response.meta.uploadUrl>

# Let Commons know the upload is complete
curl -H "X-Session-ID: 0123456789" <response.meta.uploadSuccessRedirectUrl>

Export Example:

# Update the resource record
curl -X PUT -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources/abcdef/new-version"
data.json:
{
  "title": "The Time Traveler",
  "description": "An Adventure through time!",
  "licenseIds": ["attribution_sharealike"],
  "licenseSpecs": "You are free to: Share — copy and redistribute the material in any medium or format",
  "thumbnail": {
    "url": "http://lor-images.s3.amazonaws.com/subjects/english-language-arts/English-05-262x147.jpg",
    "description": "Close up of fountain pen on old letter"
  },
  "gradeIds": ["1", "2", "3"],
  "scopeIds": ["PUBLIC"],
  "subjectIds": ["math", "specialty"],
  "tags": ["Science Fiction", "Time Travel"],
  "export": {
    "contentType": "application/pdf",
    "url": "https://canvas.instructure.com/files/1337/download?download_frd=1&verifier=LIMRsQ4AbWNPgMSoQHkf5SsxULnn61mevsdpZY9X"
  },
  "versionNotes": "This corrects the typo on page 284."
}
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Body
titlestring · min: 1 · max: 250Optional

The title of the resource.

descriptionstring · min: 1 · max: 2000Optional

The description of the resource.

licenseSpecsstring · min: 1 · max: 400Optional

Details of the resource's licence terms.

scopeIdsstring[]Optional

An array of scope ids the resource will be accessible to.

tagsstring[] · min: 1 · max: 10Required

An array of tags to associate with the resource.

versionNotesstring · min: 1 · max: 350Required

Any changes that you made to the resource should be described here

Responses
200
Success
application/json
put
PUT /api/resources/{id}/new-version HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 404

{
  "title": "text",
  "description": "text",
  "export": {
    "courseId": 1,
    "url": "text",
    "contentType": "text"
  },
  "licenseIds": [
    "copyright_reserve"
  ],
  "licenseSpecs": "text",
  "thumbnail": {
    "url": "https://example.com",
    "description": "text"
  },
  "gradeIds": [
    "K"
  ],
  "scopeIds": [
    "text"
  ],
  "subjectIds": [
    "englishlanguagearts"
  ],
  "tags": [
    "text"
  ],
  "outcomes": [
    {
      "id": "text"
    }
  ],
  "upload": {
    "contentType": "text",
    "checksum": "text"
  },
  "versionNotes": "text"
}
{
  "id": "text",
  "title": "text",
  "description": "text",
  "account": {
    "id": "text",
    "name": "text"
  },
  "authors": [
    {
      "id": "text",
      "name": "text",
      "avatarUrl": "text"
    }
  ],
  "courseOutlines": {
    "assignments": [
      {
        "id": "text",
        "title": "text"
      }
    ],
    "discussions": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "outcomes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "modules": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "pages": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "quizzes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ]
  },
  "createDate": "text",
  "createUserId": "text",
  "isCreator": true,
  "licenseIds": [
    "text"
  ],
  "licenseSpecs": "text",
  "meta": {
    "links": {
      "download": "text",
      "review": "text",
      "self": "text"
    },
    "permissions": {
      "read": true,
      "write": true
    },
    "uploadSuccessRedirectUrl": "text",
    "uploadUrl": "text"
  },
  "outcomes": [
    {
      "id": "text",
      "title": "text",
      "authorityCode": "text",
      "related": "text"
    }
  ],
  "scopeIds": [
    "text"
  ],
  "sourceId": "text",
  "thumbnail": {
    "url": "text",
    "description": "text"
  },
  "type": "course",
  "updateDate": "text",
  "updateUserId": "text",
  "versions": [
    {
      "createDate": "text",
      "createUserId": "text",
      "exportStatus": "text",
      "id": "text",
      "resourceId": "text",
      "updateDate": "text",
      "updateUserId": "text",
      "versionNotes": "text"
    }
  ]
}

Download a Resource

get

Get a redirect to a url that will download the resource.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/abcdef/download"
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Responses
303
Url where the resource can be downloaded
get
GET /api/resources/{id}/download HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Preview an Image Resource

get

Get a redirect to a resized version of the original image resource.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/abcdef/image-preview"
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Responses
303
Location Url of the preview image
get
GET /api/resources/{id}/image-preview HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Inform of Upload Being Complete

get

This is not implemented! This will start processing an upload. Remember, depending on the file size of the resource, the import process may take as long as 30 minutes.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/versions/012344564789/upload-complete"
Authorizations
Path parameters
versionIdstringRequired

The unique id of the resource version

Responses
204
No Content
get
GET /api/resources/versions/{versionId}/upload-complete HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Import Latest Version of Resource into Canvas Course

post

Import the latest version of a resource from Commons into a single or multiple Canvas courses. A successful import will partly rely on the user having the proper permissions in Canvas to import resources into the Canvas course.

Example:

curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/resources/abcdef/import"
data.json:
{
  "courses":[
      {
        "id": 220,
        "name": "Algebra 1"
      },
      {
        "id": 284,
        "name": "Partial Differential Equations"
      }
  ]
}
Authorizations
Path parameters
idstringRequired

The unique id of the resource

Body
Responses
201
No Content
post
POST /api/resources/{id}/import HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "courses": [
    {
      "id": 1,
      "name": "text"
    }
  ]
}

No content

Create a new module in a Canvas Course

post

Create a new module in a Canvas Course. Success will depend on the user having the proper permissions in Canvas to create new modules in the given course.

Example:

curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" "https://lor.instructure.com/api/resources/abcdef/modules/new"
Authorizations
Responses
201
Module created
application/json
post
POST /api/resources/modules/new HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "id": 1,
  "name": "text"
}

Create a new assignment group in a Canvas Course

post

Create a new assignment group in a Canvas Course. Success will depend on the user having the proper permissions in Canvas to create new assignment groups in the given course.

Example:

curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" "https://lor.instructure.com/api/resources/abcdef/assignment-group/new"
Authorizations
Body
Responses
201
Assignment group created
application/json
post
POST /api/resources/assignment-group/new HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "course": {
    "id": 1
  },
  "assignmentGroup": {
    "name": "text"
  }
}
{
  "id": 1,
  "name": "text"
}

Get placeholder thumbnail

get

Gets the placeholder thumbnail for a resource.

Authorizations
Responses
200
Success
application/json
get
GET /api/resources/placeholder-thumbnail HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "url": "text"
}

List Thumbnails

get

List all of the possible thumbnails that Commons provides that can be used for a resource.

Authorizations
Responses
200
Success
application/json
get
GET /api/resources/thumbnails HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "items": [
    {
      "url": "text",
      "description": "text",
      "subjectId": "text"
    }
  ]
}

List Possible Thumbnails

get

List all of the possible thumbnails that can be used for that resource. Note: For video type resources, the only thumbnail that will be listed is the one that was automatically generated from that video when it was uploaded.

Authorizations
Path parameters
idstringRequired

The unique id of the resource

Responses
200
Success
application/json
get
GET /api/resources/{id}/thumbnails HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "items": [
    {
      "url": "text",
      "description": "text",
      "subjectId": "text"
    }
  ]
}

Post a Thumbnail Image

post

Post a thumbnail image. The image needs to be a PNG, GIF, or JPEG. Animated GIFs will be decomposed and only the first frame will be kept. Animated GIFs must be well-formed. This endpoint does not accept files greater than 1 MB in size. The image will be automatically resized and cropped to 262x147 pixels (16:9 aspect ratio) in a jpg format. The image must be at least 262x147 pixels to be accepted. Thumbnails must be uploaded as multipart/form-data.

Example:

curl -X POST -H "X-Session-ID: 0123456789" -F "[email protected]" "https://lor.instructure.com/api/resources/thumbnail"
Authorizations
Body
thumbnailstring · binaryOptional

The image file to upload (PNG, GIF, or JPEG)

Responses
200
The url for the thumbnail
application/json
post
POST /api/resources/thumbnail HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 22

{
  "thumbnail": "binary"
}
{
  "url": "text"
}

Get a Single Resource

get

Get a single resource by its ID.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/abcdef"
Authorizations
Path parameters
resourceIdstringRequired

The id of the resource to retrieve

Responses
200
Success
application/json
get
GET /api/resources/{resourceId} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "title": "text",
  "description": "text",
  "account": {
    "id": "text",
    "name": "text"
  },
  "authors": [
    {
      "id": "text",
      "name": "text",
      "avatarUrl": "text"
    }
  ],
  "courseOutlines": {
    "assignments": [
      {
        "id": "text",
        "title": "text"
      }
    ],
    "discussions": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "outcomes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "modules": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "pages": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ],
    "quizzes": [
      {
        "id": 1,
        "title": "text",
        "points": 1
      }
    ]
  },
  "createDate": "text",
  "createUserId": "text",
  "isCreator": true,
  "licenseIds": [
    "text"
  ],
  "licenseSpecs": "text",
  "meta": {
    "links": {
      "download": "text",
      "review": "text",
      "self": "text"
    },
    "permissions": {
      "read": true,
      "write": true
    }
  },
  "outcomes": [
    {
      "id": "text",
      "title": "text",
      "authorityCode": "text",
      "related": "text"
    }
  ],
  "scopeIds": [
    "text"
  ],
  "sourceId": "text",
  "subjectIds": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "thumbnail": {
    "url": "text",
    "description": "text"
  },
  "type": "course",
  "updateDate": "text",
  "updateUserId": "text",
  "versions": [
    {
      "canvasdocsDocumentId": "text",
      "createDate": "text",
      "createUserId": "text",
      "exportStatus": "text",
      "fileType": "text",
      "id": "text",
      "mediaObjectDuration": "text",
      "mediaObjectId": "text",
      "mimeType": "text",
      "resourceId": "text",
      "size": 1,
      "updateDate": "text",
      "updateUserId": "text",
      "versionNotes": "text"
    }
  ]
}

Redirects from commons to canvas resource page

get

Redirects from commons to the Canvas resource page.

Example:

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/abcdef/source"
Authorizations
Path parameters
resourceIdstringRequired

The id of the resource to redirect to

Responses
302
Redirect to Canvas resource page
get
GET /api/resources/{resourceId}/source HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?