Skip to content

Latest commit

 

History

History
1620 lines (1276 loc) · 122 KB

File metadata and controls

1620 lines (1276 loc) · 122 KB

Lms

Overview

Available Operations

batch_upsert_content

Batch upsert multiple external linking learning objects that redirect users to a provider platform for consumption and progress tracking.

Note: Partial updates are not supported. When updating content, you must provide all the same fields that are required when creating content.

See here for more information about external linking learning objects.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)
res = s.lms.batch_upsert_content(lms_batch_upsert_content_request_dto: Models::Shared::LmsBatchUpsertContentRequestDto.new(
  items: [
    Models::Shared::LmsUpsertContentRequestDto.new(
      active: true,
      additional_data: [
        Models::Shared::AdditionalData.new(
          id: 'learning_outcomes',
          remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
          value: 'This is additional data'
        ),
      ],
      authors: [
        Models::Shared::AuthorModel.new(
          id: '123',
          name: 'John Doe'
        ),
      ],
      categories: [
        Models::Shared::CreateCategoriesApiModel.new(
          id: '16873-IT345',
          language: Models::Shared::CreateCategoriesApiModelLanguage.new(
            value: Models::Shared::CreateCategoriesApiModelSchemasValue::EN_GB
          ),
          name: 'Information-Technology',
          unified_custom_fields: {
            'my_project_custom_field_1' => 'REF-1236',
            'my_project_custom_field_2' => 'some other value',
          }
        ),
      ],
      content_url: 'https://www.youtube.com/watch?v=16873',
      cover_url: 'https://www.googledrive.com/?v=16873',
      created_at: DateTime.iso8601('2021-07-21T14:00:00.000Z'),
      description: 'This video acts as learning content for software engineers.',
      duration: 'P3Y6M4DT12H30M5S',
      external_reference: 'SOFTWARE-ENG-LV1-TRAINING-VIDEO-1',
      languages: [
        Models::Shared::LanguageEnum.new(
          value: Models::Shared::LanguageEnumValue::EN_GB
        ),
      ],
      localizations: [
        Models::Shared::LocalizationModel.new(
          description: 'This course acts as learning resource for software engineers.',
          title: 'Software Engineer Lv 1'
        ),
        Models::Shared::LocalizationModel.new(
          description: 'This course acts as learning resource for software engineers.',
          title: 'Software Engineer: A comprehensive guide'
        ),
      ],
      mobile_launch_content_url: 'https://www.mobile.youtube.com/watch?v=16873',
      order: 1.0,
      skills: [
        Models::Shared::CreateSkillsApiModel.new(
          id: '12345',
          name: 'Sales Techniques'
        ),
      ],
      tags: [
        'Sales Techniques',
        'Customer Service',
      ],
      title: 'Software Engineer Lv 1',
      unified_custom_fields: {
        'my_project_custom_field_1' => 'REF-1236',
        'my_project_custom_field_2' => 'some other value',
      },
      updated_at: DateTime.iso8601('2021-07-21T14:00:00.000Z')
    ),
  ]
), x_account_id: '<id>', prefer: 'heartbeat')

unless res.batch_result_api_model.nil?
  # handle response
end

Parameters

Parameter Type Required Description Example
lms_batch_upsert_content_request_dto Models::Shared::LmsBatchUpsertContentRequestDto ✔️ N/A
x_account_id ::String ✔️ The account identifier
prefer T.nilable(::String) Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) heartbeat

Response

T.nilable(Models::Operations::LmsBatchUpsertContentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

create_user_assignment

Create an assignment type learning record for a user.

This is the record linking a user to a learning object.

It can be pending or in progress.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)
res = s.lms.create_user_assignment(lms_create_assignment_request_dto: Models::Shared::LmsCreateAssignmentRequestDto.new(
  assigned_at: DateTime.iso8601('2021-07-21T14:00:00.000Z'),
  due_date: DateTime.iso8601('2021-07-21T14:00:00.000Z'),
  learning_object_external_reference: 'learning-content-123',
  learning_object_id: 'e3gd34-23tr21-er234-345er56',
  passthrough: {
    'other_known_names' => 'John Doe',
  },
  progress: 40.0,
  status: Models::Shared::LmsCreateAssignmentRequestDtoStatus.new(
    value: Models::Shared::LmsCreateAssignmentRequestDtoValue::IN_PROGRESS
  )
), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')

unless res.create_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description Example
lms_create_assignment_request_dto Models::Shared::LmsCreateAssignmentRequestDto ✔️ N/A
id ::String ✔️ N/A
x_account_id ::String ✔️ The account identifier
prefer T.nilable(::String) Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) heartbeat

