Documentation

MigrationIssue extends AbstractBaseApi

Canvas LMS Migration Issues API

Represents issues that occur during content migrations. Issues can be warnings, errors, or todos that need resolution. This is a nested resource under ContentMigration.

Tags
see
https://canvas.instructure.com/doc/api/content_migrations.html

Table of Contents

Constants

STATE_ACTIVE  = 'active'
Workflow state constants
STATE_RESOLVED  = 'resolved'
TYPE_ERROR  = 'error'
TYPE_TODO  = 'todo'
Issue type constants
TYPE_WARNING  = 'warning'

Properties

$contentMigrationUrl  : string|null
API url to the content migration
$createdAt  : DateTime|null
When the issue was created
$description  : string|null
Description of the issue for the end-user
$errorMessage  : string|null
Site administrator error message (requires permissions)
$errorReportHtmlUrl  : string|null
Link to a Canvas error report if present (requires permissions)
$fixIssueHtmlUrl  : string|null
HTML URL to the Canvas page to investigate the issue
$id  : int|null
The unique identifier for the issue
$issueType  : string|null
Severity of the issue: todo, warning, error
$updatedAt  : DateTime|null
When the issue was last updated
$workflowState  : string|null
Current state of the issue: active, resolved
$apiClient  : HttpClientInterface
$methodAliases  : array<string|int, mixed>
Define method aliases

Methods

__callStatic()  : mixed
Magic method to handle function aliases
__construct()  : mixed
BaseApi constructor.
all()  : array<string|int, MigrationIssue>
Get all pages of records (interface method)
allInMigration()  : array<string|int, MigrationIssue>
Get all pages of migration issues
checkContentMigration()  : bool
Check if content migration is set
fetchAllInMigration()  : array<string|int, MigrationIssue>
List migration issues in a specific migration
find()  : self
Get a single migration issue by ID (not supported - use findInMigration instead)
findInMigration()  : self
Get a single migration issue by ID in a specific migration
get()  : array<string|int, MigrationIssue>
List migration issues (not supported - use fetchAllInMigration instead)
getContentMigrationUrl()  : string|null
getCreatedAt()  : DateTime|null
getDescription()  : string|null
getErrorMessage()  : string|null
getErrorReportHtmlUrl()  : string|null
getFixIssueHtmlUrl()  : string|null
getId()  : int|null
getIssueType()  : string|null
getUpdatedAt()  : DateTime|null
getWorkflowState()  : string|null
isActive()  : bool
Check if the issue is active
isError()  : bool
Check if this is an error
isResolved()  : bool
Check if the issue is resolved
isTodo()  : bool
Check if this is a todo
isWarning()  : bool
Check if this is a warning
paginate()  : PaginationResult
Get paginated results with metadata
paginateInMigration()  : PaginatedResponse
Get paginated migration issues
reactivate()  : bool
Reactivate this issue
resolve()  : bool
Resolve this issue
setApiClient()  : void
Set the API client
setContentMigration()  : void
Set the parent content migration
setContentMigrationUrl()  : void
setCreatedAt()  : void
setDescription()  : void
setErrorMessage()  : void
setErrorReportHtmlUrl()  : void
setFixIssueHtmlUrl()  : void
setId()  : void
setIssueType()  : void
setUpdatedAt()  : void
setWorkflowState()  : void
update()  : self
Update migration issue
castValue()  : DateTime|mixed
Cast a value to the correct type
checkApiClient()  : void
Check if the API client is set, if not, instantiate a new one
convertPaginatedResponseToModels()  : array<string|int, static>
Helper method to convert paginated response data to model instances
createConfiguredHttpClient()  : HttpClient
Create an HttpClient with configured middleware
createPaginationResult()  : PaginationResult
Helper method to create PaginationResult from paginated response
getEndpoint()  : string
Get the API endpoint for this resource Note: MigrationIssue is a nested resource under ContentMigration and requires context, so this returns a placeholder that should not be used directly
getPaginatedResponse()  : PaginatedResponse
Helper method to get paginated response from API endpoint
populate()  : void
Populate the object with new data
toDtoArray()  : array<string|int, mixed>
Convert the object to an array

