Skip to Content

Blocks

Content blocks within dynamic page activities.

Get image block

GET/api/v1/blocks/image
User session only (API tokens not accepted)

Retrieve an image block by its UUID.

Query parameters

block_uuidstringrequired

Returns

BlockRead: Image block returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 404 Image block not found
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Create image block

POST/api/v1/blocks/image
User session only (API tokens not accepted)

Upload an image file and create a new image block attached to the given activity.

Request bodymultipart/form-datarequired

file_objectfilerequired
activity_uuidstringrequired

Returns

BlockRead: Image block created and returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Get video block

GET/api/v1/blocks/video
User session only (API tokens not accepted)

Retrieve a video block by its UUID.

Query parameters

block_uuidstringrequired

Returns

BlockRead: Video block returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 404 Video block not found
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Create video block

POST/api/v1/blocks/video
User session only (API tokens not accepted)

Upload a video file and create a new video block attached to the given activity.

Request bodymultipart/form-datarequired

file_objectfilerequired
activity_uuidstringrequired

Returns

BlockRead: Video block created and returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Get PDF block

GET/api/v1/blocks/pdf
User session only (API tokens not accepted)

Retrieve a PDF block by its UUID.

Query parameters

block_uuidstringrequired

Returns

BlockRead: PDF block returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 404 PDF block not found
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Create PDF block

POST/api/v1/blocks/pdf
User session only (API tokens not accepted)

Upload a PDF file and create a new PDF block attached to the given activity.

Request bodymultipart/form-datarequired

file_objectfilerequired
activity_uuidstringrequired

Returns

BlockRead: PDF block created and returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Get audio block

GET/api/v1/blocks/audio
User session only (API tokens not accepted)

Retrieve an audio block by its UUID.

Query parameters

block_uuidstringrequired

Returns

BlockRead: Audio block returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 404 Audio block not found
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Create audio block

POST/api/v1/blocks/audio
User session only (API tokens not accepted)

Upload an audio file and create a new audio block attached to the given activity.

Request bodymultipart/form-datarequired

file_objectfilerequired
activity_uuidstringrequired

Returns

BlockRead: Audio block created and returned.

idinteger
block_typeBlockTypeEnum
BLOCK_QUIZBLOCK_VIDEOBLOCK_DOCUMENT_PDFBLOCK_IMAGEBLOCK_AUDIOBLOCK_CUSTOM
contentContent
org_idinteger
course_idinteger
chapter_idinteger | null
activity_idinteger
block_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 422 Validation Error: HTTPValidationError
Request
Response
{
  "id": 1,
  "block_type": "BLOCK_QUIZ",
  "content": {},
  "org_id": 1,
  "course_id": 1,
  "chapter_id": 1,
  "activity_id": 1,
  "block_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}