Response

T.nilable(Models::Operations::LmsCreateUserAssignmentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

create_user_completion

Create a completed learning record for a user.

This is the record of a user completing a learning object.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)
res = s.lms.create_user_completion(lms_create_completion_request_dto: Models::Shared::LmsCreateCompletionRequestDto.new(
  completed_at: DateTime.iso8601('2021-07-21T14:00:00.000Z'),
  learning_object_external_reference: 'learning-content-123',
  learning_object_id: 'e3gd34-23tr21-er234-345er56',
  passthrough: {
    'other_known_names' => 'John Doe',
  },
  score: Models::Shared::LmsCreateCompletionRequestDtoScore.new(
    percentage: 87.0,
    raw_value: '87 / 100'
  ),
  time_spent: 'PT1H30M45S'
), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')

unless res.create_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description Example
lms_create_completion_request_dto Models::Shared::LmsCreateCompletionRequestDto ✔️ N/A
id ::String ✔️ N/A
x_account_id ::String ✔️ The account identifier
prefer T.nilable(::String) Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) heartbeat

Response

T.nilable(Models::Operations::LmsCreateUserCompletionResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

delete_user_completion

Delete a completion type learning record for a user.

This is a record of a user completing a learning object.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)
res = s.lms.delete_user_completion(id: '<id>', sub_resource_id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')

unless res.delete_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description Example
id ::String ✔️ N/A
sub_resource_id ::String ✔️ N/A
x_account_id ::String ✔️ The account identifier
prefer T.nilable(::String) Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) heartbeat

Response

T.nilable(Models::Operations::LmsDeleteUserCompletionResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_assignment

Retrieve an assignment type learning record by its identifier.

This is the record linking a user to a learning object.

It can be pending, in progress, or completed.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetAssignmentRequest.new(
  prefer: 'heartbeat',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_assignment(request: req)

unless res.assignment_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetAssignmentRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetAssignmentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_category

Get Category

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetCategoryRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,name,active,hierarchy,level,language,unified_custom_fields',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_category(request: req)

unless res.category_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetCategoryRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetCategoryResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_completion

Retrieve a completed learning record by its identifier. This is the record of a user completing a learning object.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetCompletionRequest.new(
  prefer: 'heartbeat',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_completion(request: req)

unless res.completion_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetCompletionRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetCompletionResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_content

Retrieve a content type learning object by its identifier.

These are the most granular learning objects (e.g. video, document, podcast) on a platform.

Only content objects for which the platform supports progress and completion tracking are returned.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetContentRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,course_ids,remote_course_ids,title,description,additional_data,languages,content_url,mobile_launch_content_url,content_type,cover_url,active,duration,order,categories,skills,updated_at,created_at,provider,localizations,tags,authors,unified_custom_fields',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_content(request: req)

unless res.content_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetContentRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetContentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_course

Retrieve a course type learning object by its identifier.

These are collections of content type learning objects that are grouped together for a specific learning purpose.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetCourseRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,content_ids,remote_content_ids,title,description,languages,cover_url,url,active,duration,categories,skills,updated_at,created_at,content,provider,localizations,authors,unified_custom_fields',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_course(request: req)

unless res.course_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetCourseRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetCourseResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_skill

Get Skill

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetSkillRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,name,active,hierarchy,language,unified_custom_fields',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_skill(request: req)

unless res.skill_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetSkillRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetSkillResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_user

Get User

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetUserRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,active,email,phone_number,created_at,updated_at,name,unified_custom_fields',
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_user(request: req)

unless res.user_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetUserRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetUserResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_user_assignment

Retrieve an assignment type learning record for a user by its identifier.

This is the record linking a user to a learning object.

It can be pending, in progress, or completed.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetUserAssignmentRequest.new(
  prefer: 'heartbeat',
  id: '<id>',
  sub_resource_id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_user_assignment(request: req)

unless res.assignment_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetUserAssignmentRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetUserAssignmentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

get_user_completion

Retrieve a completed learning record for a user by its identifier.

This is the record of a user completing a learning object.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsGetUserCompletionRequest.new(
  prefer: 'heartbeat',
  id: '<id>',
  sub_resource_id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.get_user_completion(request: req)

unless res.completion_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsGetUserCompletionRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsGetUserCompletionResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_assignments

Retrieve a list of assignment type learning records.

These are the records linking a user to a learning object.

They can be pending, in progress, or completed.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListAssignmentsRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,user_id,remote_user_id,course_id,remote_course_id,updated_at,created_at,assigned_at,due_date,status,progress,learning_object_type,learning_object_id,remote_learning_object_id,learning_object_external_reference,certificate_url,result,completed_at,unified_custom_fields',
  filter: Models::Operations::LmsListAssignmentsQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',
  user_id: 'c28xyrc55866bvuv',
  x_account_id: '<id>'
)
res = s.lms.list_assignments(request: req)

unless res.assignments_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListAssignmentsRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListAssignmentsResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_categories

List Categories

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListCategoriesRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,name,active,hierarchy,level,language,unified_custom_fields',
  filter: Models::Operations::LmsListCategoriesQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  x_account_id: '<id>'
)
res = s.lms.list_categories(request: req)

unless res.categories_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListCategoriesRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListCategoriesResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_completions

Retrieve a list of completed learning records. These are the records of a user completing learning objects.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListCompletionsRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_id,remote_external_id,external_reference,content_id,remote_content_id,course_id,remote_course_id,user_id,remote_user_id,completed_at,updated_at,created_at,result,content_external_reference,learning_object_type,learning_object_id,remote_learning_object_id,learning_object_external_reference,time_spent,certificate_url,score,unified_custom_fields',
  filter: Models::Operations::LmsListCompletionsQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  x_account_id: '<id>'
)
res = s.lms.list_completions(request: req)

unless res.completions_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListCompletionsRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListCompletionsResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_content

Retrieve a list of content type learning objects.

These are the most granular learning objects (e.g. video, document, podcast) on a platform.

Only content objects for which the platform supports progress and completion tracking are returned.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListContentRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,course_ids,remote_course_ids,title,description,additional_data,languages,content_url,mobile_launch_content_url,content_type,cover_url,active,duration,order,categories,skills,updated_at,created_at,provider,localizations,tags,authors,unified_custom_fields',
  filter: Models::Operations::LmsListContentQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  x_account_id: '<id>'
)
res = s.lms.list_content(request: req)

unless res.content_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListContentRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListContentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_courses

Retrieve a list of course type learning objects.

These are collections of content type learning objects that are grouped together for a specific learning purpose.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListCoursesRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,content_ids,remote_content_ids,title,description,languages,cover_url,url,active,duration,categories,skills,updated_at,created_at,content,provider,localizations,authors,unified_custom_fields',
  filter: Models::Operations::LmsListCoursesQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  x_account_id: '<id>'
)
res = s.lms.list_courses(request: req)