Constants

STATE_ACTIVE

Workflow state constants

public mixed STATE_ACTIVE = 'active'

Properties

$contentMigrationUrl

API url to the content migration

public string|null $contentMigrationUrl = null

$createdAt

When the issue was created

public DateTime|null $createdAt = null

$description

Description of the issue for the end-user

public string|null $description = null

$errorMessage

Site administrator error message (requires permissions)

public string|null $errorMessage = null

$errorReportHtmlUrl

Link to a Canvas error report if present (requires permissions)

public string|null $errorReportHtmlUrl = null

$fixIssueHtmlUrl

HTML URL to the Canvas page to investigate the issue

public string|null $fixIssueHtmlUrl = null

$id

The unique identifier for the issue

public int|null $id = null

$issueType

Severity of the issue: todo, warning, error

public string|null $issueType = null

$updatedAt

When the issue was last updated

public DateTime|null $updatedAt = null

$workflowState

Current state of the issue: active, resolved

public string|null $workflowState = null

$methodAliases

Define method aliases

protected static array<string|int, mixed> $methodAliases = ['get' => ['fetch', 'list', 'fetchAll'], 'all' => ['fetchAllPages', 'getAll'], 'paginate' => ['getPaginated', 'withPagination', 'fetchPage'], 'find' => ['one', 'getOne']]

Methods

__callStatic()

Magic method to handle function aliases

public static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>
Tags
throws
InvalidArgumentException

__construct()

BaseApi constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

allInMigration()

Get all pages of migration issues

public static allInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
$contextType : string

Context type (accounts, courses, groups, users)

$contextId : int

Context ID

$migrationId : int

Content migration ID

$params : array<string, mixed> = []

Query parameters

Tags
throws
CanvasApiException
Return values
array<string|int, MigrationIssue>

checkContentMigration()

Check if content migration is set

public static checkContentMigration() : bool

This method is no longer used and will be removed in a future version

Return values
bool

fetchAllInMigration()

List migration issues in a specific migration

public static fetchAllInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
$contextType : string

Context type (accounts, courses, groups, users)

$contextId : int

Context ID

$migrationId : int

Content migration ID

$params : array<string, mixed> = []

Query parameters

Tags
throws
CanvasApiException
Return values
array<string|int, MigrationIssue>

find()

Get a single migration issue by ID (not supported - use findInMigration instead)

public static find(int $id[, array<string|int, mixed> $params = [] ]) : self
Parameters
$id : int

Migration issue ID

$params : array<string|int, mixed> = []

Optional query parameters

Tags
throws
CanvasApiException
Return values
self

findInMigration()

Get a single migration issue by ID in a specific migration

public static findInMigration(string $contextType, int $contextId, int $migrationId, int $id) : self
Parameters
$contextType : string

Context type (accounts, courses, groups, users)

$contextId : int

Context ID

$migrationId : int

Content migration ID

$id : int

Migration issue ID

Tags
throws
CanvasApiException
Return values
self

get()

List migration issues (not supported - use fetchAllInMigration instead)

public static get([array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
$params : array<string, mixed> = []

Query parameters

Tags
throws
CanvasApiException
Return values
array<string|int, MigrationIssue>

getContentMigrationUrl()

public getContentMigrationUrl() : string|null
Return values
string|null

getCreatedAt()

public getCreatedAt() : DateTime|null
Return values
DateTime|null

getDescription()

public getDescription() : string|null
Return values
string|null

getErrorMessage()

public getErrorMessage() : string|null
Return values
string|null

getErrorReportHtmlUrl()

public getErrorReportHtmlUrl() : string|null
Return values
string|null

getFixIssueHtmlUrl()

public getFixIssueHtmlUrl() : string|null
Return values
string|null

getIssueType()

public getIssueType() : string|null
Return values
string|null

getUpdatedAt()

public getUpdatedAt() : DateTime|null
Return values
DateTime|null

getWorkflowState()

public getWorkflowState() : string|null
Return values
string|null

isActive()

Check if the issue is active

public isActive() : bool
Return values
bool

isError()

Check if this is an error

public isError() : bool
Return values
bool

isResolved()

Check if the issue is resolved

public isResolved() : bool
Return values
bool

isTodo()

Check if this is a todo

public isTodo() : bool
Return values
bool

isWarning()

Check if this is a warning

public isWarning() : bool
Return values
bool

paginateInMigration()

Get paginated migration issues

public static paginateInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : PaginatedResponse
Parameters
$contextType : string

Context type (accounts, courses, groups, users)

$contextId : int

Context ID

$migrationId : int

Content migration ID

$params : array<string, mixed> = []

Query parameters

Tags
throws
CanvasApiException
Return values
PaginatedResponse

setContentMigration()

Set the parent content migration

public static setContentMigration(ContentMigration $_contentMigration) : void

This method is no longer used and will be removed in a future version

Parameters
$_contentMigration : ContentMigration

setContentMigrationUrl()

public setContentMigrationUrl(string|null $contentMigrationUrl) : void
Parameters
$contentMigrationUrl : string|null

setCreatedAt()

public setCreatedAt(DateTime|null $createdAt) : void
Parameters
$createdAt : DateTime|null

setDescription()

public setDescription(string|null $description) : void
Parameters
$description : string|null

setErrorMessage()

public setErrorMessage(string|null $errorMessage) : void
Parameters
$errorMessage : string|null

setErrorReportHtmlUrl()

public setErrorReportHtmlUrl(string|null $errorReportHtmlUrl) : void
Parameters
$errorReportHtmlUrl : string|null

setFixIssueHtmlUrl()

public setFixIssueHtmlUrl(string|null $fixIssueHtmlUrl) : void
Parameters
$fixIssueHtmlUrl : string|null

setId()

public setId(int|null $id) : void
Parameters
$id : int|null

setIssueType()

public setIssueType(string|null $issueType) : void
Parameters
$issueType : string|null

setUpdatedAt()

public setUpdatedAt(DateTime|null $updatedAt) : void
Parameters
$updatedAt : DateTime|null

setWorkflowState()

public setWorkflowState(string|null $workflowState) : void
Parameters
$workflowState : string|null

update()

Update migration issue

public static update(string $contextType, int $contextId, int $migrationId, int $id, array<string, mixed>|UpdateMigrationIssueDTO $data) : self
Parameters
$contextType : string

Context type (accounts, courses, groups, users)

$contextId : int

Context ID

$migrationId : int

Content migration ID

$id : int

Migration issue ID

$data : array<string, mixed>|UpdateMigrationIssueDTO

Update data

Tags
throws
CanvasApiException
Return values
self

castValue()

Cast a value to the correct type

protected castValue(string $key, mixed $value) : DateTime|mixed
Parameters
$key : string
$value : mixed
Tags
throws
Exception
Return values
DateTime|mixed

checkApiClient()

Check if the API client is set, if not, instantiate a new one

protected static checkApiClient() : void

convertPaginatedResponseToModels()

Helper method to convert paginated response data to model instances

protected static convertPaginatedResponseToModels(PaginatedResponse $paginatedResponse) : array<string|int, static>
Parameters
$paginatedResponse : PaginatedResponse
Return values
array<string|int, static>

getEndpoint()

Get the API endpoint for this resource Note: MigrationIssue is a nested resource under ContentMigration and requires context, so this returns a placeholder that should not be used directly

protected static getEndpoint() : string
Tags
throws
CanvasApiException
Return values
string

getPaginatedResponse()

Helper method to get paginated response from API endpoint

protected static getPaginatedResponse(string $endpoint[, array<string|int, mixed> $params = [] ]) : PaginatedResponse
Parameters
$endpoint : string

The API endpoint path

$params : array<string|int, mixed> = []

Query parameters for the request

Return values
PaginatedResponse

populate()

Populate the object with new data

protected populate(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Tags
throws
Exception

toDtoArray()

Convert the object to an array

protected toDtoArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results