unless res.course_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListCoursesRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListCoursesResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_skills

List Skills

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListSkillsRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,name,active,hierarchy,language,unified_custom_fields',
  filter: Models::Operations::LmsListSkillsQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  x_account_id: '<id>'
)
res = s.lms.list_skills(request: req)

unless res.skills_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListSkillsRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListSkillsResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_user_assignments

Retrieve a list of assignment type learning records for a user.

These are the records linking a user to learning objects.

They can be pending, in progress, or completed.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListUserAssignmentsRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,user_id,remote_user_id,course_id,remote_course_id,updated_at,created_at,assigned_at,due_date,status,progress,learning_object_type,learning_object_id,remote_learning_object_id,learning_object_external_reference,certificate_url,result,completed_at,unified_custom_fields',
  filter: Models::Operations::LmsListUserAssignmentsQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  id: '<id>',
  remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',
  user_id: 'c28xyrc55866bvuv',
  x_account_id: '<id>'
)
res = s.lms.list_user_assignments(request: req)

unless res.assignments_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListUserAssignmentsRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListUserAssignmentsResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_user_completions

Retrieve a list of completed learning records for a user.

These are the records of a user completing learning objects.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListUserCompletionsRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_id,remote_external_id,external_reference,content_id,remote_content_id,course_id,remote_course_id,user_id,remote_user_id,completed_at,updated_at,created_at,result,content_external_reference,learning_object_type,learning_object_id,remote_learning_object_id,learning_object_external_reference,time_spent,certificate_url,score,unified_custom_fields',
  filter: Models::Operations::LmsListUserCompletionsQueryParamFilter.new(
    updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')
  ),
  id: '<id>',
  x_account_id: '<id>'
)
res = s.lms.list_user_completions(request: req)

unless res.completions_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListUserCompletionsRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListUserCompletionsResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

list_users

List Users

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)

req = Models::Operations::LmsListUsersRequest.new(
  prefer: 'heartbeat',
  fields_: 'id,remote_id,external_reference,active,email,phone_number,created_at,updated_at,name,unified_custom_fields',
  filter: nil,
  x_account_id: '<id>'
)
res = s.lms.list_users(request: req)

unless res.users_paginated.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::LmsListUsersRequest ✔️ The request object to use for the request.

Response

T.nilable(Models::Operations::LmsListUsersResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*

upsert_content

Create or update an external linking learning object that redirects users to a provider platform for consumption and progress tracking.

Note: Partial updates are not supported. When updating content, you must provide all the same fields that are required when creating content.

See here for more information about external linking learning objects.

Example Usage

require 'stackone_client'

Models = ::StackOne::Models
s = ::StackOne::StackOne.new(
  security: Models::Shared::Security.new(
    password: '',
    username: ''
  )
)
res = s.lms.upsert_content(lms_upsert_content_request_dto: Models::Shared::LmsUpsertContentRequestDto.new(
  active: true,
  additional_data: [
    Models::Shared::AdditionalData.new(
      id: 'learning_outcomes',
      remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
      value: 'This is additional data'
    ),
  ],
  authors: [
    Models::Shared::AuthorModel.new(
      id: '123',
      name: 'John Doe'
    ),
  ],
  categories: [
    Models::Shared::CreateCategoriesApiModel.new(
      id: '16873-IT345',
      language: Models::Shared::CreateCategoriesApiModelLanguage.new(
        value: Models::Shared::CreateCategoriesApiModelSchemasValue::EN_GB
      ),
      name: 'Information-Technology',
      unified_custom_fields: {
        'my_project_custom_field_1' => 'REF-1236',
        'my_project_custom_field_2' => 'some other value',
      }
    ),
  ],
  content_url: 'https://www.youtube.com/watch?v=16873',
  cover_url: 'https://www.googledrive.com/?v=16873',
  created_at: DateTime.iso8601('2021-07-21T14:00:00.000Z'),
  description: 'This video acts as learning content for software engineers.',
  duration: 'P3Y6M4DT12H30M5S',
  external_reference: 'SOFTWARE-ENG-LV1-TRAINING-VIDEO-1',
  languages: [
    Models::Shared::LanguageEnum.new(
      value: Models::Shared::LanguageEnumValue::EN_GB
    ),
  ],
  localizations: [
    Models::Shared::LocalizationModel.new(
      description: 'This course acts as learning resource for software engineers.',
      title: 'Software Engineer Lv 1'
    ),
    Models::Shared::LocalizationModel.new(
      description: 'This course acts as learning resource for software engineers.',
      title: 'Software Engineer: A comprehensive guide'
    ),
  ],
  mobile_launch_content_url: 'https://www.mobile.youtube.com/watch?v=16873',
  order: 1.0,
  passthrough: {
    'other_known_names' => 'John Doe',
  },
  skills: [
    Models::Shared::CreateSkillsApiModel.new(
      id: '12345',
      name: 'Sales Techniques'
    ),
  ],
  tags: [
    'Sales Techniques',
    'Customer Service',
  ],
  title: 'Software Engineer Lv 1',
  unified_custom_fields: {
    'my_project_custom_field_1' => 'REF-1236',
    'my_project_custom_field_2' => 'some other value',
  },
  updated_at: DateTime.iso8601('2021-07-21T14:00:00.000Z')
), x_account_id: '<id>', prefer: 'heartbeat')

unless res.upsert_result.nil?
  # handle response
end

Parameters

Parameter Type Required Description Example
lms_upsert_content_request_dto Models::Shared::LmsUpsertContentRequestDto ✔️ N/A
x_account_id ::String ✔️ The account identifier
prefer T.nilable(::String) Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) heartbeat

Response

T.nilable(Models::Operations::LmsUpsertContentResponse)

Errors

Error Type Status Code Content Type
Models::Errors::BadRequestResponse 400 application/json
Models::Errors::UnauthorizedResponse 401 application/json
Models::Errors::ForbiddenResponse 403 application/json
Models::Errors::NotFoundResponse 404 application/json
Models::Errors::RequestTimedOutResponse 408 application/json
Models::Errors::ConflictResponse 409 application/json
Models::Errors::PreconditionFailedResponse 412 application/json
Models::Errors::UnprocessableEntityResponse 422 application/json
Models::Errors::TooManyRequestsResponse 429 application/json
Models::Errors::InternalServerErrorResponse 500 application/json
Models::Errors::NotImplementedResponse 501 application/json
Models::Errors::BadGatewayResponse 502 application/json
Errors::APIError 4XX, 5XX */*